From patchwork Thu Sep 26 11:32:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D6883: update: clarify calculateupdate() call sites by specifying argument names From: phabricator X-Patchwork-Id: 41776 Message-Id: <5c273593bcf53ba3de4a12aff76f4727@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 26 Sep 2019 11:32:17 +0000 Closed by commit rHGb4093d1d3b18: update: clarify calculateupdate() call sites by specifying argument names (authored by martinvonz). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6883?vs=16621&id=16626 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6883/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6883 AFFECTED FILES contrib/perf.py hgext/convert/hg.py hgext/histedit.py CHANGE DETAILS To: martinvonz, durin42, #hg-reviewers, pulkit Cc: mercurial-devel diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1986,11 +1986,8 @@ repo, wctx, c, ancs, # These parameters were determined by print-debugging # what happens later on inside histedit. - False, # branchmerge - False, # force - False, # acceptremote - False, # followcopies - ) + branchmerge=False, force=False, acceptremote=False, + followcopies=False) except error.Abort: raise error.Abort( _("untracked files in working directory conflict with files in %s") % ( diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py --- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -204,12 +204,8 @@ anc = [p1ctx.ancestor(p2ctx)] # Calculate what files are coming from p2 actions, diverge, rename = mergemod.calculateupdates( - self.repo, p1ctx, p2ctx, anc, - True, # branchmerge - True, # force - False, # acceptremote - False, # followcopies - ) + self.repo, p1ctx, p2ctx, anc, branchmerge=True, + force=True, acceptremote=False, followcopies=False) for file, (action, info, msg) in actions.iteritems(): if source.targetfilebelongstosource(file): diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -1030,8 +1030,9 @@ def d(): # acceptremote is True because we don't want prompts in the middle of # our benchmark - merge.calculateupdates(repo, wctx, rctx, [ancestor], False, False, - acceptremote=True, followcopies=True) + merge.calculateupdates(repo, wctx, rctx, [ancestor], branchmerge=False, + force=False, acceptremote=True, + followcopies=True) timer(d) fm.end()