Commits

Adrian Buehlmann  committed 0d9d33f

move 'setup.py build_hgextindex' call into generate_hgext_index

and delete the index files before each run. Or else we end using a stale
index, since 'setup.py build_hgextindex' doesn't update it even though build_thg
copies additional extensions into hgext.

  • Participants
  • Parent commits 7820c85

Comments (0)

Files changed (1)

     run(r'light -nologo -ext WixUIExtension -sw1076 -spdb -o %s %s' %
         (output, ' '.join(f + '.wixobj' for f in files)), cwd)
 
-# TODO: Remove after hg-1.9
-def generate_hgext_index():
+def generate_hgext_index(branch):
     """Generate list of extensions under hgext/"""
+
+    if branch == 'default':
+        run(r'del build-hg\hgext\__index__.*')
+        run_python(r'setup.py build_hgextindex', 'build-hg')
+        return
+
+    # TODO: Remove after hg-1.9
     from mercurial import help
     extpath = os.path.join('build-hg', 'hgext')
 
     run_python(r'setup.py build_py -c -d . build_mo', 'build-hg')
     run_python(r'setup.py build_ext -i', 'build-hg', env=get_sdkenv(arch))
 
-    if branch == 'stable':
-        generate_hgext_index()
-    else:
-        run_python(r'setup.py build_hgextindex', 'build-hg', env=get_sdkenv(arch))
+    generate_hgext_index(branch)
 
     # Build man pages
     pipetofile((sys.executable, 'gendoc.py'),
         if ext == 'hgcr-gui':
             shutil.copy('hgcr-gui/hgcr.ui', 'build-thg/tortoisehg/hgqt')
 
-    if branch == 'stable':
-        generate_hgext_index()
-    else:
-        run_python(r'setup.py build_hgextindex', 'build-hg', env=get_sdkenv(arch))
+    generate_hgext_index(branch)
 
     # Build docs
     run(r'build chm', 'build-thg/doc')