##// END OF EJS Templates
absorb: be more specific when erroring out on merge commit...
Martin von Zweigbergk -
r42452:b3fc78c0 default
parent child Browse files
Show More
@@ -914,7 +914,10 b' def absorb(ui, repo, stack=None, targetc'
914 """
914 """
915 if stack is None:
915 if stack is None:
916 limit = ui.configint('absorb', 'max-stack-size')
916 limit = ui.configint('absorb', 'max-stack-size')
917 stack = getdraftstack(repo['.'], limit)
917 headctx = repo['.']
918 if len(headctx.parents()) > 1:
919 raise error.Abort(_('cannot absorb into a merge'))
920 stack = getdraftstack(headctx, limit)
918 if limit and len(stack) >= limit:
921 if limit and len(stack) >= limit:
919 ui.warn(_('absorb: only the recent %d changesets will '
922 ui.warn(_('absorb: only the recent %d changesets will '
920 'be analysed\n')
923 'be analysed\n')
@@ -176,7 +176,7 b' Bookmarks are moved:'
176 b2 2:c9b20c925790
176 b2 2:c9b20c925790
177 * ba 2:c9b20c925790
177 * ba 2:c9b20c925790
178
178
179 Non-mofified files are ignored:
179 Non-modified files are ignored:
180
180
181 $ touch b
181 $ touch b
182 $ hg commit -A b -m b
182 $ hg commit -A b -m b
@@ -225,10 +225,15 b' Public commits will not be changed:'
225 2: 4d
225 2: 4d
226 2: insert aftert 4d
226 2: insert aftert 4d
227
227
228 $ hg co -qC 1
229 $ sedi 's/Insert/insert/' a
230 $ hg absorb --apply-changes
231 abort: no mutable changeset to change
232 [255]
233
228 Make working copy clean:
234 Make working copy clean:
229
235
230 $ hg revert -q -C a b
236 $ hg co -qC ba
231 $ hg forget c
232 $ rm c
237 $ rm c
233 $ hg status
238 $ hg status
234
239
@@ -261,7 +266,7 b' Merge commit will not be changed:'
261 $ echo 2 >> m1
266 $ echo 2 >> m1
262 $ echo 2 >> m2
267 $ echo 2 >> m2
263 $ hg absorb --apply-changes
268 $ hg absorb --apply-changes
264 abort: no mutable changeset to change
269 abort: cannot absorb into a merge
265 [255]
270 [255]
266 $ hg revert -q -C m1 m2
271 $ hg revert -q -C m1 m2
267
272
General Comments 0
You need to be logged in to leave comments. Login now