Show More
@@ -511,7 +511,7 b' class filefixupstate(object):' | |||||
511 | # run editor |
|
511 | # run editor | |
512 | editedtext = self.ui.edit(editortext, b'', action=b'absorb') |
|
512 | editedtext = self.ui.edit(editortext, b'', action=b'absorb') | |
513 | if not editedtext: |
|
513 | if not editedtext: | |
514 |
raise error. |
|
514 | raise error.InputError(_(b'empty editor text')) | |
515 | # parse edited result |
|
515 | # parse edited result | |
516 | contents = [b''] * len(self.fctxs) |
|
516 | contents = [b''] * len(self.fctxs) | |
517 | leftpadpos = 4 |
|
517 | leftpadpos = 4 | |
@@ -520,7 +520,7 b' class filefixupstate(object):' | |||||
520 | if l.startswith(b'HG:'): |
|
520 | if l.startswith(b'HG:'): | |
521 | continue |
|
521 | continue | |
522 | if l[colonpos - 1 : colonpos + 2] != b' : ': |
|
522 | if l[colonpos - 1 : colonpos + 2] != b' : ': | |
523 |
raise error. |
|
523 | raise error.InputError(_(b'malformed line: %s') % l) | |
524 | linecontent = l[colonpos + 2 :] |
|
524 | linecontent = l[colonpos + 2 :] | |
525 | for i, ch in enumerate( |
|
525 | for i, ch in enumerate( | |
526 | pycompat.bytestr(l[leftpadpos : colonpos - 1]) |
|
526 | pycompat.bytestr(l[leftpadpos : colonpos - 1]) | |
@@ -1018,7 +1018,7 b' def absorb(ui, repo, stack=None, targetc' | |||||
1018 | limit = ui.configint(b'absorb', b'max-stack-size') |
|
1018 | limit = ui.configint(b'absorb', b'max-stack-size') | |
1019 | headctx = repo[b'.'] |
|
1019 | headctx = repo[b'.'] | |
1020 | if len(headctx.parents()) > 1: |
|
1020 | if len(headctx.parents()) > 1: | |
1021 |
raise error. |
|
1021 | raise error.InputError(_(b'cannot absorb into a merge')) | |
1022 | stack = getdraftstack(headctx, limit) |
|
1022 | stack = getdraftstack(headctx, limit) | |
1023 | if limit and len(stack) >= limit: |
|
1023 | if limit and len(stack) >= limit: | |
1024 | ui.warn( |
|
1024 | ui.warn( | |
@@ -1029,7 +1029,7 b' def absorb(ui, repo, stack=None, targetc' | |||||
1029 | % limit |
|
1029 | % limit | |
1030 | ) |
|
1030 | ) | |
1031 | if not stack: |
|
1031 | if not stack: | |
1032 |
raise error. |
|
1032 | raise error.InputError(_(b'no mutable changeset to change')) | |
1033 | if targetctx is None: # default to working copy |
|
1033 | if targetctx is None: # default to working copy | |
1034 | targetctx = repo[None] |
|
1034 | targetctx = repo[None] | |
1035 | if pats is None: |
|
1035 | if pats is None: |
@@ -19,7 +19,7 b' Do not crash with empty repo:' | |||||
19 |
|
19 | |||
20 | $ hg absorb |
|
20 | $ hg absorb | |
21 | abort: no mutable changeset to change |
|
21 | abort: no mutable changeset to change | |
22 |
[ |
|
22 | [10] | |
23 |
|
23 | |||
24 | Make some commits: |
|
24 | Make some commits: | |
25 |
|
25 | |||
@@ -229,7 +229,7 b' Public commits will not be changed:' | |||||
229 | $ sedi 's/Insert/insert/' a |
|
229 | $ sedi 's/Insert/insert/' a | |
230 | $ hg absorb --apply-changes |
|
230 | $ hg absorb --apply-changes | |
231 | abort: no mutable changeset to change |
|
231 | abort: no mutable changeset to change | |
232 |
[ |
|
232 | [10] | |
233 |
|
233 | |||
234 | Make working copy clean: |
|
234 | Make working copy clean: | |
235 |
|
235 | |||
@@ -267,7 +267,7 b' Merge commit will not be changed:' | |||||
267 | $ echo 2 >> m2 |
|
267 | $ echo 2 >> m2 | |
268 | $ hg absorb --apply-changes |
|
268 | $ hg absorb --apply-changes | |
269 | abort: cannot absorb into a merge |
|
269 | abort: cannot absorb into a merge | |
270 |
[ |
|
270 | [10] | |
271 | $ hg revert -q -C m1 m2 |
|
271 | $ hg revert -q -C m1 m2 | |
272 |
|
272 | |||
273 | Use a new repo: |
|
273 | Use a new repo: |
General Comments 0
You need to be logged in to leave comments.
Login now