narrow: fix copies._fullcopytracing() narrowspec filtering in graft case stable
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 01 Nov 2018 16:32:16 -0700
branchstable
changeset 40450 07a66c1387d1
parent 40449 d049ee8eee00
child 40451 324ba8b14d78
narrow: fix copies._fullcopytracing() narrowspec filtering in graft case I broke this too in 707c3804e607 (narrow: move copies overrides to core, 2018-09-28). Hopefully I'm done fixing things broken by that commit now. Differential Revision: https://phab.mercurial-scm.org/D5213
mercurial/copies.py
tests/test-narrow-copies.t
--- a/mercurial/copies.py	Thu Nov 01 16:28:11 2018 -0700
+++ b/mercurial/copies.py	Thu Nov 01 16:32:16 2018 -0700
@@ -511,8 +511,9 @@
         # unmatched file from topological common ancestors (no DAG rotation)
         # need to recompute this for directory move handling when grafting
         mta = tca.manifest()
-        u1u, u2u = _computenonoverlap(repo, c1, c2, m1.filesnotin(mta),
-                                                    m2.filesnotin(mta),
+        u1u, u2u = _computenonoverlap(repo, c1, c2,
+                                      m1.filesnotin(mta, repo.narrowmatch()),
+                                      m2.filesnotin(mta, repo.narrowmatch()),
                                       baselabel='topological common ancestor')
 
     for f in u1u:
--- a/tests/test-narrow-copies.t	Thu Nov 01 16:28:11 2018 -0700
+++ b/tests/test-narrow-copies.t	Thu Nov 01 16:32:16 2018 -0700
@@ -71,5 +71,4 @@
   $ hg ci -Aqm 'add inside/f5'
   $ hg --config extensions.rebase= rebase -d 'public()' -r .
   rebasing 6:610b60178c28 "add inside/f5" (tip)
-  abort: data/outside/f3.i@54e53435331b: no match found!
-  [255]
+  saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/610b60178c28-65716a78-rebase.hg