changeset 23656:d3e137c91f94

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.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 18 Dec 2014 09:22:09 -0800
parents 79235b46062c
children 95f238cafb32
files mercurial/merge.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Sat Dec 13 23:52:22 2014 -0800
+++ b/mercurial/merge.py	Thu Dec 18 09:22:09 2014 -0800
@@ -543,8 +543,6 @@
                 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 @@
         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 @@
             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