changeset 40422:873f3682c8af stable

narrow: make copies.pathcopies() filter with narrowspec again I broke this in 707c3804e607 (narrow: move copies overrides to core, 2018-09-28). Differential Revision: https://phab.mercurial-scm.org/D5203
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 01 Nov 2018 13:20:12 -0700
parents f1c1b4d0e695
children d049ee8eee00
files mercurial/copies.py tests/test-narrow-copies.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/copies.py	Thu Nov 01 11:24:45 2018 -0700
+++ b/mercurial/copies.py	Thu Nov 01 13:20:12 2018 -0700
@@ -219,6 +219,7 @@
 def _forwardcopies(a, b, match=None):
     """find {dst@b: src@a} copy mapping where a is an ancestor of b"""
 
+    match = a.repo().narrowmatch(match)
     # check for working copy
     if b.rev() is None:
         if a == b.p1():
--- a/tests/test-narrow-copies.t	Thu Nov 01 11:24:45 2018 -0700
+++ b/tests/test-narrow-copies.t	Thu Nov 01 13:20:12 2018 -0700
@@ -62,5 +62,4 @@
   $ hg pull -q
   $ hg --config extensions.rebase= rebase -d tip
   rebasing 3:4f84b666728c "add inside/f4"
-  abort: data/outside/f3.i@54e53435331b: no match found!
-  [255]
+  saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/4f84b666728c-4269b76e-rebase.hg