Bug 1126607, part 3: Stop downloading the LDAP C-SDK repository, r=glandium.
authorJoshua Cranmer <Pidgeot18@gmail.com>
Sun, 19 Apr 2015 22:20:45 -0500
changeset 22481 557498f58325bd8367e00c40869bcbc6b8310506
parent 22480 2b00be2ded7f6b20d5b10523f73ff29bb02edd43
child 22482 24203ada3e1ef9e8330208ba56bc227f2ac9f07c
push idunknown
push userunknown
push dateunknown
reviewersglandium
bugs1126607
Bug 1126607, part 3: Stop downloading the LDAP C-SDK repository, r=glandium. No attempt is made to clean up existing repositories, and this file could probably be cleaned up further; such changes are beyond the scope of this bug.
client.py
--- a/client.py
+++ b/client.py
@@ -5,25 +5,21 @@
 
 
 # Warning, this file must be compatible with Python 2.4, for our
 # various tools, such as http://mxr.mozilla.org/ see-also: Bug 601207
 
 # Repo Defaults
 # 'REV' controls the default rev for All the various repo's
 # Define x_REV to override. Where x can be one of:
-#  "COMM", "MOZILLA", "CHATZILLA", "INSPECTOR", "LDAPSDKS"
+#  "COMM", "MOZILLA", "CHATZILLA", "INSPECTOR"
 DEFAULTS = {
     # Global Default Revision
     'REV': "default",
 
-    # LDAPSDKS
-    'LDAPSDKS_REPO': 'https://hg.mozilla.org/projects/ldap-sdks/',
-    'LDAPSDKS_REV': 'LDAPCSDK_6_0_7H_RTM',
-
     # URL of the default hg repository to clone for ChatZilla.
     'CHATZILLA_REPO': 'https://hg.mozilla.org/chatzilla/',
     # The stable revision to use for the next branch
     #  'CHATZILLA_REV':  'SEA2_32_RELBRANCH',
 
     # URL of the default hg repository to clone for DOM Inspector.
     'INSPECTOR_REPO': 'https://hg.mozilla.org/dom-inspector/',
     # The stable revision to use for the next branch
@@ -31,17 +27,16 @@ DEFAULTS = {
 
     # URL of the default hg repository to clone for Mozilla.
     'MOZILLA_REPO': 'https://hg.mozilla.org/mozilla-central/',
 }
 
 REPO_SHORT_NAMES = {
     'mozilla-central':  'moz',
     'dom-inspector':    'dom',
-    'ldap-sdks':        'ldap',
 }
 
 
 def get_DEFAULT_tag(index):
     if index in DEFAULTS:
         return DEFAULTS[index]
     else:
         return DEFAULTS['REV']
@@ -404,17 +399,16 @@ def do_apply_patch(hg, patch, repo):
 import glob
 
 
 def do_apply_patches(topsrcdir, hg):
     prefix_map = {
         'mozilla': 'mozilla',
         'chatzilla': os.path.join('mozilla', 'extensions', 'irc'),
         'inspector': os.path.join('mozilla', 'extensions', 'inspector'),
-        'ldap':      os.path.join('ldap', 'sdks'),
     }
 
     for prefix in prefix_map.keys():
         prefix_dir = prefix_map.get(prefix)
         files = glob.glob("%s*.patch" % prefix)
         files.sort()
         for file in files:
             patch = os.path.join(topsrcdir, file)
@@ -450,26 +444,16 @@ o.add_option("--inspector-repo", dest="i
              help="URL of DOM Inspector repository to pull from (default: use hg default in mozilla/extensions/inspector/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULTS['INSPECTOR_REPO'] + "\".)")
 o.add_option("--skip-inspector", dest="skip_inspector",
              action="store_true", default=False,
              help="Skip pulling the DOM Inspector repository.")
 o.add_option("--inspector-rev", dest="inspector_rev",
              default=None,
              help="Revision of DOM Inspector repository to update to. Default: \"" + get_DEFAULT_tag('INSPECTOR_REV') + "\"")
 
-o.add_option("--ldap-repo", dest="ldap_repo",
-             default=None,
-             help="URL of LDAP repository to pull from (default: use hg default in ldap/sdks/.hg/hgrc; or if that file doesn't exist use \"" + DEFAULTS['LDAPSDKS_REPO'] + "\".)")
-o.add_option("--skip-ldap", dest="skip_ldap",
-             action="store_true", default=False,
-             help="Skip pulling the LDAP repository.")
-o.add_option("--ldap-rev", dest="ldap_rev",
-             default=None,
-             help="Revision of LDAP repository to update to. Default: \"" + get_DEFAULT_tag('LDAPSDKS_REV') + "\"")
-
 o.add_option("--chatzilla-repo", dest="chatzilla_repo",
              default=None,
              help="URL of ChatZilla repository to pull from (default: use hg default in mozilla/extensions/irc/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULTS['CHATZILLA_REPO'] + "\".)")
 o.add_option("--skip-chatzilla", dest="skip_chatzilla",
              action="store_true", default=False,
              help="Skip pulling the ChatZilla repository.")
 o.add_option("--chatzilla-rev", dest="chatzilla_rev",
              default=None,
@@ -604,31 +588,16 @@ def fixup_inspector_repo_options(options
             not os.path.exists(os.path.join(topsrcdir, 'mozilla', 'extensions',
                                             'inspector')):
         options.inspector_repo = DEFAULTS['INSPECTOR_REPO']
 
     if options.inspector_rev is None:
         options.inspector_rev = get_DEFAULT_tag("INSPECTOR_REV")
 
 
-def fixup_ldap_repo_options(options):
-    """Handle special case: initial checkout of LDAP.
-
-    See fixup_comm_repo_options().
-    """
-
-    # No cvs backup needed as LDAP directory name changed when it moved to hg
-    if options.ldap_repo is None and \
-            not os.path.exists(os.path.join(topsrcdir, 'ldap', 'sdks')):
-        options.ldap_repo = DEFAULTS['LDAPSDKS_REPO']
-
-    if options.ldap_rev is None:
-        options.ldap_rev = get_DEFAULT_tag("LDAPSDKS_REV")
-
-
 def get_last_known_good_mozilla_rev():
     kg_url = "http://build.mozillamessaging.com/buildbot/production/known-good-revisions/mozilla-central.txt"
     try:
         rev = urllib2.urlopen(kg_url).read().strip()
     except IOError, err:
         sys.exit("Error: could not fetch '%s' (%s)" % (kg_url, err))
     if re.search(r'^[a-f0-9]+$', rev) and len(rev) == 12:
         return rev
@@ -640,18 +609,17 @@ try:
     (options, (action,)) = o.parse_args()
 except ValueError:
     o.print_help()
     sys.exit(2)
 
 if options.default_rev:
     # We now wish to override all the DEFAULTS.
     DEFAULTS['REV'] = options.default_rev
-    for index in ['CHATZILLA', 'INSPECTOR', 'COMM', 'MOZILLA',
-                  'LDAPSDKS']:
+    for index in ['CHATZILLA', 'INSPECTOR', 'COMM', 'MOZILLA']:
         index += "_REV"
         # Clear the rest from file-defaults
         if index in DEFAULTS:
             del DEFAULTS[index]
 
 if action in ('checkout', 'co'):
     # Update Comm repository configuration.
     repo_config()
@@ -682,19 +650,14 @@ if action in ('checkout', 'co'):
         do_hg_pull(os.path.join('mozilla', 'extensions', 'irc'),
                    options.chatzilla_repo, options.hg, options.chatzilla_rev)
 
     if not options.skip_inspector:
         fixup_inspector_repo_options(options)
         do_hg_pull(os.path.join('mozilla', 'extensions', 'inspector'),
                    options.inspector_repo, options.hg, options.inspector_rev)
 
-    if not options.skip_ldap:
-        fixup_ldap_repo_options(options)
-        do_hg_pull(os.path.join('ldap', 'sdks'), options.ldap_repo, options.hg,
-                   options.ldap_rev)
-
     if options.apply_patches:
         do_apply_patches(topsrcdir, options.hg)
 
 else:
     o.print_help()
     sys.exit(2)