Show More
@@ -0,0 +1,30 b'' | |||||
|
1 | $ cat >> $HGRCPATH << EOF | |||
|
2 | > [extensions] | |||
|
3 | > absorb= | |||
|
4 | > EOF | |||
|
5 | ||||
|
6 | Abort absorb if there is an unfinished operation. | |||
|
7 | ||||
|
8 | $ hg init abortunresolved | |||
|
9 | $ cd abortunresolved | |||
|
10 | ||||
|
11 | $ echo "foo1" > foo.whole | |||
|
12 | $ hg commit -Aqm "foo 1" | |||
|
13 | ||||
|
14 | $ hg update null | |||
|
15 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
16 | $ echo "foo2" > foo.whole | |||
|
17 | $ hg commit -Aqm "foo 2" | |||
|
18 | ||||
|
19 | $ hg --config extensions.rebase= rebase -r 1 -d 0 | |||
|
20 | rebasing 1:c3b6dc0e177a "foo 2" (tip) | |||
|
21 | merging foo.whole | |||
|
22 | warning: conflicts while merging foo.whole! (edit, then use 'hg resolve --mark') | |||
|
23 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |||
|
24 | [1] | |||
|
25 | ||||
|
26 | $ hg --config extensions.rebase= absorb | |||
|
27 | abort: rebase in progress | |||
|
28 | (use 'hg rebase --continue' or 'hg rebase --abort') | |||
|
29 | [255] | |||
|
30 |
@@ -682,7 +682,6 b' class fixupstate(object):' | |||||
682 |
|
682 | |||
683 | def commit(self): |
|
683 | def commit(self): | |
684 | """commit changes. update self.finalnode, self.replacemap""" |
|
684 | """commit changes. update self.finalnode, self.replacemap""" | |
685 | with self.repo.wlock(), self.repo.lock(): |
|
|||
686 |
|
|
685 | with self.repo.transaction('absorb') as tr: | |
687 |
|
|
686 | self._commitstack() | |
688 |
|
|
687 | self._movebookmarks(tr) | |
@@ -1006,6 +1005,11 b' def absorbcmd(ui, repo, *pats, **opts):' | |||||
1006 | Returns 0 on success, 1 if all chunks were ignored and nothing amended. |
|
1005 | Returns 0 on success, 1 if all chunks were ignored and nothing amended. | |
1007 | """ |
|
1006 | """ | |
1008 | opts = pycompat.byteskwargs(opts) |
|
1007 | opts = pycompat.byteskwargs(opts) | |
|
1008 | ||||
|
1009 | with repo.wlock(), repo.lock(): | |||
|
1010 | if not opts['dry_run']: | |||
|
1011 | cmdutil.checkunfinished(repo) | |||
|
1012 | ||||
1009 | state = absorb(ui, repo, pats=pats, opts=opts) |
|
1013 | state = absorb(ui, repo, pats=pats, opts=opts) | |
1010 | if sum(s[0] for s in state.chunkstats.values()) == 0: |
|
1014 | if sum(s[0] for s in state.chunkstats.values()) == 0: | |
1011 | return 1 |
|
1015 | return 1 |
General Comments 0
You need to be logged in to leave comments.
Login now