##// END OF EJS Templates
merge-halt: fix issue with merge.on-failure=halt breaking unshelve...
Kyle Lippincott -
r49092:5228a6dc stable
parent child Browse files
Show More
@@ -1713,6 +1713,10 b' def applyupdates('
1713 progress.increment(item=f, total=numupdates)
1713 progress.increment(item=f, total=numupdates)
1714 ms.resolve(f, wctx)
1714 ms.resolve(f, wctx)
1715
1715
1716 except error.InterventionRequired:
1717 # If the user has merge.on-failure=halt, catch the error and close the
1718 # merge state "properly".
1719 pass
1716 finally:
1720 finally:
1717 ms.commit()
1721 ms.commit()
1718
1722
@@ -44,7 +44,7 b' Testing on-failure=halt'
44 merging a
44 merging a
45 merging b
45 merging b
46 merging a failed!
46 merging a failed!
47 merge halted after failed merge (see hg resolve)
47 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
48 [240]
48 [240]
49
49
50 $ hg resolve --list
50 $ hg resolve --list
@@ -72,7 +72,7 b' Testing on-failure=prompt'
72 continue merge operation (yn)? y
72 continue merge operation (yn)? y
73 merging b failed!
73 merging b failed!
74 continue merge operation (yn)? n
74 continue merge operation (yn)? n
75 merge halted after failed merge (see hg resolve)
75 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
76 [240]
76 [240]
77
77
78 $ hg resolve --list
78 $ hg resolve --list
@@ -101,7 +101,7 b' Check that successful tool with failed p'
101 was merge successful (yn)? n
101 was merge successful (yn)? n
102 merging b failed!
102 merging b failed!
103 continue merge operation (yn)? n
103 continue merge operation (yn)? n
104 merge halted after failed merge (see hg resolve)
104 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
105 [240]
105 [240]
106
106
107 $ hg resolve --list
107 $ hg resolve --list
@@ -124,7 +124,7 b' Check that conflicts with conflict check'
124 merging a
124 merging a
125 merging b
125 merging b
126 merging a failed!
126 merging a failed!
127 merge halted after failed merge (see hg resolve)
127 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
128 [240]
128 [240]
129
129
130 $ hg resolve --list
130 $ hg resolve --list
@@ -145,7 +145,7 b' Check that always-prompt also can halt t'
145 was merge of 'a' successful (yn)? y
145 was merge of 'a' successful (yn)? y
146 was merge of 'b' successful (yn)? n
146 was merge of 'b' successful (yn)? n
147 merging b failed!
147 merging b failed!
148 merge halted after failed merge (see hg resolve)
148 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
149 [240]
149 [240]
150
150
151 $ hg resolve --list
151 $ hg resolve --list
@@ -167,6 +167,9 b" Check that unshelve isn't broken by halt"
167 $ cat <<EOS >> $HGRCPATH
167 $ cat <<EOS >> $HGRCPATH
168 > [extensions]
168 > [extensions]
169 > shelve =
169 > shelve =
170 > [merge-tools]
171 > false.check=conflicts
172 > false.premerge=false
170 > EOS
173 > EOS
171 $ echo foo > shelve_file1
174 $ echo foo > shelve_file1
172 $ echo foo > shelve_file2
175 $ echo foo > shelve_file2
@@ -186,15 +189,14 b" Check that unshelve isn't broken by halt"
186 merging shelve_file1
189 merging shelve_file1
187 merging shelve_file2
190 merging shelve_file2
188 merging shelve_file1 failed!
191 merging shelve_file1 failed!
189 merge halted after failed merge (see hg resolve)
192 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
190 [240]
193 [240]
191 FIXME: This should claim it's in an 'unshelve' state
192 $ hg status --config commands.status.verbose=True
194 $ hg status --config commands.status.verbose=True
193 M shelve_file1
195 M shelve_file1
194 M shelve_file2
196 M shelve_file2
195 ? shelve_file1.orig
197 ? shelve_file1.orig
196 ? shelve_file2.orig
198 ? shelve_file2.orig
197 # The repository is in an unfinished *update* state.
199 # The repository is in an unfinished *unshelve* state.
198
200
199 # Unresolved merge conflicts:
201 # Unresolved merge conflicts:
200 #
202 #
@@ -203,16 +205,16 b" FIXME: This should claim it's in an 'uns"
203 #
205 #
204 # To mark files as resolved: hg resolve --mark FILE
206 # To mark files as resolved: hg resolve --mark FILE
205
207
206 # To continue: hg update .
208 # To continue: hg unshelve --continue
209 # To abort: hg unshelve --abort
207
210
208 FIXME: This should not be referencing a stripped commit.
209 $ hg resolve --tool false --all --re-merge
211 $ hg resolve --tool false --all --re-merge
210 abort: unknown revision '4a1d727ea5bb6aed9adfacb2a8f776bae44301d6'
212 merging shelve_file1
211 [255]
213 merging shelve_file2
212 Ensure the shelve is still around, since we haven't finished the operation yet.
214 merging shelve_file1 failed!
215 merge halted after failed merge (see hg resolve)
216 [240]
213 $ hg shelve --list
217 $ hg shelve --list
214 default (* ago) changes to: foo (glob)
218 default (* ago) changes to: foo (glob)
215 FIXME: `hg unshelve --abort` should work.
216 $ hg unshelve --abort
219 $ hg unshelve --abort
217 abort: no unshelve in progress
220 unshelve of 'default' aborted
218 [20]
General Comments 0
You need to be logged in to leave comments. Login now