##// END OF EJS Templates
setup.py, make: avoid problems with outdated, existing hgext/__index__.py*...
Thomas Arendsen Hein -
r21229:54d7657d stable
parent child Browse files
Show More
@@ -56,7 +56,7 b' clean:'
56 find contrib doc hgext i18n mercurial tests \
56 find contrib doc hgext i18n mercurial tests \
57 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
57 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
58 rm -f $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/[a-z]*.py)))
58 rm -f $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/[a-z]*.py)))
59 rm -f MANIFEST MANIFEST.in mercurial/__version__.py tests/*.err
59 rm -f MANIFEST MANIFEST.in mercurial/__version__.py hgext/__index__.py tests/*.err
60 rm -rf build mercurial/locale
60 rm -rf build mercurial/locale
61 $(MAKE) -C doc clean
61 $(MAKE) -C doc clean
62
62
@@ -281,7 +281,7 b' def disabled():'
281 return dict((name, gettext(desc))
281 return dict((name, gettext(desc))
282 for name, desc in __index__.docs.iteritems()
282 for name, desc in __index__.docs.iteritems()
283 if name not in _order)
283 if name not in _order)
284 except ImportError:
284 except (ImportError, AttributeError):
285 pass
285 pass
286
286
287 paths = _disabledpaths()
287 paths = _disabledpaths()
@@ -304,7 +304,7 b' def disabledext(name):'
304 return
304 return
305 else:
305 else:
306 return gettext(__index__.docs.get(name))
306 return gettext(__index__.docs.get(name))
307 except ImportError:
307 except (ImportError, AttributeError):
308 pass
308 pass
309
309
310 paths = _disabledpaths()
310 paths = _disabledpaths()
@@ -331,7 +331,9 b' class buildhgextindex(Command):'
331
331
332 def run(self):
332 def run(self):
333 if os.path.exists(self._indexfilename):
333 if os.path.exists(self._indexfilename):
334 os.unlink(self._indexfilename)
334 f = open(self._indexfilename, 'w')
335 f.write('# empty\n')
336 f.close()
335
337
336 # here no extension enabled, disabled() lists up everything
338 # here no extension enabled, disabled() lists up everything
337 code = ('import pprint; from mercurial import extensions; '
339 code = ('import pprint; from mercurial import extensions; '
General Comments 0
You need to be logged in to leave comments. Login now