Mercurial > public > mercurial-scm > hg
diff hgext/absorb.py @ 44984:bfef35bb4ecb
absorb: preserve branch-closing changesets even if empty
This makes the behavior consistent with 'hg commit', which allows to create
otherwise empty changesets if they close the branch. A lost branch closure can
inadvertently re-open a branch, so it should be preserved.
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Mon, 01 Jun 2020 11:07:33 +0200 |
parents | 1b757f385549 |
children | 1ca0047fd7e1 |
line wrap: on
line diff
--- a/hgext/absorb.py Mon Jun 01 10:33:00 2020 +0200 +++ b/hgext/absorb.py Mon Jun 01 11:07:33 2020 +0200 @@ -889,6 +889,8 @@ pctx = parents[0] if ctx.branch() != pctx.branch(): return False + if ctx.extra().get(b'close'): + return False # ctx changes more files (not a subset of memworkingcopy) if not set(ctx.files()).issubset(set(memworkingcopy)): return False