From patchwork Thu Sep 17 20:11:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9031: mergestate: make some callers not pass pointless node argument From: phabricator X-Patchwork-Id: 47197 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 17 Sep 2020 20:11:06 +0000 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 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