Patchwork D9031: mergestate: make some callers not pass pointless node argument

login
register
mail settings
Submitter phabricator
Date Sept. 17, 2020, 8:11 p.m.
Message ID <differential-rev-PHID-DREV-sxvl54zzkiawf6stecig-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47197/
State Superseded
Headers show

Comments

phabricator - Sept. 17, 2020, 8:11 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The node argument is set on the created `mergestate` instance, but
  these callers don't even look at that instance.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/strip.py
  mercurial/localrepo.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2489,7 +2489,7 @@ 
                 ui.status(
                     _(b'working directory now based on revision %d\n') % parents
                 )
-            mergestatemod.mergestate.clean(self, self[b'.'].node())
+            mergestatemod.mergestate.clean(self)
 
         # TODO: if we know which new heads may result from this rollback, pass
         # them to destroy(), which will prevent the branchhead cache from being
diff --git a/hgext/strip.py b/hgext/strip.py
--- a/hgext/strip.py
+++ b/hgext/strip.py
@@ -269,7 +269,7 @@ 
             repo.dirstate.write(repo.currenttransaction())
 
             # clear resolve state
-            mergestatemod.mergestate.clean(repo, repo[b'.'].node())
+            mergestatemod.mergestate.clean(repo)
 
             update = False