Patchwork D6223: overlayworkingctx: fix file/dir audit to be repo-relative

login
register
mail settings
Submitter phabricator
Date April 11, 2019, 12:51 a.m.
Message ID <differential-rev-PHID-DREV-2fsyjhiqzch7emqnixft-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39553/
State Superseded
Headers show

Comments

phabricator - April 11, 2019, 12:51 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Before this patch, test-rebase-inmemory.t would stop erroring out
  about the conflict if you added a "cd a" before line 252. That was
  because a glob matcher (which are relative) was unintentionally
  used. That happened because the matcher was given "include" patterns
  (not regular patterns), and "include" patterns are always glob by
  default (i.e. unless you write them including the kind prefix). IOW,
  the "default='path'" argument passed to ctx.match() was ignored.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6223

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1954,7 +1954,7 @@ 
 
         # Test the other direction -- that this path from p2 isn't a directory
         # in p1 (test that p1 doesn't have any paths matching `path/*`).
-        match = self.match(include=[path + '/'], default=b'path')
+        match = self.match([path + '/'], default=b'path')
         matches = self.p1().manifest().matches(match)
         mfiles = matches.keys()
         if len(mfiles) > 0: