changeset 38750:a8bfaf592033 stable

doctest: convert matcher root to native path Otherwise it wouldn't be caught by a fast path of pathutil.canonpath(), and fall back to file identity checks.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 28 Jul 2018 16:36:35 +0900
parents 0c5d131fa428
children 71d6886d27cf
files mercurial/match.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/match.py	Mon Jul 30 21:26:55 2018 +0900
+++ b/mercurial/match.py	Sat Jul 28 16:36:35 2018 +0900
@@ -692,7 +692,7 @@
     The prefix path should usually be the relative path from the root of
     this matcher to the root of the wrapped matcher.
 
-    >>> m1 = match(b'root/d/e', b'f', [b'../a.txt', b'b.txt'])
+    >>> m1 = match(util.localpath(b'root/d/e'), b'f', [b'../a.txt', b'b.txt'])
     >>> m2 = prefixdirmatcher(b'root', b'd/e/f', b'd/e', m1)
     >>> bool(m2(b'a.txt'),)
     False