annotate tests/test-walk.t @ 36043:223ed0b53f08

py3: more robustly cast UUID to bytes The UUID type only has __str__ implemented. So we need to cast to bytes on Python 3. We need an actual bytes instance here (bytestr won't do) because the re.escape() later iterates over characters and characters need to behave like ints, not bytes instances of length 1. Differential Revision: https://phab.mercurial-scm.org/D2144
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 11 Feb 2018 13:23:26 -0800
parents 3790d735ff68
children deb851914fd7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13910
diff changeset
1 $ hg init t
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
2 $ cd t
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
3 $ mkdir -p beans
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
4 $ for b in kidney navy turtle borlotti black pinto; do
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
5 > echo $b > beans/$b
19873
b3de50b0c7aa check-code: check that '>' is used for continued lines
Mads Kiilerich <madski@unity3d.com>
parents: 18682
diff changeset
6 > done
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
7 $ mkdir -p mammals/Procyonidae
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
8 $ for m in cacomistle coatimundi raccoon; do
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
9 > echo $m > mammals/Procyonidae/$m
19873
b3de50b0c7aa check-code: check that '>' is used for continued lines
Mads Kiilerich <madski@unity3d.com>
parents: 18682
diff changeset
10 > done
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
11 $ echo skunk > mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
12 $ echo fennel > fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
13 $ echo fenugreek > fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
14 $ echo fiddlehead > fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
15 $ hg addremove
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
16 adding beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
17 adding beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
18 adding beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
19 adding beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
20 adding beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
21 adding beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
22 adding fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
23 adding fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
24 adding fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
25 adding mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
26 adding mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
27 adding mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
28 adding mammals/skunk
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 11903
diff changeset
29 $ hg commit -m "commit #0"
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
30
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
31 $ hg debugwalk
32553
20c9f3ecc192 match: handle everything-matching using new alwaysmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32504
diff changeset
32 matcher: <alwaysmatcher>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
33 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
34 f beans/borlotti beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
35 f beans/kidney beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
36 f beans/navy beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
37 f beans/pinto beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
38 f beans/turtle beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
39 f fennel fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
40 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
41 f fiddlehead fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
42 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
43 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
44 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
45 f mammals/skunk mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
46 $ hg debugwalk -I.
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
47 matcher: <includematcher includes='(?:)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
48 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
49 f beans/borlotti beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
50 f beans/kidney beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
51 f beans/navy beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
52 f beans/pinto beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
53 f beans/turtle beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
54 f fennel fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
55 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
56 f fiddlehead fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
57 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
58 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
59 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
60 f mammals/skunk mammals/skunk
889
0a06d9d373c3 Add unit tests for walk code.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
61
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
62 $ cd mammals
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
63 $ hg debugwalk
32553
20c9f3ecc192 match: handle everything-matching using new alwaysmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32504
diff changeset
64 matcher: <alwaysmatcher>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
65 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
66 f beans/borlotti ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
67 f beans/kidney ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
68 f beans/navy ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
69 f beans/pinto ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
70 f beans/turtle ../beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
71 f fennel ../fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
72 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
73 f fiddlehead ../fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
74 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
75 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
76 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
77 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
78 $ hg debugwalk -X ../beans
32553
20c9f3ecc192 match: handle everything-matching using new alwaysmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32504
diff changeset
79 matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?:beans(?:/|$))'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
80 f fennel ../fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
81 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
82 f fiddlehead ../fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
83 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
84 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
85 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
86 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
87 $ hg debugwalk -I '*k'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
88 matcher: <includematcher includes='(?:mammals\\/[^/]*k(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
89 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
90 $ hg debugwalk -I 'glob:*k'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
91 matcher: <includematcher includes='(?:mammals\\/[^/]*k(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
92 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
93 $ hg debugwalk -I 'relglob:*k'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
94 matcher: <includematcher includes='(?:(?:|.*/)[^/]*k(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
95 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
96 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
97 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
98 $ hg debugwalk -I 'relglob:*k' .
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
99 matcher: <intersectionmatcher m1=<patternmatcher patterns='(?:mammals(?:/|$))'>, m2=<includematcher includes='(?:(?:|.*/)[^/]*k(?:/|$))'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
100 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
101 $ hg debugwalk -I 're:.*k$'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
102 matcher: <includematcher includes='(?:.*k$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
103 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
104 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
105 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
106 $ hg debugwalk -I 'relre:.*k$'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
107 matcher: <includematcher includes='(?:.*.*k$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
108 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
109 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
110 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
111 $ hg debugwalk -I 'path:beans'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
112 matcher: <includematcher includes='(?:beans(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
113 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
114 f beans/borlotti ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
115 f beans/kidney ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
116 f beans/navy ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
117 f beans/pinto ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
118 f beans/turtle ../beans/turtle
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
119 $ hg debugwalk -I 'relpath:detour/../../beans'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
120 matcher: <includematcher includes='(?:beans(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
121 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
122 f beans/borlotti ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
123 f beans/kidney ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
124 f beans/navy ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
125 f beans/pinto ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
126 f beans/turtle ../beans/turtle
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
127
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
128 $ hg debugwalk 'rootfilesin:'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
129 matcher: <patternmatcher patterns='(?:[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
130 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
131 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
132 f fiddlehead ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
133 $ hg debugwalk -I 'rootfilesin:'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
134 matcher: <includematcher includes='(?:[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
135 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
136 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
137 f fiddlehead ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
138 $ hg debugwalk 'rootfilesin:.'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
139 matcher: <patternmatcher patterns='(?:[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
140 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
141 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
142 f fiddlehead ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
143 $ hg debugwalk -I 'rootfilesin:.'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
144 matcher: <includematcher includes='(?:[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
145 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
146 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
147 f fiddlehead ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
148 $ hg debugwalk -X 'rootfilesin:'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
149 matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?:[^/]+$)'>>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
150 f beans/black ../beans/black
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
151 f beans/borlotti ../beans/borlotti
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
152 f beans/kidney ../beans/kidney
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
153 f beans/navy ../beans/navy
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
154 f beans/pinto ../beans/pinto
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
155 f beans/turtle ../beans/turtle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
156 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
157 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
158 f mammals/Procyonidae/raccoon Procyonidae/raccoon
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
159 f mammals/skunk skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
160 $ hg debugwalk 'rootfilesin:fennel'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
161 matcher: <patternmatcher patterns='(?:fennel/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
162 $ hg debugwalk -I 'rootfilesin:fennel'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
163 matcher: <includematcher includes='(?:fennel/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
164 $ hg debugwalk 'rootfilesin:skunk'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
165 matcher: <patternmatcher patterns='(?:skunk/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
166 $ hg debugwalk -I 'rootfilesin:skunk'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
167 matcher: <includematcher includes='(?:skunk/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
168 $ hg debugwalk 'rootfilesin:beans'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
169 matcher: <patternmatcher patterns='(?:beans/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
170 f beans/black ../beans/black
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
171 f beans/borlotti ../beans/borlotti
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
172 f beans/kidney ../beans/kidney
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
173 f beans/navy ../beans/navy
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
174 f beans/pinto ../beans/pinto
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
175 f beans/turtle ../beans/turtle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
176 $ hg debugwalk -I 'rootfilesin:beans'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
177 matcher: <includematcher includes='(?:beans/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
178 f beans/black ../beans/black
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
179 f beans/borlotti ../beans/borlotti
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
180 f beans/kidney ../beans/kidney
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
181 f beans/navy ../beans/navy
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
182 f beans/pinto ../beans/pinto
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
183 f beans/turtle ../beans/turtle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
184 $ hg debugwalk 'rootfilesin:mammals'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
185 matcher: <patternmatcher patterns='(?:mammals/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
186 f mammals/skunk skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
187 $ hg debugwalk -I 'rootfilesin:mammals'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
188 matcher: <includematcher includes='(?:mammals/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
189 f mammals/skunk skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
190 $ hg debugwalk 'rootfilesin:mammals/'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
191 matcher: <patternmatcher patterns='(?:mammals/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
192 f mammals/skunk skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
193 $ hg debugwalk -I 'rootfilesin:mammals/'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
194 matcher: <includematcher includes='(?:mammals/[^/]+$)'>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
195 f mammals/skunk skunk
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
196 $ hg debugwalk -X 'rootfilesin:mammals'
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
197 matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?:mammals/[^/]+$)'>>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
198 f beans/black ../beans/black
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
199 f beans/borlotti ../beans/borlotti
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
200 f beans/kidney ../beans/kidney
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
201 f beans/navy ../beans/navy
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
202 f beans/pinto ../beans/pinto
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
203 f beans/turtle ../beans/turtle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
204 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
205 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
206 f fiddlehead ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
207 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
208 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
209 f mammals/Procyonidae/raccoon Procyonidae/raccoon
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
210
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
211 $ hg debugwalk .
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
212 matcher: <patternmatcher patterns='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
213 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
214 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
215 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
216 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
217 $ hg debugwalk -I.
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
218 matcher: <includematcher includes='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
219 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
220 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
221 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
222 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
223 $ hg debugwalk Procyonidae
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
224 matcher: <patternmatcher patterns='(?:mammals\\/Procyonidae(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
225 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
226 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
227 f mammals/Procyonidae/raccoon Procyonidae/raccoon
4191
02de0f98ca33 make the output of test-walk more readable
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4190
diff changeset
228
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
229 $ cd Procyonidae
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
230 $ hg debugwalk .
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
231 matcher: <patternmatcher patterns='(?:mammals\\/Procyonidae(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
232 f mammals/Procyonidae/cacomistle cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
233 f mammals/Procyonidae/coatimundi coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
234 f mammals/Procyonidae/raccoon raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
235 $ hg debugwalk ..
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
236 matcher: <patternmatcher patterns='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
237 f mammals/Procyonidae/cacomistle cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
238 f mammals/Procyonidae/coatimundi coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
239 f mammals/Procyonidae/raccoon raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
240 f mammals/skunk ../skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
241 $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
242
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
243 $ hg debugwalk ../beans
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
244 matcher: <patternmatcher patterns='(?:beans(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
245 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
246 f beans/borlotti ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
247 f beans/kidney ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
248 f beans/navy ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
249 f beans/pinto ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
250 f beans/turtle ../beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
251 $ hg debugwalk .
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
252 matcher: <patternmatcher patterns='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
253 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
254 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
255 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
256 f mammals/skunk skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
257 $ hg debugwalk .hg
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
258 abort: path 'mammals/.hg' is inside nested repo 'mammals'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
259 [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
260 $ hg debugwalk ../.hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
261 abort: path contains illegal component: .hg
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
262 [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
263 $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
264
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
265 $ hg debugwalk -Ibeans
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
266 matcher: <includematcher includes='(?:beans(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
267 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
268 f beans/borlotti beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
269 f beans/kidney beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
270 f beans/navy beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
271 f beans/pinto beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
272 f beans/turtle beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
273 $ hg debugwalk -I '{*,{b,m}*/*}k'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
274 matcher: <includematcher includes='(?:(?:[^/]*|(?:b|m)[^/]*\\/[^/]*)k(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
275 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
276 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
277 f mammals/skunk mammals/skunk
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
278 $ hg debugwalk -Ibeans mammals
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
279 matcher: <intersectionmatcher m1=<patternmatcher patterns='(?:mammals(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
280 $ hg debugwalk -Inon-existent
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
281 matcher: <includematcher includes='(?:non\\-existent(?:/|$))'>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
282 $ hg debugwalk -Inon-existent -Ibeans/black
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
283 matcher: <includematcher includes='(?:non\\-existent(?:/|$)|beans\\/black(?:/|$))'>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
284 f beans/black beans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
285 $ hg debugwalk -Ibeans beans/black
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
286 matcher: <intersectionmatcher m1=<patternmatcher patterns='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
287 f beans/black beans/black exact
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
288 $ hg debugwalk -Ibeans/black beans
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
289 matcher: <intersectionmatcher m1=<patternmatcher patterns='(?:beans(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
290 f beans/black beans/black
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
291 $ hg debugwalk -Xbeans/black beans
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
292 matcher: <differencematcher m1=<patternmatcher patterns='(?:beans(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
293 f beans/borlotti beans/borlotti
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
294 f beans/kidney beans/kidney
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
295 f beans/navy beans/navy
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
296 f beans/pinto beans/pinto
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
297 f beans/turtle beans/turtle
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
298 $ hg debugwalk -Xbeans/black -Ibeans
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
299 matcher: <differencematcher m1=<includematcher includes='(?:beans(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
300 f beans/borlotti beans/borlotti
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
301 f beans/kidney beans/kidney
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
302 f beans/navy beans/navy
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
303 f beans/pinto beans/pinto
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
304 f beans/turtle beans/turtle
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
305 $ hg debugwalk -Xbeans/black beans/black
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
306 matcher: <differencematcher m1=<patternmatcher patterns='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
307 f beans/black beans/black exact
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
308 $ hg debugwalk -Xbeans/black -Ibeans/black
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
309 matcher: <differencematcher m1=<includematcher includes='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans\\/black(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
310 $ hg debugwalk -Xbeans beans/black
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
311 matcher: <differencematcher m1=<patternmatcher patterns='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
312 f beans/black beans/black exact
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
313 $ hg debugwalk -Xbeans -Ibeans/black
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
314 matcher: <differencematcher m1=<includematcher includes='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
315 $ hg debugwalk 'glob:mammals/../beans/b*'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
316 matcher: <patternmatcher patterns='(?:beans\\/b[^/]*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
317 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
318 f beans/borlotti beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
319 $ hg debugwalk '-X*/Procyonidae' mammals
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
320 matcher: <differencematcher m1=<patternmatcher patterns='(?:mammals(?:/|$))'>, m2=<includematcher includes='(?:[^/]*\\/Procyonidae(?:/|$))'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
321 f mammals/skunk mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
322 $ hg debugwalk path:mammals
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
323 matcher: <patternmatcher patterns='(?:mammals(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
324 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
325 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
326 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
327 f mammals/skunk mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
328 $ hg debugwalk ..
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
329 abort: .. not under root '$TESTTMP/t'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
330 [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
331 $ hg debugwalk beans/../..
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
332 abort: beans/../.. not under root '$TESTTMP/t'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
333 [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
334 $ hg debugwalk .hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
335 abort: path contains illegal component: .hg
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
336 [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
337 $ hg debugwalk beans/../.hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
338 abort: path contains illegal component: .hg
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
339 [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
340 $ hg debugwalk beans/../.hg/data
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
341 abort: path contains illegal component: .hg/data
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
342 [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
343 $ hg debugwalk beans/.hg
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
344 abort: path 'beans/.hg' is inside nested repo 'beans'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
345 [255]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
346
35659
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
347 Test explicit paths and excludes:
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
348 (BROKEN: nothing should be included, but wctx.walk() does)
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
349
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
350 $ hg debugwalk fennel -X fennel
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
351 matcher: <differencematcher m1=<patternmatcher patterns='(?:fennel(?:/|$))'>, m2=<includematcher includes='(?:fennel(?:/|$))'>>
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
352 f fennel fennel exact
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
353 $ hg debugwalk fennel -X 'f*'
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
354 matcher: <differencematcher m1=<patternmatcher patterns='(?:fennel(?:/|$))'>, m2=<includematcher includes='(?:f[^/]*(?:/|$))'>>
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
355 f fennel fennel exact
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
356 $ hg debugwalk beans/black -X 'path:beans'
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
357 matcher: <differencematcher m1=<patternmatcher patterns='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
358 f beans/black beans/black exact
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
359 $ hg debugwalk -I 'path:beans/black' -X 'path:beans'
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
360 matcher: <differencematcher m1=<includematcher includes='(?:beans\\/black(?:/|$))'>, m2=<includematcher includes='(?:beans(?:/|$))'>>
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
361
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
362 Test absolute paths:
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
363
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
364 $ hg debugwalk `pwd`/beans
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
365 matcher: <patternmatcher patterns='(?:beans(?:/|$))'>
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
366 f beans/black beans/black
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
367 f beans/borlotti beans/borlotti
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
368 f beans/kidney beans/kidney
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
369 f beans/navy beans/navy
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
370 f beans/pinto beans/pinto
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
371 f beans/turtle beans/turtle
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
372 $ hg debugwalk `pwd`/..
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
373 abort: $TESTTMP/t/.. not under root '$TESTTMP/t'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
374 [255]
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
375
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
376 Test patterns:
6032
b41f0d6a74fc dirstate: don't walk ignored directories
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4309
diff changeset
377
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
378 $ hg debugwalk glob:\*
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
379 matcher: <patternmatcher patterns='(?:[^/]*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
380 f fennel fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
381 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
382 f fiddlehead fiddlehead
16983
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
383 #if eol-in-paths
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
384 $ echo glob:glob > glob:glob
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
385 $ hg addremove
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
386 adding glob:glob
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
387 warning: filename contains ':', which is reserved on Windows: 'glob:glob'
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
388 $ hg debugwalk glob:\*
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
389 matcher: <patternmatcher patterns='(?:[^/]*$)'>
16983
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
390 f fennel fennel
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
391 f fenugreek fenugreek
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
392 f fiddlehead fiddlehead
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
393 f glob:glob glob:glob
16984
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
394 $ hg debugwalk glob:glob
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
395 matcher: <patternmatcher patterns='(?:glob$)'>
35230
feecfefeba25 tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages
Matt Harbison <matt_harbison@yahoo.com>
parents: 33357
diff changeset
396 glob: $ENOENT$
16984
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
397 $ hg debugwalk glob:glob:glob
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
398 matcher: <patternmatcher patterns='(?:glob\\:glob$)'>
16984
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
399 f glob:glob glob:glob exact
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
400 $ hg debugwalk path:glob:glob
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
401 matcher: <patternmatcher patterns='(?:glob\\:glob(?:/|$))'>
16984
6932e85c5c95 tests: better testing of 'glob:glob' in test-walk.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16983
diff changeset
402 f glob:glob glob:glob exact
16983
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
403 $ rm glob:glob
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
404 $ hg addremove
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
405 removing glob:glob
13cdc10929d1 tests: move tests in test-walk.t using ':' in filenames to conditional section
Mads Kiilerich <mads@kiilerich.com>
parents: 16972
diff changeset
406 #endif
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
407
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
408 $ hg debugwalk 'glob:**e'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
409 matcher: <patternmatcher patterns='(?:.*e$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
410 f beans/turtle beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
411 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
412
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
413 $ hg debugwalk 're:.*[kb]$'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
414 matcher: <patternmatcher patterns='(?:.*[kb]$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
415 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
416 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
417 f mammals/skunk mammals/skunk
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
418
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
419 $ hg debugwalk path:beans/black
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
420 matcher: <patternmatcher patterns='(?:beans\\/black(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
421 f beans/black beans/black exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
422 $ hg debugwalk path:beans//black
33357
a21819f439fe match: remove unnecessary '^' from regexes
Martin von Zweigbergk <martinvonz@google.com>
parents: 32553
diff changeset
423 matcher: <patternmatcher patterns='(?:beans\\/black(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
424 f beans/black beans/black exact
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
425
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
426 $ hg debugwalk relglob:Procyonidae
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
427 matcher: <patternmatcher patterns='(?:(?:|.*/)Procyonidae$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
428 $ hg debugwalk 'relglob:Procyonidae/**'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
429 matcher: <patternmatcher patterns='(?:(?:|.*/)Procyonidae\\/.*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
430 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
431 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
432 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
433 $ hg debugwalk 'relglob:Procyonidae/**' fennel
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
434 matcher: <patternmatcher patterns='(?:(?:|.*/)Procyonidae\\/.*$|fennel(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
435 f fennel fennel exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
436 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
437 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
438 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
439 $ hg debugwalk beans 'glob:beans/*'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
440 matcher: <patternmatcher patterns='(?:beans(?:/|$)|beans\\/[^/]*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
441 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
442 f beans/borlotti beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
443 f beans/kidney beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
444 f beans/navy beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
445 f beans/pinto beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
446 f beans/turtle beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
447 $ hg debugwalk 'glob:mamm**'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
448 matcher: <patternmatcher patterns='(?:mamm.*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
449 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
450 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
451 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
452 f mammals/skunk mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
453 $ hg debugwalk 'glob:mamm**' fennel
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
454 matcher: <patternmatcher patterns='(?:mamm.*$|fennel(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
455 f fennel fennel exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
456 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
457 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
458 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
459 f mammals/skunk mammals/skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
460 $ hg debugwalk 'glob:j*'
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
461 matcher: <patternmatcher patterns='(?:j[^/]*$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
462 $ hg debugwalk NOEXIST
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
463 matcher: <patternmatcher patterns='(?:NOEXIST(?:/|$))'>
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 15444
diff changeset
464 NOEXIST: * (glob)
6032
b41f0d6a74fc dirstate: don't walk ignored directories
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4309
diff changeset
465
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
466 #if fifo
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
467 $ mkfifo fifo
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
468 $ hg debugwalk fifo
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
469 matcher: <patternmatcher patterns='(?:fifo(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
470 fifo: unsupported file type (type is fifo)
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
471 #endif
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
472
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
473 $ rm fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
474 $ hg debugwalk fenugreek
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
475 matcher: <patternmatcher patterns='(?:fenugreek(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
476 f fenugreek fenugreek exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
477 $ hg rm fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
478 $ hg debugwalk fenugreek
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
479 matcher: <patternmatcher patterns='(?:fenugreek(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
480 f fenugreek fenugreek exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
481 $ touch new
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
482 $ hg debugwalk new
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
483 matcher: <patternmatcher patterns='(?:new(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
484 f new new exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
485
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
486 $ mkdir ignored
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
487 $ touch ignored/file
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
488 $ echo '^ignored$' > .hgignore
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
489 $ hg debugwalk ignored
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
490 matcher: <patternmatcher patterns='(?:ignored(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
491 $ hg debugwalk ignored/file
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
492 matcher: <patternmatcher patterns='(?:ignored\\/file(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
493 f ignored/file ignored/file exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
494
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
495 Test listfile and listfile0
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
496
36015
3790d735ff68 py3: replace file() with open() in test-walk.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35659
diff changeset
497 $ $PYTHON -c "open('listfile0', 'wb').write(b'fenugreek\0new\0')"
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
498 $ hg debugwalk -I 'listfile0:listfile0'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
499 matcher: <includematcher includes='(?:fenugreek(?:/|$)|new(?:/|$))'>
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
500 f fenugreek fenugreek
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
501 f new new
36015
3790d735ff68 py3: replace file() with open() in test-walk.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35659
diff changeset
502 $ $PYTHON -c "open('listfile', 'wb').write(b'fenugreek\nnew\r\nmammals/skunk\n')"
16985
40c9aa702303 tests: run test-walk.t on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16984
diff changeset
503 $ hg debugwalk -I 'listfile:listfile'
32502
3026f19b4b01 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32501
diff changeset
504 matcher: <includematcher includes='(?:fenugreek(?:/|$)|new(?:/|$)|mammals\\/skunk(?:/|$))'>
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
505 f fenugreek fenugreek
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
506 f mammals/skunk mammals/skunk
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
507 f new new
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
508
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
509 $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
510 $ hg debugwalk -R t t/mammals/skunk
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
511 matcher: <patternmatcher patterns='(?:mammals\\/skunk(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
512 f mammals/skunk t/mammals/skunk exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
513 $ mkdir t2
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
514 $ cd t2
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
515 $ hg debugwalk -R ../t ../t/mammals/skunk
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
516 matcher: <patternmatcher patterns='(?:mammals\\/skunk(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
517 f mammals/skunk ../t/mammals/skunk exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
518 $ hg debugwalk --cwd ../t mammals/skunk
32504
2ba4d3b74ba8 match: remove support for includes from patternmatcher
Martin von Zweigbergk <martinvonz@google.com>
parents: 32502
diff changeset
519 matcher: <patternmatcher patterns='(?:mammals\\/skunk(?:/|$))'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
520 f mammals/skunk mammals/skunk exact
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15521
diff changeset
521
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15521
diff changeset
522 $ cd ..
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
523
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
524 Test split patterns on overflow
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
525
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
526 $ cd t
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
527 $ echo fennel > overflow.list
22947
c63a09b6b337 tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents: 21191
diff changeset
528 $ $PYTHON -c "for i in xrange(20000 / 100): print 'x' * 100" >> overflow.list
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
529 $ echo fenugreek >> overflow.list
32457
2def402bd16d debugwalk: also print matcher representation
Martin von Zweigbergk <martinvonz@google.com>
parents: 31012
diff changeset
530 $ hg debugwalk 'listfile:overflow.list' 2>&1 | egrep -v '(^matcher: |^xxx)'
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
531 f fennel fennel exact
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
532 f fenugreek fenugreek exact
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
533 $ cd ..