Patchwork [8,of,8] merge: move checking of unknown files out of manifestmerge()

login
register
mail settings
Submitter Martin von Zweigbergk
Date Dec. 23, 2014, 12:33 a.m.
Message ID <0da4aa055f64bfff381c.1419294822@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/7206/
State Accepted
Commit d3e137c91f94d4d9062a62945e90ff2396fea0b0
Headers show

Comments

Martin von Zweigbergk - Dec. 23, 2014, 12:33 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1418923329 28800
#      Thu Dec 18 09:22:09 2014 -0800
# Node ID 0da4aa055f64bfff381c3b1ac069085c65d41702
# Parent  5fd29e7725ee24e77194b781b701dfc4d1810e9d
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.
Matt Mackall - Dec. 23, 2014, 7:29 p.m.
On Mon, 2014-12-22 at 16:33 -0800, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1418923329 28800
> #      Thu Dec 18 09:22:09 2014 -0800
> # Node ID 0da4aa055f64bfff381c3b1ac069085c65d41702
> # Parent  5fd29e7725ee24e77194b781b701dfc4d1810e9d
> merge: move checking of unknown files out of manifestmerge()

These are queued for default, thanks.

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -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