diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -253,7 +253,7 @@ def perfmergecalculate(ui, repo, rev, ** # acceptremote is True because we don't want prompts in the middle of # our benchmark merge.calculateupdates(repo, wctx, rctx, [ancestor], False, False, - False, acceptremote=True, followcopies=True) + acceptremote=True, followcopies=True) timer(d) fm.end() @@ -679,4 +679,3 @@ def perflrucache(ui, size=4, gets=10000, timer, fm = gettimer(ui, opts) timer(fn, title=title) fm.end() - diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py --- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -192,7 +192,6 @@ class mercurial_sink(converter_sink): self.repo, p1ctx, p2ctx, anc, True, # branchmerge True, # force - False, # partial False, # acceptremote False, # followcopies ) diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -458,11 +458,11 @@ def overridecheckunknownfile(origfn, rep # writing the files into the working copy and lfcommands.updatelfiles # will update the largefiles. def overridecalculateupdates(origfn, repo, p1, p2, pas, branchmerge, force, - partial, acceptremote, followcopies): + acceptremote, followcopies, matcher=None): overwrite = force and not branchmerge actions, diverge, renamedelete = origfn( - repo, p1, p2, pas, branchmerge, force, partial, acceptremote, - followcopies) + repo, p1, p2, pas, branchmerge, force, acceptremote, + followcopies, matcher=matcher) if overwrite: return actions, diverge, renamedelete diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -841,9 +841,13 @@ def _resolvetrivial(repo, wctx, mctx, an # remote did change but ended up with same content del actions[f] # don't get = keep local deleted -def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, partial, - acceptremote, followcopies): +def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, + acceptremote, followcopies, matcher=None): "Calculate the actions needed to merge mctx into wctx using ancestors" + if matcher is None or matcher.always(): + partial = False + else: + partial = matcher.matchfn if len(ancestors) == 1: # default actions, diverge, renamedelete = manifestmerge( @@ -1414,13 +1418,9 @@ def update(repo, node, branchmerge, forc followcopies = True ### calculate phase - if matcher is None or matcher.always(): - partial = False - else: - partial = matcher.matchfn actionbyfile, diverge, renamedelete = calculateupdates( - repo, wc, p2, pas, branchmerge, force, partial, mergeancestor, - followcopies) + repo, wc, p2, pas, branchmerge, force, mergeancestor, + followcopies, matcher=matcher) # Convert to dictionary-of-lists format actions = dict((m, []) for m in 'a am f g cd dc r dm dg m e k'.split()) for f, (m, args, msg) in actionbyfile.iteritems():