Mercurial > hg
annotate tests/test-fileset.t @ 31948:7a3fc3f3e89a
gitweb: handle "patch" query parameter in filelog view
As for paper style, in f36dc643ffdc, we display "diff" data as an additional
row in the table of revision entries for the gitweb template.
Also, as these additional diff rows have a white background, they may be
confused with log entry rows ("age", "author", "description", "links") of even
parity (parity0 also have a white background). So we disable parity colors for
log entry rows when diff is displayed and fix the color to the
"dark" parity (i.e. parity1 #f6f6f0) so that it's always distinguishable from
author | Denis Laxalde <denis.laxalde@logilab.fr> |
---|---|
date | Thu, 13 Apr 2017 10:04:09 +0200 |
parents | 67ea8e857489 |
children | 7bbc4e113e5f |
rev | line source |
---|---|
17362
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
1 $ fileset() { |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
2 > hg debugfileset "$@" |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
3 > } |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
4 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
5 $ hg init repo |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
6 $ cd repo |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
7 $ echo a > a1 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
8 $ echo a > a2 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
9 $ echo b > b1 |
17364
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
10 $ echo b > b2 |
17362
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
11 $ hg ci -Am addfiles |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
12 adding a1 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
13 adding a2 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
14 adding b1 |
17364
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
15 adding b2 |
17362
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
16 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
17 Test operators and basic patterns |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
18 |
25255
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
19 $ fileset -v a1 |
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
20 ('symbol', 'a1') |
17362
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
21 a1 |
25255
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
22 $ fileset -v 'a*' |
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
23 ('symbol', 'a*') |
17362
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
24 a1 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
25 a2 |
25255
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
26 $ fileset -v '"re:a\d"' |
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
27 ('string', 're:a\\d') |
17362
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
28 a1 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
29 a2 |
25255
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
30 $ fileset -v 'a1 or a2' |
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
31 (or |
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
32 ('symbol', 'a1') |
ad1d2c952889
fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org>
parents:
24430
diff
changeset
|
33 ('symbol', 'a2')) |
17362
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
34 a1 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
35 a2 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
36 $ fileset 'a1 | a2' |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
37 a1 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
38 a2 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
39 $ fileset 'a* and "*1"' |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
40 a1 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
41 $ fileset 'a* & "*1"' |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
42 a1 |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
43 $ fileset 'not (r"a*")' |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
44 b1 |
17364
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
45 b2 |
17362
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
46 $ fileset '! ("a*")' |
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
47 b1 |
17364
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
48 b2 |
17363
5d9e2031c0b1
fileset: actually implement 'minusset'
Patrick Mezard <patrick@mezard.eu>
parents:
17362
diff
changeset
|
49 $ fileset 'a* - a1' |
5d9e2031c0b1
fileset: actually implement 'minusset'
Patrick Mezard <patrick@mezard.eu>
parents:
17362
diff
changeset
|
50 a2 |
19470
19ac0d8ee9a2
fileset: handle underbar in symbols
Matt Mackall <mpm@selenic.com>
parents:
18842
diff
changeset
|
51 $ fileset 'a_b' |
26233
d3dbb65c8dc6
fileset: handle error of string unescaping
Yuya Nishihara <yuya@tcha.org>
parents:
25925
diff
changeset
|
52 $ fileset '"\xy"' |
d3dbb65c8dc6
fileset: handle error of string unescaping
Yuya Nishihara <yuya@tcha.org>
parents:
25925
diff
changeset
|
53 hg: parse error: invalid \x escape |
d3dbb65c8dc6
fileset: handle error of string unescaping
Yuya Nishihara <yuya@tcha.org>
parents:
25925
diff
changeset
|
54 [255] |
17362
bd867a9ca510
tests: test filesets with test-fileset.t
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
55 |
17364
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
56 Test files status |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
57 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
58 $ rm a1 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
59 $ hg rm a2 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
60 $ echo b >> b2 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
61 $ hg cp b1 c1 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
62 $ echo c > c2 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
63 $ echo c > c3 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
64 $ cat > .hgignore <<EOF |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
65 > \.hgignore |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
66 > 2$ |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
67 > EOF |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
68 $ fileset 'modified()' |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
69 b2 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
70 $ fileset 'added()' |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
71 c1 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
72 $ fileset 'removed()' |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
73 a2 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
74 $ fileset 'deleted()' |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
75 a1 |
27024
ceef5fb14872
fileset: add missing() predicate (issue4925)
liscju <piotr.listkiewicz@gmail.com>
parents:
26953
diff
changeset
|
76 $ fileset 'missing()' |
ceef5fb14872
fileset: add missing() predicate (issue4925)
liscju <piotr.listkiewicz@gmail.com>
parents:
26953
diff
changeset
|
77 a1 |
17364
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
78 $ fileset 'unknown()' |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
79 c3 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
80 $ fileset 'ignored()' |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
81 .hgignore |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
82 c2 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
83 $ fileset 'hgignore()' |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
84 a2 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
85 b2 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
86 $ fileset 'clean()' |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
87 b1 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
88 $ fileset 'copied()' |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
89 c1 |
0c41fb2d972a
test-fileset: test file status predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17363
diff
changeset
|
90 |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
91 Test files status in different revisions |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
92 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
93 $ hg status -m |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
94 M b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
95 $ fileset -r0 'revs("wdir()", modified())' --traceback |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
96 b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
97 $ hg status -a |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
98 A c1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
99 $ fileset -r0 'revs("wdir()", added())' |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
100 c1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
101 $ hg status --change 0 -a |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
102 A a1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
103 A a2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
104 A b1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
105 A b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
106 $ hg status -mru |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
107 M b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
108 R a2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
109 ? c3 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
110 $ fileset -r0 'added() and revs("wdir()", modified() or removed() or unknown())' |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
111 b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
112 a2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
113 $ fileset -r0 'added() or revs("wdir()", added())' |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
114 a1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
115 a2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
116 b1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
117 b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
118 c1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
119 |
17365
8a0513bf030a
fileset: exclude deleted files from matchctx.existing()
Patrick Mezard <patrick@mezard.eu>
parents:
17364
diff
changeset
|
120 Test files properties |
8a0513bf030a
fileset: exclude deleted files from matchctx.existing()
Patrick Mezard <patrick@mezard.eu>
parents:
17364
diff
changeset
|
121 |
8a0513bf030a
fileset: exclude deleted files from matchctx.existing()
Patrick Mezard <patrick@mezard.eu>
parents:
17364
diff
changeset
|
122 >>> file('bin', 'wb').write('\0a') |
8a0513bf030a
fileset: exclude deleted files from matchctx.existing()
Patrick Mezard <patrick@mezard.eu>
parents:
17364
diff
changeset
|
123 $ fileset 'binary()' |
17366
04c65cb59467
fileset: matchctx.existing() must consider unknown files
Patrick Mezard <patrick@mezard.eu>
parents:
17365
diff
changeset
|
124 $ fileset 'binary() and unknown()' |
04c65cb59467
fileset: matchctx.existing() must consider unknown files
Patrick Mezard <patrick@mezard.eu>
parents:
17365
diff
changeset
|
125 bin |
17367
ce625185cfd9
fileset: matchctx.existing() must consider ignored files
Patrick Mezard <patrick@mezard.eu>
parents:
17366
diff
changeset
|
126 $ echo '^bin$' >> .hgignore |
ce625185cfd9
fileset: matchctx.existing() must consider ignored files
Patrick Mezard <patrick@mezard.eu>
parents:
17366
diff
changeset
|
127 $ fileset 'binary() and ignored()' |
ce625185cfd9
fileset: matchctx.existing() must consider ignored files
Patrick Mezard <patrick@mezard.eu>
parents:
17366
diff
changeset
|
128 bin |
17366
04c65cb59467
fileset: matchctx.existing() must consider unknown files
Patrick Mezard <patrick@mezard.eu>
parents:
17365
diff
changeset
|
129 $ hg add bin |
04c65cb59467
fileset: matchctx.existing() must consider unknown files
Patrick Mezard <patrick@mezard.eu>
parents:
17365
diff
changeset
|
130 $ fileset 'binary()' |
04c65cb59467
fileset: matchctx.existing() must consider unknown files
Patrick Mezard <patrick@mezard.eu>
parents:
17365
diff
changeset
|
131 bin |
17365
8a0513bf030a
fileset: exclude deleted files from matchctx.existing()
Patrick Mezard <patrick@mezard.eu>
parents:
17364
diff
changeset
|
132 |
17368
01cc267fc105
fileset: do not traceback on invalid grep pattern
Patrick Mezard <patrick@mezard.eu>
parents:
17367
diff
changeset
|
133 $ fileset 'grep("b{1}")' |
01cc267fc105
fileset: do not traceback on invalid grep pattern
Patrick Mezard <patrick@mezard.eu>
parents:
17367
diff
changeset
|
134 b2 |
01cc267fc105
fileset: do not traceback on invalid grep pattern
Patrick Mezard <patrick@mezard.eu>
parents:
17367
diff
changeset
|
135 c1 |
01cc267fc105
fileset: do not traceback on invalid grep pattern
Patrick Mezard <patrick@mezard.eu>
parents:
17367
diff
changeset
|
136 b1 |
01cc267fc105
fileset: do not traceback on invalid grep pattern
Patrick Mezard <patrick@mezard.eu>
parents:
17367
diff
changeset
|
137 $ fileset 'grep("missingparens(")' |
01cc267fc105
fileset: do not traceback on invalid grep pattern
Patrick Mezard <patrick@mezard.eu>
parents:
17367
diff
changeset
|
138 hg: parse error: invalid match pattern: unbalanced parenthesis |
01cc267fc105
fileset: do not traceback on invalid grep pattern
Patrick Mezard <patrick@mezard.eu>
parents:
17367
diff
changeset
|
139 [255] |
01cc267fc105
fileset: do not traceback on invalid grep pattern
Patrick Mezard <patrick@mezard.eu>
parents:
17367
diff
changeset
|
140 |
17369
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
141 #if execbit |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
142 $ chmod +x b2 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
143 $ fileset 'exec()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
144 b2 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
145 #endif |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
146 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
147 #if symlink |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
148 $ ln -s b2 b2link |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
149 $ fileset 'symlink() and unknown()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
150 b2link |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
151 $ hg add b2link |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
152 #endif |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
153 |
24408
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
154 #if no-windows |
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
155 $ echo foo > con.xml |
24430
98d9d33dfd95
test-fileset.t: remove 'bar ' and 'baz\' from tested filenames
Siddharth Agarwal <sid0@fb.com>
parents:
24424
diff
changeset
|
156 $ fileset 'not portable()' |
24408
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
157 con.xml |
24430
98d9d33dfd95
test-fileset.t: remove 'bar ' and 'baz\' from tested filenames
Siddharth Agarwal <sid0@fb.com>
parents:
24424
diff
changeset
|
158 $ hg --config ui.portablefilenames=ignore add con.xml |
24408
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
159 #endif |
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
160 |
17369
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
161 >>> file('1k', 'wb').write(' '*1024) |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
162 >>> file('2k', 'wb').write(' '*2048) |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
163 $ hg add 1k 2k |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
164 $ fileset 'size("bar")' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
165 hg: parse error: couldn't parse size: bar |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
166 [255] |
27518
737ffdabbde9
fileset: add hint for list error to use or
timeless <timeless@mozdev.org>
parents:
27477
diff
changeset
|
167 $ fileset '(1k, 2k)' |
737ffdabbde9
fileset: add hint for list error to use or
timeless <timeless@mozdev.org>
parents:
27477
diff
changeset
|
168 hg: parse error: can't use a list in this context |
737ffdabbde9
fileset: add hint for list error to use or
timeless <timeless@mozdev.org>
parents:
27477
diff
changeset
|
169 (see hg help "filesets.x or y") |
737ffdabbde9
fileset: add hint for list error to use or
timeless <timeless@mozdev.org>
parents:
27477
diff
changeset
|
170 [255] |
17369
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
171 $ fileset 'size(1k)' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
172 1k |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
173 $ fileset '(1k or 2k) and size("< 2k")' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
174 1k |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
175 $ fileset '(1k or 2k) and size("<=2k")' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
176 1k |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
177 2k |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
178 $ fileset '(1k or 2k) and size("> 1k")' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
179 2k |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
180 $ fileset '(1k or 2k) and size(">=1K")' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
181 1k |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
182 2k |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
183 $ fileset '(1k or 2k) and size(".5KB - 1.5kB")' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
184 1k |
25925
23c4589fc678
filesets: ignore unit case in size() predicate for single value
Anton Shestakov <av6@dwimlabs.net>
parents:
25587
diff
changeset
|
185 $ fileset 'size("1M")' |
23c4589fc678
filesets: ignore unit case in size() predicate for single value
Anton Shestakov <av6@dwimlabs.net>
parents:
25587
diff
changeset
|
186 $ fileset 'size("1 GB")' |
17369
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
187 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
188 Test merge states |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
189 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
190 $ hg ci -m manychanges |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
191 $ hg up -C 0 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
192 * files updated, 0 files merged, * files removed, 0 files unresolved (glob) |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
193 $ echo c >> b2 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
194 $ hg ci -m diverging b2 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
195 created new head |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
196 $ fileset 'resolved()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
197 $ fileset 'unresolved()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
198 $ hg merge |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
199 merging b2 |
26614
ef1eb6df7071
simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents:
26233
diff
changeset
|
200 warning: conflicts while merging b2! (edit, then use 'hg resolve --mark') |
26953
2da6a2dbfc42
test-fileset: glob the updated file count for Windows stability
Matt Harbison <matt_harbison@yahoo.com>
parents:
26614
diff
changeset
|
201 * files updated, 0 files merged, 1 files removed, 1 files unresolved (glob) |
17369
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
202 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
203 [1] |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
204 $ fileset 'resolved()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
205 $ fileset 'unresolved()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
206 b2 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
207 $ echo e > b2 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
208 $ hg resolve -m b2 |
21947
b081decd9062
resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21267
diff
changeset
|
209 (no more unresolved files) |
17369
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
210 $ fileset 'resolved()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
211 b2 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
212 $ fileset 'unresolved()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
213 $ hg ci -m merge |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
214 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
215 Test subrepo predicate |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
216 |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
217 $ hg init sub |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
218 $ echo a > sub/suba |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
219 $ hg -R sub add sub/suba |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
220 $ hg -R sub ci -m sub |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
221 $ echo 'sub = sub' > .hgsub |
25558
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
222 $ hg init sub2 |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
223 $ echo b > sub2/b |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
224 $ hg -R sub2 ci -Am sub2 |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
225 adding b |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
226 $ echo 'sub2 = sub2' >> .hgsub |
17369
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
227 $ fileset 'subrepo()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
228 $ hg add .hgsub |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
229 $ fileset 'subrepo()' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
230 sub |
25558
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
231 sub2 |
17369
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
232 $ fileset 'subrepo("sub")' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
233 sub |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
234 $ fileset 'subrepo("glob:*")' |
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
235 sub |
25558
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
236 sub2 |
17370
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
237 $ hg ci -m subrepo |
17369
b360011a132d
test-fileset: test remaining predicates
Patrick Mezard <patrick@mezard.eu>
parents:
17368
diff
changeset
|
238 |
25558
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
239 Test that .hgsubstate is updated as appropriate during a conversion. The |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
240 saverev property is enough to alter the hashes of the subrepo. |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
241 |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
242 $ hg init ../converted |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
243 $ hg --config extensions.convert= convert --config convert.hg.saverev=True \ |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
244 > sub ../converted/sub |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
245 initializing destination ../converted/sub repository |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
246 scanning source... |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
247 sorting... |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
248 converting... |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
249 0 sub |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
250 $ hg clone -U sub2 ../converted/sub2 |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
251 $ hg --config extensions.convert= convert --config convert.hg.saverev=True \ |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
252 > . ../converted |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
253 scanning source... |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
254 sorting... |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
255 converting... |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
256 4 addfiles |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
257 3 manychanges |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
258 2 diverging |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
259 1 merge |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
260 0 subrepo |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
261 no ".hgsubstate" updates will be made for "sub2" |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
262 $ hg up -q -R ../converted -r tip |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
263 $ hg --cwd ../converted cat sub/suba sub2/b -r tip |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
264 a |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
265 b |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
266 $ oldnode=`hg log -r tip -T "{node}\n"` |
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
267 $ newnode=`hg log -R ../converted -r tip -T "{node}\n"` |
25587
49fb24f72747
test-fileset: remove bashism, use test instead of '[[ ]]'
Yuya Nishihara <yuya@tcha.org>
parents:
25558
diff
changeset
|
268 $ [ "$oldnode" != "$newnode" ] || echo "nothing changed" |
25558
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
269 |
17370
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
270 Test with a revision |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
271 |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
272 $ hg log -G --template '{rev} {desc}\n' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
273 @ 4 subrepo |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
274 | |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
275 o 3 merge |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
276 |\ |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
277 | o 2 diverging |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
278 | | |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
279 o | 1 manychanges |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
280 |/ |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
281 o 0 addfiles |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
282 |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
283 $ echo unknown > unknown |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
284 $ fileset -r1 'modified()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
285 b2 |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
286 $ fileset -r1 'added() and c1' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
287 c1 |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
288 $ fileset -r1 'removed()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
289 a2 |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
290 $ fileset -r1 'deleted()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
291 $ fileset -r1 'unknown()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
292 $ fileset -r1 'ignored()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
293 $ fileset -r1 'hgignore()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
294 b2 |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
295 bin |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
296 $ fileset -r1 'binary()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
297 bin |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
298 $ fileset -r1 'size(1k)' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
299 1k |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
300 $ fileset -r3 'resolved()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
301 $ fileset -r3 'unresolved()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
302 |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
303 #if execbit |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
304 $ fileset -r1 'exec()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
305 b2 |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
306 #endif |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
307 |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
308 #if symlink |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
309 $ fileset -r1 'symlink()' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
310 b2link |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
311 #endif |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
312 |
24408
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
313 #if no-windows |
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
314 $ fileset -r1 'not portable()' |
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
315 con.xml |
24424
f7a3ea7b9dc6
test-fileset: forget non-portable files to avoid failures on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
24408
diff
changeset
|
316 $ hg forget 'con.xml' |
24408
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
317 #endif |
caa6b6c65dc3
fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com>
parents:
21947
diff
changeset
|
318 |
17370
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
319 $ fileset -r4 'subrepo("re:su.*")' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
320 sub |
25558
daf9f7ee2a5c
convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents:
25255
diff
changeset
|
321 sub2 |
17370
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
322 $ fileset -r4 'subrepo("sub")' |
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
323 sub |
17371
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
17370
diff
changeset
|
324 $ fileset -r4 'b2 or c1' |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
17370
diff
changeset
|
325 b2 |
1310489eb5d6
fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents:
17370
diff
changeset
|
326 c1 |
17370
3fe199579323
debugfileset: implement --rev, more tests
Patrick Mezard <patrick@mezard.eu>
parents:
17369
diff
changeset
|
327 |
18842
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
328 >>> open('dos', 'wb').write("dos\r\n") |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
329 >>> open('mixed', 'wb').write("dos\r\nunix\n") |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
330 >>> open('mac', 'wb').write("mac\r") |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
331 $ hg add dos mixed mac |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
332 |
27459
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
333 (remove a1, to examine safety of 'eol' on removed files) |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
334 $ rm a1 |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
335 |
18842
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
336 $ fileset 'eol(dos)' |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
337 dos |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
338 mixed |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
339 $ fileset 'eol(unix)' |
27459
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
340 mixed |
18842
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
341 .hgsub |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
342 .hgsubstate |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
343 b1 |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
344 b2 |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
345 c1 |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
346 $ fileset 'eol(mac)' |
3ce3f2b059a1
filesets: add eol predicate
Matt Mackall <mpm@selenic.com>
parents:
17371
diff
changeset
|
347 mac |
27459
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
348 |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
349 Test safety of 'encoding' on removed files |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
350 |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
351 $ fileset 'encoding("ascii")' |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
352 dos |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
353 mac |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
354 mixed |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
355 .hgsub |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
356 .hgsubstate |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
357 1k |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
358 2k |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
359 b1 |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
360 b2 |
31853
67ea8e857489
test-fileset: eliminate a duplicate test that was conditionalized for output
Matt Harbison <matt_harbison@yahoo.com>
parents:
31852
diff
changeset
|
361 b2link (symlink !) |
27459
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
362 bin |
2f15253e415f
fileset: treat encoding and eol as the predicate calling _existing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27024
diff
changeset
|
363 c1 |
27464
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
364 |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
365 Test detection of unintentional 'matchctx.existing()' invocation |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
366 |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
367 $ cat > $TESTTMP/existingcaller.py <<EOF |
28447
4eb5496c2bd4
registrar: add filesetpredicate to mark a function as fileset predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27518
diff
changeset
|
368 > from mercurial import registrar |
27464
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
369 > |
28447
4eb5496c2bd4
registrar: add filesetpredicate to mark a function as fileset predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27518
diff
changeset
|
370 > filesetpredicate = registrar.filesetpredicate() |
4eb5496c2bd4
registrar: add filesetpredicate to mark a function as fileset predicate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27518
diff
changeset
|
371 > @filesetpredicate('existingcaller()', callexisting=False) |
27464
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
372 > def existingcaller(mctx, x): |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
373 > # this 'mctx.existing()' invocation is unintentional |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
374 > return [f for f in mctx.existing()] |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
375 > EOF |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
376 |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
377 $ cat >> .hg/hgrc <<EOF |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
378 > [extensions] |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
379 > existingcaller = $TESTTMP/existingcaller.py |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
380 > EOF |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
381 |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
382 $ fileset 'existingcaller()' 2>&1 | tail -1 |
c39ecb2b86b3
fileset: detect unintentional existing() invocation at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27459
diff
changeset
|
383 AssertionError: unexpected existing() invocation |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
384 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
385 Test 'revs(...)' |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
386 ================ |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
387 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
388 small reminder of the repository state |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
389 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
390 $ hg log -G |
31852
7ef0816bfe64
test-fileset: glob away hash differences
Matt Harbison <matt_harbison@yahoo.com>
parents:
31830
diff
changeset
|
391 @ changeset: 4:* (glob) |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
392 | tag: tip |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
393 | user: test |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
394 | date: Thu Jan 01 00:00:00 1970 +0000 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
395 | summary: subrepo |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
396 | |
31852
7ef0816bfe64
test-fileset: glob away hash differences
Matt Harbison <matt_harbison@yahoo.com>
parents:
31830
diff
changeset
|
397 o changeset: 3:* (glob) |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
398 |\ parent: 2:55b05bdebf36 |
31852
7ef0816bfe64
test-fileset: glob away hash differences
Matt Harbison <matt_harbison@yahoo.com>
parents:
31830
diff
changeset
|
399 | | parent: 1:* (glob) |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
400 | | user: test |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
401 | | date: Thu Jan 01 00:00:00 1970 +0000 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
402 | | summary: merge |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
403 | | |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
404 | o changeset: 2:55b05bdebf36 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
405 | | parent: 0:8a9576c51c1f |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
406 | | user: test |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
407 | | date: Thu Jan 01 00:00:00 1970 +0000 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
408 | | summary: diverging |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
409 | | |
31852
7ef0816bfe64
test-fileset: glob away hash differences
Matt Harbison <matt_harbison@yahoo.com>
parents:
31830
diff
changeset
|
410 o | changeset: 1:* (glob) |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
411 |/ user: test |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
412 | date: Thu Jan 01 00:00:00 1970 +0000 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
413 | summary: manychanges |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
414 | |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
415 o changeset: 0:8a9576c51c1f |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
416 user: test |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
417 date: Thu Jan 01 00:00:00 1970 +0000 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
418 summary: addfiles |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
419 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
420 $ hg status --change 0 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
421 A a1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
422 A a2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
423 A b1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
424 A b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
425 $ hg status --change 1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
426 M b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
427 A 1k |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
428 A 2k |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
429 A b2link (no-windows !) |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
430 A bin |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
431 A c1 |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
432 A con.xml (no-windows !) |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
433 R a2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
434 $ hg status --change 2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
435 M b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
436 $ hg status --change 3 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
437 M b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
438 A 1k |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
439 A 2k |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
440 A b2link (no-windows !) |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
441 A bin |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
442 A c1 |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
443 A con.xml (no-windows !) |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
444 R a2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
445 $ hg status --change 4 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
446 A .hgsub |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
447 A .hgsubstate |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
448 $ hg status |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
449 A dos |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
450 A mac |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
451 A mixed |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
452 R con.xml (no-windows !) |
31193
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
453 ! a1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
454 ? b2.orig |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
455 ? c3 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
456 ? unknown |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
457 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
458 Test files at -r0 should be filtered by files at wdir |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
459 ----------------------------------------------------- |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
460 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
461 $ fileset -r0 '* and revs("wdir()", *)' |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
462 a1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
463 b1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
464 b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
465 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
466 Test that "revs()" work at all |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
467 ------------------------------ |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
468 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
469 $ fileset "revs('2', modified())" |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
470 b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
471 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
472 Test that "revs()" work for file missing in the working copy/current context |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
473 ---------------------------------------------------------------------------- |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
474 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
475 (a2 not in working copy) |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
476 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
477 $ fileset "revs('0', added())" |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
478 a1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
479 a2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
480 b1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
481 b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
482 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
483 (none of the file exist in "0") |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
484 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
485 $ fileset -r 0 "revs('4', added())" |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
486 .hgsub |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
487 .hgsubstate |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
488 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
489 Call with empty revset |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
490 -------------------------- |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
491 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
492 $ fileset "revs('2-2', modified())" |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
493 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
494 Call with revset matching multiple revs |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
495 --------------------------------------- |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
496 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
497 $ fileset "revs('0+4', added())" |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
498 a1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
499 a2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
500 b1 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
501 b2 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
502 .hgsub |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
503 .hgsubstate |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
504 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
505 overlapping set |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
506 |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
507 $ fileset "revs('1+2', modified())" |
4140d49d2efb
fileset: add revs(revs, fileset) to evaluate set in working directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
28447
diff
changeset
|
508 b2 |
31195
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
509 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
510 test 'status(...)' |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
511 ================= |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
512 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
513 Simple case |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
514 ----------- |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
515 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
516 $ fileset "status(3, 4, added())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
517 .hgsub |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
518 .hgsubstate |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
519 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
520 use rev to restrict matched file |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
521 ----------------------------------------- |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
522 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
523 $ hg status --removed --rev 0 --rev 1 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
524 R a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
525 $ fileset "status(0, 1, removed())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
526 a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
527 $ fileset "* and status(0, 1, removed())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
528 $ fileset -r 4 "status(0, 1, removed())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
529 a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
530 $ fileset -r 4 "* and status(0, 1, removed())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
531 $ fileset "revs('4', * and status(0, 1, removed()))" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
532 $ fileset "revs('0', * and status(0, 1, removed()))" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
533 a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
534 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
535 check wdir() |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
536 ------------ |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
537 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
538 $ hg status --removed --rev 4 |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
539 R con.xml (no-windows !) |
31195
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
540 $ fileset "status(4, 'wdir()', removed())" |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
541 con.xml (no-windows !) |
31195
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
542 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
543 $ hg status --removed --rev 2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
544 R a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
545 $ fileset "status('2', 'wdir()', removed())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
546 a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
547 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
548 test backward status |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
549 -------------------- |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
550 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
551 $ hg status --removed --rev 0 --rev 4 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
552 R a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
553 $ hg status --added --rev 4 --rev 0 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
554 A a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
555 $ fileset "status(4, 0, added())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
556 a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
557 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
558 test cross branch status |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
559 ------------------------ |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
560 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
561 $ hg status --added --rev 1 --rev 2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
562 A a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
563 $ fileset "status(1, 2, added())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
564 a2 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
565 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
566 test with multi revs revset |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
567 --------------------------- |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
568 $ hg status --added --rev 0:1 --rev 3:4 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
569 A .hgsub |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
570 A .hgsubstate |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
571 A 1k |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
572 A 2k |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
573 A b2link (no-windows !) |
31195
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
574 A bin |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
575 A c1 |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
576 A con.xml (no-windows !) |
31195
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
577 $ fileset "status('0:1', '3:4', added())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
578 .hgsub |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
579 .hgsubstate |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
580 1k |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
581 2k |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
582 b2link (no-windows !) |
31195
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
583 bin |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
584 c1 |
31830
d34316ae5c58
tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
31195
diff
changeset
|
585 con.xml (no-windows !) |
31195
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
586 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
587 tests with empty value |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
588 ---------------------- |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
589 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
590 Fully empty revset |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
591 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
592 $ fileset "status('', '4', added())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
593 hg: parse error: first argument to status must be a revision |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
594 [255] |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
595 $ fileset "status('2', '', added())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
596 hg: parse error: second argument to status must be a revision |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
597 [255] |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
598 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
599 Empty revset will error at the revset layer |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
600 |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
601 $ fileset "status(' ', '4', added())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
602 hg: parse error at 1: not a prefix: end |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
603 [255] |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
604 $ fileset "status('2', ' ', added())" |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
605 hg: parse error at 1: not a prefix: end |
6b098ac4542e
fileset: add a 'status(...)' predicate to control evaluation context
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
31193
diff
changeset
|
606 [255] |