Show More
@@ -212,10 +212,17 if version: | |||||
212 | f.write('version = "%s"\n' % version) |
|
212 | f.write('version = "%s"\n' % version) | |
213 |
|
213 | |||
214 | try: |
|
214 | try: | |
|
215 | oldpolicy = os.environ.get('HGMODULEPOLICY', None) | |||
|
216 | os.environ['HGMODULEPOLICY'] = 'py' | |||
215 | from mercurial import __version__ |
|
217 | from mercurial import __version__ | |
216 | version = __version__.version |
|
218 | version = __version__.version | |
217 | except ImportError: |
|
219 | except ImportError: | |
218 | version = 'unknown' |
|
220 | version = 'unknown' | |
|
221 | finally: | |||
|
222 | if oldpolicy is None: | |||
|
223 | del os.environ['HGMODULEPOLICY'] | |||
|
224 | else: | |||
|
225 | os.environ['HGMODULEPOLICY'] = oldpolicy | |||
219 |
|
226 | |||
220 | class hgbuild(build): |
|
227 | class hgbuild(build): | |
221 | # Insert hgbuildmo first so that files in mercurial/locale/ are found |
|
228 | # Insert hgbuildmo first so that files in mercurial/locale/ are found |
General Comments 0
You need to be logged in to leave comments.
Login now