Comments
Patch
@@ -887,6 +887,8 @@
if len(parents) != 1:
return False
pctx = parents[0]
+ if ctx.branch() != pctx.branch():
+ return False
# ctx changes more files (not a subset of memworkingcopy)
if not set(ctx.files()).issubset(set(memworkingcopy)):
return False
@@ -525,3 +525,31 @@
a: 1 of 1 chunk(s) applied
$ hg id
bfafb49242db tip
+
+ $ cd ..
+ $ hg init repo6
+ $ cd repo6
+ $ echo a1 > a
+ $ touch b
+ $ hg commit -m a -A a b
+ $ hg branch foo -q
+ $ echo b > b
+ $ hg commit -m foo # will become empty
+ $ hg branch bar -q
+ $ hg commit -m bar # is already empty
+ $ echo a2 > a
+ $ echo -n '' > b
+ $ hg absorb --apply-changes --verbose | grep became
+ 0:0cde1ae39321: 1 file(s) changed, became 3:fc7fcdd90fdb
+ 1:795dfb1adcef: 2 file(s) changed, became 4:a8740537aa53
+ 2:b02935f68891: 2 file(s) changed, became 5:59533e01c707
+ $ hg log -T '{rev} (branch: {branch}) {desc}\n' -G --stat
+ @ 5 (branch: bar) bar
+ |
+ o 4 (branch: foo) foo
+ |
+ o 3 (branch: default) a
+ a | 1 +
+ b | 0
+ 2 files changed, 1 insertions(+), 0 deletions(-)
+