annotate tests/test-walk.t @ 51713:74f1bf147a6d

heptapod-ci: use new v2.1 image This is finally catching up to ~3 years of tech debt.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 23 Jul 2024 12:12:22 +0200
parents 7e5be4a7cda7
children
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
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
31 $ hg debugwalk -v
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
32 * matcher:
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
33 <alwaysmatcher>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
34 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
35 f beans/borlotti beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
36 f beans/kidney beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
37 f beans/navy beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
38 f beans/pinto beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
39 f beans/turtle beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
40 f fennel fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
41 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
42 f fiddlehead fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
43 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
44 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
45 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
46 f mammals/skunk mammals/skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
47 $ hg debugwalk -v -I.
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
48 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
49 <includematcher includes=''>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
50 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
51 f beans/borlotti beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
52 f beans/kidney beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
53 f beans/navy beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
54 f beans/pinto beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
55 f beans/turtle beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
56 f fennel fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
57 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
58 f fiddlehead fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
59 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
60 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
61 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
62 f mammals/skunk mammals/skunk
889
0a06d9d373c3 Add unit tests for walk code.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
63
50695
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
64 Test 'filepath:' pattern
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
65
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
66 $ hg debugwalk -v -I 'filepath:mammals/Procyonidae/cacomistle'
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
67 * matcher:
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
68 <includematcher includes=''>
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
69 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
70
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
71 $ hg debugwalk -v -I 'filepath:mammals/Procyonidae'
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
72 * matcher:
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
73 <includematcher includes=''>
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
74
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
75 $ hg debugwalk -v -X 'filepath:beans/borlotti'
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
76 * matcher:
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
77 <differencematcher
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
78 m1=<alwaysmatcher>,
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
79 m2=<includematcher includes=''>>
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
80 f beans/black beans/black
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
81 f beans/kidney beans/kidney
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
82 f beans/navy beans/navy
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
83 f beans/pinto beans/pinto
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
84 f beans/turtle beans/turtle
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
85 f fennel fennel
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
86 f fenugreek fenugreek
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
87 f fiddlehead fiddlehead
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
88 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
89 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
90 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
91 f mammals/skunk mammals/skunk
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
92
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
93 Test relative paths
1c31b343e514 match: add `filepath:` pattern to match an exact filepath relative to the root
Raphaël Gomès <rgomes@octobus.net>
parents: 50337
diff changeset
94
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
95 $ cd mammals
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
96 $ hg debugwalk -v
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
97 * matcher:
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
98 <alwaysmatcher>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
99 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
100 f beans/borlotti ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
101 f beans/kidney ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
102 f beans/navy ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
103 f beans/pinto ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
104 f beans/turtle ../beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
105 f fennel ../fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
106 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
107 f fiddlehead ../fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
108 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
109 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
110 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
111 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
112 $ hg debugwalk -v -X ../beans
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
113 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
114 <differencematcher
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
115 m1=<alwaysmatcher>,
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
116 m2=<includematcher includes='beans(?:/|$)'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
117 f fennel ../fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
118 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
119 f fiddlehead ../fiddlehead
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
120 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
121 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
122 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
123 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
124 $ hg debugwalk -v -I '*k'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
125 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
126 <includematcher includes='mammals/[^/]*k(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
127 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
128 $ hg debugwalk -v -I 'glob:*k'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
129 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
130 <includematcher includes='mammals/[^/]*k(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
131 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
132 $ hg debugwalk -v -I 'relglob:*k'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
133 * matcher:
42864
72890d8f9860 match: simplify the regexps created for glob patterns
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 40782
diff changeset
134 <includematcher includes='.*k(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
135 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
136 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
137 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
138 $ hg debugwalk -v -I 'relglob:*k' .
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
139 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
140 <intersectionmatcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
141 m1=<patternmatcher patterns='mammals(?:/|$)'>,
42864
72890d8f9860 match: simplify the regexps created for glob patterns
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 40782
diff changeset
142 m2=<includematcher includes='.*k(?:/|$)'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
143 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
144 $ hg debugwalk -v -I 're:.*k$'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
145 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
146 <includematcher includes='.*k$'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
147 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
148 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
149 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
150 $ hg debugwalk -v -I 'relre:.*k$'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
151 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
152 <includematcher includes='.*.*k$'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
153 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
154 f fenugreek ../fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
155 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
156 $ hg debugwalk -v -I 'path:beans'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
157 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
158 <includematcher includes='beans(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
159 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
160 f beans/borlotti ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
161 f beans/kidney ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
162 f beans/navy ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
163 f beans/pinto ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
164 f beans/turtle ../beans/turtle
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
165 $ hg debugwalk -v -I 'relpath:detour/../../beans'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
166 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
167 <includematcher includes='beans(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
168 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
169 f beans/borlotti ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
170 f beans/kidney ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
171 f beans/navy ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
172 f beans/pinto ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
173 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
174
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
175 $ hg debugwalk -v 'rootfilesin:'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
176 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
177 <patternmatcher patterns="rootfilesin: ['.']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
178 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
179 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
180 f fiddlehead ../fiddlehead
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
181 $ hg debugwalk -v -I 'rootfilesin:'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
182 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
183 <includematcher includes="rootfilesin: ['.']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
184 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
185 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
186 f fiddlehead ../fiddlehead
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
187 $ hg debugwalk -v 'rootfilesin:.'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
188 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
189 <patternmatcher patterns="rootfilesin: ['.']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
190 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
191 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
192 f fiddlehead ../fiddlehead
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
193 $ hg debugwalk -v -I 'rootfilesin:.'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
194 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
195 <includematcher includes="rootfilesin: ['.']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
196 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
197 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
198 f fiddlehead ../fiddlehead
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
199 $ hg debugwalk -v -X 'rootfilesin:'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
200 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
201 <differencematcher
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
202 m1=<alwaysmatcher>,
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
203 m2=<includematcher includes="rootfilesin: ['.']">>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
204 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
205 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
206 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
207 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
208 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
209 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
210 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
211 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
212 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
213 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
214 $ hg debugwalk -v 'rootfilesin:fennel'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
215 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
216 <patternmatcher patterns="rootfilesin: ['fennel']">
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
217 $ hg debugwalk -v -I 'rootfilesin:fennel'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
218 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
219 <includematcher includes="rootfilesin: ['fennel']">
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
220 $ hg debugwalk -v 'rootfilesin:skunk'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
221 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
222 <patternmatcher patterns="rootfilesin: ['skunk']">
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
223 $ hg debugwalk -v -I 'rootfilesin:skunk'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
224 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
225 <includematcher includes="rootfilesin: ['skunk']">
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
226 $ hg debugwalk -v 'rootfilesin:beans'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
227 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
228 <patternmatcher patterns="rootfilesin: ['beans']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
229 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
230 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
231 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
232 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
233 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
234 f beans/turtle ../beans/turtle
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
235 $ hg debugwalk -v -I 'rootfilesin:beans'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
236 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
237 <includematcher includes="rootfilesin: ['beans']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
238 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
239 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
240 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
241 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
242 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
243 f beans/turtle ../beans/turtle
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
244 $ hg debugwalk -v 'rootfilesin:mammals'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
245 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
246 <patternmatcher patterns="rootfilesin: ['mammals']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
247 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
248 $ hg debugwalk -v -I 'rootfilesin:mammals'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
249 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
250 <includematcher includes="rootfilesin: ['mammals']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
251 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
252 $ hg debugwalk -v 'rootfilesin:mammals/'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
253 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
254 <patternmatcher patterns="rootfilesin: ['mammals']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
255 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
256 $ hg debugwalk -v -I 'rootfilesin:mammals/'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
257 * matcher:
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
258 <includematcher includes="rootfilesin: ['mammals']">
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
259 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
260 $ hg debugwalk -v -X 'rootfilesin:mammals'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
261 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
262 <differencematcher
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
263 m1=<alwaysmatcher>,
40242
19ed212de2d1 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
264 m2=<includematcher includes="rootfilesin: ['mammals']">>
31012
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
265 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
266 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
267 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
268 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
269 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
270 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
271 f fennel ../fennel
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
272 f fenugreek ../fenugreek
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
273 f fiddlehead ../fiddlehead
88358446da16 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com>
parents: 25217
diff changeset
274 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
275 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
276 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
277
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
278 $ hg debugwalk -v .
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
279 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
280 <patternmatcher patterns='mammals(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
281 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
282 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
283 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
284 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
285 $ hg debugwalk -v -I.
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
286 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
287 <includematcher includes='mammals(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
288 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
289 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
290 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
291 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
292 $ hg debugwalk -v Procyonidae
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
293 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
294 <patternmatcher patterns='mammals/Procyonidae(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
295 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
296 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
297 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
298
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
299 $ cd Procyonidae
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
300 $ hg debugwalk -v .
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
301 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
302 <patternmatcher patterns='mammals/Procyonidae(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
303 f mammals/Procyonidae/cacomistle cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
304 f mammals/Procyonidae/coatimundi coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
305 f mammals/Procyonidae/raccoon raccoon
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
306 $ hg debugwalk -v ..
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
307 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
308 <patternmatcher patterns='mammals(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
309 f mammals/Procyonidae/cacomistle cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
310 f mammals/Procyonidae/coatimundi coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
311 f mammals/Procyonidae/raccoon raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
312 f mammals/skunk ../skunk
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
313 $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
314
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
315 $ hg debugwalk -v ../beans
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
316 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
317 <patternmatcher patterns='beans(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
318 f beans/black ../beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
319 f beans/borlotti ../beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
320 f beans/kidney ../beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
321 f beans/navy ../beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
322 f beans/pinto ../beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
323 f beans/turtle ../beans/turtle
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
324 $ hg debugwalk -v .
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
325 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
326 <patternmatcher patterns='mammals(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
327 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
328 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
329 f mammals/Procyonidae/raccoon Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
330 f mammals/skunk skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
331 $ hg debugwalk -v .hg
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
332 abort: path 'mammals/.hg' is inside nested repo 'mammals'
48369
35f1ecd84bd0 errors: use detailed exit code in pathauditor
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
333 [10]
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
334 $ hg debugwalk -v ../.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
48369
35f1ecd84bd0 errors: use detailed exit code in pathauditor
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
336 [10]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
337 $ cd ..
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
338
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
339 $ hg debugwalk -v -Ibeans
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
340 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
341 <includematcher includes='beans(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
342 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
343 f beans/borlotti beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
344 f beans/kidney beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
345 f beans/navy beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
346 f beans/pinto beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
347 f beans/turtle beans/turtle
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
348 $ hg debugwalk -v -I '{*,{b,m}*/*}k'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
349 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
350 <includematcher includes='(?:[^/]*|(?:b|m)[^/]*/[^/]*)k(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
351 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
352 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
353 f mammals/skunk mammals/skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
354 $ hg debugwalk -v -Ibeans mammals
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
355 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
356 <intersectionmatcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
357 m1=<patternmatcher patterns='mammals(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
358 m2=<includematcher includes='beans(?:/|$)'>>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
359 $ hg debugwalk -v -Inon-existent
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
360 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
361 <includematcher includes='non\\-existent(?:/|$)'>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
362 $ hg debugwalk -v -Inon-existent -Ibeans/black
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
363 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
364 <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
365 f beans/black beans/black
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
366 $ hg debugwalk -v -Ibeans beans/black
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
367 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
368 <intersectionmatcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
369 m1=<patternmatcher patterns='beans/black(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
370 m2=<includematcher includes='beans(?:/|$)'>>
25217
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
371 f beans/black beans/black exact
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
372 $ hg debugwalk -v -Ibeans/black beans
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
373 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
374 <intersectionmatcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
375 m1=<patternmatcher patterns='beans(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
376 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
377 f beans/black beans/black
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
378 $ hg debugwalk -v -Xbeans/black beans
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
379 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
380 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
381 m1=<patternmatcher patterns='beans(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
382 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
383 f beans/borlotti beans/borlotti
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
384 f beans/kidney beans/kidney
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
385 f beans/navy beans/navy
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
386 f beans/pinto beans/pinto
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
387 f beans/turtle beans/turtle
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
388 $ hg debugwalk -v -Xbeans/black -Ibeans
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
389 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
390 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
391 m1=<includematcher includes='beans(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
392 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
393 f beans/borlotti beans/borlotti
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
394 f beans/kidney beans/kidney
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
395 f beans/navy beans/navy
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
396 f beans/pinto beans/pinto
70e822796ac8 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com>
parents: 22947
diff changeset
397 f beans/turtle beans/turtle
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
398 $ hg debugwalk -v -Xbeans/black beans/black
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
399 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
400 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
401 m1=<patternmatcher patterns='beans/black(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
402 m2=<includematcher includes='beans/black(?:/|$)'>>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
403 $ hg debugwalk -v -Xbeans/black -Ibeans/black
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
404 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
405 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
406 m1=<includematcher includes='beans/black(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
407 m2=<includematcher includes='beans/black(?:/|$)'>>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
408 $ hg debugwalk -v -Xbeans beans/black
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
409 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
410 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
411 m1=<patternmatcher patterns='beans/black(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
412 m2=<includematcher includes='beans(?:/|$)'>>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
413 $ hg debugwalk -v -Xbeans -Ibeans/black
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
414 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
415 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
416 m1=<includematcher includes='beans/black(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
417 m2=<includematcher includes='beans(?:/|$)'>>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
418 $ hg debugwalk -v 'glob:mammals/../beans/b*'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
419 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
420 <patternmatcher patterns='beans/b[^/]*$'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
421 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
422 f beans/borlotti beans/borlotti
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
423 $ hg debugwalk -v '-X*/Procyonidae' mammals
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
424 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
425 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
426 m1=<patternmatcher patterns='mammals(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
427 m2=<includematcher includes='[^/]*/Procyonidae(?:/|$)'>>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
428 f mammals/skunk mammals/skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
429 $ hg debugwalk -v path:mammals
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
430 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
431 <patternmatcher patterns='mammals(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
432 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
433 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
434 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
435 f mammals/skunk mammals/skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
436 $ hg debugwalk -v ..
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
437 abort: .. not under root '$TESTTMP/t'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
438 [255]
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
439 $ hg debugwalk -v beans/../..
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
440 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
441 [255]
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
442 $ hg debugwalk -v .hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
443 abort: path contains illegal component: .hg
48369
35f1ecd84bd0 errors: use detailed exit code in pathauditor
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
444 [10]
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
445 $ hg debugwalk -v beans/../.hg
18682
408f2202bd80 tests: remove glob from output lines containing no glob character
Simon Heimberg <simohe@besonet.ch>
parents: 18506
diff changeset
446 abort: path contains illegal component: .hg
48369
35f1ecd84bd0 errors: use detailed exit code in pathauditor
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
447 [10]
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
448 $ hg debugwalk -v beans/../.hg/data
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
449 abort: path contains illegal component: .hg/data
48369
35f1ecd84bd0 errors: use detailed exit code in pathauditor
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
450 [10]
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
451 $ hg debugwalk -v beans/.hg
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
452 abort: path 'beans/.hg' is inside nested repo 'beans'
48369
35f1ecd84bd0 errors: use detailed exit code in pathauditor
Martin von Zweigbergk <martinvonz@google.com>
parents: 42864
diff changeset
453 [10]
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
454
35659
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
455 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
456
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
457 $ hg debugwalk -v fennel -X fennel
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
458 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
459 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
460 m1=<patternmatcher patterns='fennel(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
461 m2=<includematcher includes='fennel(?:/|$)'>>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
462 $ hg debugwalk -v fennel -X 'f*'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
463 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
464 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
465 m1=<patternmatcher patterns='fennel(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
466 m2=<includematcher includes='f[^/]*(?:/|$)'>>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
467 $ hg debugwalk -v beans/black -X 'path:beans'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
468 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
469 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
470 m1=<patternmatcher patterns='beans/black(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
471 m2=<includematcher includes='beans(?:/|$)'>>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
472 $ hg debugwalk -v -I 'path:beans/black' -X 'path:beans'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
473 * matcher:
38264
fbb2eddea4d2 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org>
parents: 38263
diff changeset
474 <differencematcher
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
475 m1=<includematcher includes='beans/black(?:/|$)'>,
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
476 m2=<includematcher includes='beans(?:/|$)'>>
35659
821d8a5ab4ff match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
477
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
478 Test absolute paths:
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
479
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
480 $ hg debugwalk -v `pwd`/beans
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
481 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
482 <patternmatcher patterns='beans(?:/|$)'>
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
483 f beans/black beans/black
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
484 f beans/borlotti beans/borlotti
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
485 f beans/kidney beans/kidney
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
486 f beans/navy beans/navy
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
487 f beans/pinto beans/pinto
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
488 f beans/turtle beans/turtle
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
489 $ hg debugwalk -v `pwd`/..
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
490 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
491 [255]
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
492
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
493 Test patterns:
6032
b41f0d6a74fc dirstate: don't walk ignored directories
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4309
diff changeset
494
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
495 $ hg debugwalk -v glob:\*
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
496 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
497 <patternmatcher patterns='[^/]*$'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
498 f fennel fennel
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
499 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
500 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
501 #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
502 $ 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
503 $ 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
504 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
505 warning: filename contains ':', which is reserved on Windows: 'glob:glob'
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
506 $ hg debugwalk -v glob:\*
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
507 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
508 <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
509 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
510 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
511 f fiddlehead fiddlehead
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
512 f glob:glob glob:glob
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
513 $ hg debugwalk -v glob:glob
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
514 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
515 <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
516 glob: $ENOENT$
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
517 $ hg debugwalk -v glob:glob:glob
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
518 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
519 <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
520 f glob:glob glob:glob exact
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
521 $ hg debugwalk -v path:glob:glob
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
522 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
523 <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
524 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
525 $ 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
526 $ 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
527 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
528 #endif
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
529
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
530 $ hg debugwalk -v 'glob:**e'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
531 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
532 <patternmatcher patterns='.*e$'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
533 f beans/turtle beans/turtle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
534 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
535
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
536 $ hg debugwalk -v 're:.*[kb]$'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
537 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
538 <patternmatcher patterns='.*[kb]$'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
539 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
540 f fenugreek fenugreek
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
541 f mammals/skunk mammals/skunk
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
542
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
543 $ hg debugwalk -v path:beans/black
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
544 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
545 <patternmatcher patterns='beans/black(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
546 f beans/black beans/black exact
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
547 $ hg debugwalk -v path:beans//black
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
548 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
549 <patternmatcher patterns='beans/black(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
550 f beans/black beans/black exact
11903
a4cc9e6f41c3 test-walk: enable absolute path tests
Matt Mackall <mpm@selenic.com>
parents: 11799
diff changeset
551
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
552 $ hg debugwalk -v relglob:Procyonidae
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
553 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
554 <patternmatcher patterns='(?:|.*/)Procyonidae$'>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
555 $ hg debugwalk -v 'relglob:Procyonidae/**'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
556 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
557 <patternmatcher patterns='(?:|.*/)Procyonidae/.*$'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
558 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
559 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
560 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
561 $ hg debugwalk -v 'relglob:Procyonidae/**' fennel
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
562 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
563 <patternmatcher patterns='(?:|.*/)Procyonidae/.*$|fennel(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
564 f fennel fennel exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
565 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
566 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
567 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
568 $ hg debugwalk -v beans 'glob:beans/*'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
569 * matcher:
50337
47686726545d match: sort patterns before compiling them into a regex
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48876
diff changeset
570 <patternmatcher patterns='beans/[^/]*$|beans(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
571 f beans/black beans/black
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
572 f beans/borlotti beans/borlotti
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
573 f beans/kidney beans/kidney
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
574 f beans/navy beans/navy
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
575 f beans/pinto beans/pinto
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
576 f beans/turtle beans/turtle
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
577 $ hg debugwalk -v 'glob:mamm**'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
578 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
579 <patternmatcher patterns='mamm.*$'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
580 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
581 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
582 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
583 f mammals/skunk mammals/skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
584 $ hg debugwalk -v 'glob:mamm**' fennel
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
585 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
586 <patternmatcher patterns='mamm.*$|fennel(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
587 f fennel fennel exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
588 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
589 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
590 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
591 f mammals/skunk mammals/skunk
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
592 $ hg debugwalk -v 'glob:j*'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
593 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
594 <patternmatcher patterns='j[^/]*$'>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
595 $ hg debugwalk -v NOEXIST
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
596 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
597 <patternmatcher patterns='NOEXIST(?:/|$)'>
15521
117f9190c1ba tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents: 15444
diff changeset
598 NOEXIST: * (glob)
6032
b41f0d6a74fc dirstate: don't walk ignored directories
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4309
diff changeset
599
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
600 #if fifo
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
601 $ mkfifo fifo
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
602 $ hg debugwalk -v fifo
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
603 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
604 <patternmatcher patterns='fifo(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
605 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
606 #endif
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
607
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
608 $ rm fenugreek
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
609 $ hg debugwalk -v fenugreek
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
610 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
611 <patternmatcher patterns='fenugreek(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
612 f fenugreek fenugreek exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
613 $ hg rm fenugreek
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
614 $ hg debugwalk -v fenugreek
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
615 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
616 <patternmatcher patterns='fenugreek(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
617 f fenugreek fenugreek exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
618 $ touch new
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
619 $ hg debugwalk -v new
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
620 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
621 <patternmatcher patterns='new(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
622 f new new exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
623
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
624 $ mkdir ignored
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
625 $ touch ignored/file
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
626 $ echo '^ignored$' > .hgignore
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
627 $ hg debugwalk -v ignored
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
628 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
629 <patternmatcher patterns='ignored(?:/|$)'>
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
630 $ hg debugwalk -v ignored/file
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
631 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
632 <patternmatcher patterns='ignored/file(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
633 f ignored/file ignored/file exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
634
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
635 Test listfile and listfile0
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
636
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38475
diff changeset
637 $ "$PYTHON" -c "open('listfile0', 'wb').write(b'fenugreek\0new\0')"
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
638 $ hg debugwalk -v -I 'listfile0:listfile0'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
639 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
640 <includematcher includes='fenugreek(?:/|$)|new(?:/|$)'>
14248
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
641 f fenugreek fenugreek
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
642 f new new
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38475
diff changeset
643 $ "$PYTHON" -c "open('listfile', 'wb').write(b'fenugreek\nnew\r\nmammals/skunk\n')"
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
644 $ hg debugwalk -v -I 'listfile:listfile'
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
645 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
646 <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
647 f fenugreek fenugreek
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
648 f mammals/skunk mammals/skunk
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
649 f new new
25c68ac247c1 match: make 'listfile:' split on LF and CRLF
Patrick Mezard <pmezard@gmail.com>
parents: 13962
diff changeset
650
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
651 $ cd ..
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
652 $ hg debugwalk -v -R t t/mammals/skunk
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
653 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
654 <patternmatcher patterns='mammals/skunk(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
655 f mammals/skunk t/mammals/skunk exact
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
656 $ mkdir t2
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
657 $ cd t2
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
658 $ hg debugwalk -v -R ../t ../t/mammals/skunk
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
659 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
660 <patternmatcher patterns='mammals/skunk(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
661 f mammals/skunk ../t/mammals/skunk exact
38262
7c3a59e2971b debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org>
parents: 37317
diff changeset
662 $ hg debugwalk -v --cwd ../t mammals/skunk
38263
dbf31732ef64 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org>
parents: 38262
diff changeset
663 * matcher:
40782
3984409e144b match: drop unnecessary wrapping of regex in group
Martin von Zweigbergk <martinvonz@google.com>
parents: 40242
diff changeset
664 <patternmatcher patterns='mammals/skunk(?:/|$)'>
11799
ddebb6a690b4 tests: unify test-walk
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6048
diff changeset
665 f mammals/skunk mammals/skunk exact
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15521
diff changeset
666
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15521
diff changeset
667 $ cd ..
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
668
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
669 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
670
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
671 $ cd t
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
672 $ echo fennel > overflow.list
37317
14da486e820d py3: use print as a function in tests/test-walk.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36288
diff changeset
673 $ cat >> printnum.py <<EOF
14da486e820d py3: use print as a function in tests/test-walk.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36288
diff changeset
674 > for i in range(20000 // 100):
14da486e820d py3: use print as a function in tests/test-walk.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36288
diff changeset
675 > print('x' * 100)
14da486e820d py3: use print as a function in tests/test-walk.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36288
diff changeset
676 > EOF
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38475
diff changeset
677 $ "$PYTHON" printnum.py >> overflow.list
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
678 $ echo fenugreek >> overflow.list
50725
7e5be4a7cda7 tests: use grep -E instead of obsolescent egrep
Mads Kiilerich <mads@kiilerich.com>
parents: 50695
diff changeset
679 $ hg debugwalk 'listfile:overflow.list' 2>&1 | grep -E -v '^xxx'
21191
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
680 f fennel fennel exact
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
681 f fenugreek fenugreek exact
a2f4ea82d6d3 match: fix NameError 'pat' on overflow of regex pattern length
Yuya Nishihara <yuya@tcha.org>
parents: 19873
diff changeset
682 $ cd ..