Patchwork D8725: rebase: remove now unnecessary logic to allow empty commit when branch changes

login
register
mail settings
Submitter phabricator
Date July 10, 2020, 10:50 a.m.
Message ID <differential-rev-PHID-DREV-cfrttvhjpji3rlst2y5j-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46688/
State Superseded
Headers show

Comments

phabricator - July 10, 2020, 10:50 a.m.
mjacob created this revision.
Herald added a reviewer: martinvonz.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This was a workaround for a bug in the empty commit check in repo.commit(),
  where the the parent branch name was incorrectly compared with the wdir branch
  name instead of the branch name passed via `extra`.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8725

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: mjacob, martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -529,11 +529,8 @@ 
         extra = {b'rebase_source': ctx.hex()}
         for c in self.extrafns:
             c(ctx, extra)
-        keepbranch = self.keepbranchesf and repo[p1].branch() != ctx.branch()
         destphase = max(ctx.phase(), phases.draft)
         overrides = {(b'phases', b'new-commit'): destphase}
-        if keepbranch:
-            overrides[(b'ui', b'allowemptycommit')] = True
         with repo.ui.configoverride(overrides, b'rebase'):
             if self.inmemory:
                 newnode = commitmemorynode(