comparison mercurial/match.py @ 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 760cc5dc01e8
children 5a7df82de142
comparison
equal deleted inserted replaced
38749:0c5d131fa428 38750:a8bfaf592033
690 traversedir) are ignored. 690 traversedir) are ignored.
691 691
692 The prefix path should usually be the relative path from the root of 692 The prefix path should usually be the relative path from the root of
693 this matcher to the root of the wrapped matcher. 693 this matcher to the root of the wrapped matcher.
694 694
695 >>> m1 = match(b'root/d/e', b'f', [b'../a.txt', b'b.txt']) 695 >>> m1 = match(util.localpath(b'root/d/e'), b'f', [b'../a.txt', b'b.txt'])
696 >>> m2 = prefixdirmatcher(b'root', b'd/e/f', b'd/e', m1) 696 >>> m2 = prefixdirmatcher(b'root', b'd/e/f', b'd/e', m1)
697 >>> bool(m2(b'a.txt'),) 697 >>> bool(m2(b'a.txt'),)
698 False 698 False
699 >>> bool(m2(b'd/e/a.txt')) 699 >>> bool(m2(b'd/e/a.txt'))
700 True 700 True