File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change
1
+ v1.10.1
2
+ =======
3
+
4
+ * fix issue #73 - in hg pre commit merge, consider parent1 instead of failing
5
+
1
6
v1.10.0
2
7
=======
3
8
Original file line number Diff line number Diff line change @@ -31,10 +31,12 @@ def parse(root):
31
31
trace ('initial node' , root )
32
32
return meta ('0.0' , dirty = dirty )
33
33
34
- cmd = 'hg parents --template "{latesttag} {latesttagdistance}"'
34
+ # the newline is needed for merge stae, see issue 72
35
+ cmd = 'hg parents --template "{latesttag} {latesttagdistance}\n "'
35
36
out = do (cmd , root )
36
37
try :
37
- tag , dist = out .split ()
38
+ # in merge state we assume parent 1 is fine
39
+ tag , dist = out .splitlines ()[0 ].split ()
38
40
if tag == 'null' :
39
41
tag = '0.0'
40
42
dist = int (dist ) + 1
Original file line number Diff line number Diff line change @@ -85,3 +85,13 @@ def test_version_from_archival(wd):
85
85
)
86
86
87
87
assert wd .version == '0.2.dev3+n000000000000'
88
+
89
+
90
+ @pytest .mark .issue ('#72' )
91
+ def test_version_in_merge (wd ):
92
+ wd .commit_testfile ()
93
+ wd .commit_testfile ()
94
+ wd ('hg up 0' )
95
+ wd .commit_testfile ()
96
+ wd ('hg merge' )
97
+ assert wd .version is not None
You can’t perform that action at this time.
0 commit comments