mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-10-26 06:06:06 +01:00
16 lines
596 B
Diff
16 lines
596 B
Diff
diff --git a/setup.py b/setup.py
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -181,7 +181,10 @@
|
|
# error 0xc0150004. See: http://bugs.python.org/issue3440
|
|
env['SystemRoot'] = os.environ['SystemRoot']
|
|
|
|
-if os.path.isdir('.hg'):
|
|
+if os.path.exists('.hg_force_version'):
|
|
+ with open('.hg_force_version') as f:
|
|
+ version = f.read().rstrip('\n')
|
|
+elif os.path.isdir('.hg'):
|
|
cmd = [sys.executable, 'hg', 'log', '-r', '.', '--template', '{tags}\n']
|
|
numerictags = [t for t in runhg(cmd, env).split() if t[0].isdigit()]
|
|
hgid = runhg([sys.executable, 'hg', 'id', '-i'], env).strip()
|