Patchwork [4,of,6] match: add prefixdirmatcher to adapt subrepo matcher back

login
register
mail settings
Submitter Matt Harbison
Date July 27, 2018, 6:35 p.m.
Message ID <op.zmtpwutb9lwrgf@envy>
Download mbox | patch
Permalink /patch/32956/
State New
Headers show

Comments

Matt Harbison - July 27, 2018, 6:35 p.m.
On Sat, 07 Jul 2018 04:38:48 -0400, Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1528549447 -32400
> #      Sat Jun 09 22:04:07 2018 +0900
> # Node ID 609c30cc3b87da9523988402ad0a1ba8899411cc
> # Parent  f037e8dfa6c2047d0ef86efc2e83fece0fa08d80
> match: add prefixdirmatcher to adapt subrepo matcher back

This breaks test-doctest.py on Windows.  Any ideas?  I assumed it's a '/'  
vs '\' thing, but the little bit of playing around with it a couple weeks  
ago didn't yield any clues, and it looked like the code that gets called  
handles those differences.

Patch

--- c:/Users/Matt/projects/hg/tests/test-doctest.py.out
+++ c:/Users/Matt/projects/hg/tests/test-doctest.py.err
@@ -0,0 +1,142 @@ 
+**********************************************************************
+File "c:\Users\Matt\projects\hg\mercurial\match.py", line 696, in  
mercurial.match.prefixdirmatcher
+Failed example:
+    m1 = match(b'root/d/e', b'f', [b'../a.txt', b'b.txt'])
+Exception raised:
+    Traceback (most recent call last):
+      File "c:\Python27\lib\doctest.py", line 1315, in __run
+        compileflags, 1) in test.globs
+      File "<doctest mercurial.match.prefixdirmatcher[0]>", line 1, in  
<module>
+        m1 = match(b'root/d/e', b'f', [b'../a.txt', b'b.txt'])
+      File "c:\Users\Matt\projects\hg\mercurial\match.py", line 176, in  
match
+        kindpats = normalize(patterns, default, root, cwd, auditor, warn)
+      File "c:\Users\Matt\projects\hg\mercurial\match.py", line 223, in  
_donormalize
+        pat = pathutil.canonpath(root, cwd, pat, auditor)
+      File "c:\Users\Matt\projects\hg\mercurial\pathutil.py", line 236,  
in canonpath
+        hint=hint)
+    Abort: ../a.txt not under root 'root/d/e'
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel