# HG changeset patch # User Martin von Zweigbergk # Date 2014-12-18 17:22:09 # Node ID d3e137c91f94d4d9062a62945e90ff2396fea0b0 # Parent 79235b46062c8bb227306242230ea47f912b6643 merge: move checking of unknown files out of manifestmerge() This moves most reading of filelogs out of manifestmerge, making it easy for a narrow clone extension to filter out or translate unwanted actions before any filelogs are read. The only call left is inside of copies.mergecopies(), which can be overridden separately at a lower level. diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -543,8 +543,6 @@ def manifestmerge(repo, wctx, p2, pa, br else: actions[f] = ('dc', (fl2,), "prompt deleted/changed") - _checkunknownfiles(repo, wctx, p2, force, actions) - return actions, diverge, renamedelete def _resolvetrivial(repo, wctx, mctx, ancestor, actions): @@ -567,6 +565,7 @@ def calculateupdates(repo, wctx, mctx, a actions, diverge, renamedelete = manifestmerge( repo, wctx, mctx, ancestors[0], branchmerge, force, partial, acceptremote, followcopies) + _checkunknownfiles(repo, wctx, mctx, force, actions) else: # only when merge.preferancestor=* - the default repo.ui.note( @@ -581,6 +580,7 @@ def calculateupdates(repo, wctx, mctx, a actions, diverge1, renamedelete1 = manifestmerge( repo, wctx, mctx, ancestor, branchmerge, force, partial, acceptremote, followcopies) + _checkunknownfiles(repo, wctx, mctx, force, actions) if diverge is None: # and renamedelete is None. # Arbitrarily pick warnings from first iteration diverge = diverge1