##// END OF EJS Templates
test-fileset: test file status predicates
Patrick Mezard -
r17364:0c41fb2d stable
parent child Browse files
Show More
@@ -1,41 +1,78 b''
1 $ fileset() {
1 $ fileset() {
2 > hg debugfileset "$@"
2 > hg debugfileset "$@"
3 > }
3 > }
4
4
5 $ hg init repo
5 $ hg init repo
6 $ cd repo
6 $ cd repo
7 $ echo a > a1
7 $ echo a > a1
8 $ echo a > a2
8 $ echo a > a2
9 $ echo b > b1
9 $ echo b > b1
10 $ echo b > b2
10 $ hg ci -Am addfiles
11 $ hg ci -Am addfiles
11 adding a1
12 adding a1
12 adding a2
13 adding a2
13 adding b1
14 adding b1
15 adding b2
14
16
15 Test operators and basic patterns
17 Test operators and basic patterns
16
18
17 $ fileset a1
19 $ fileset a1
18 a1
20 a1
19 $ fileset 'a*'
21 $ fileset 'a*'
20 a1
22 a1
21 a2
23 a2
22 $ fileset '"re:a\d"'
24 $ fileset '"re:a\d"'
23 a1
25 a1
24 a2
26 a2
25 $ fileset 'a1 or a2'
27 $ fileset 'a1 or a2'
26 a1
28 a1
27 a2
29 a2
28 $ fileset 'a1 | a2'
30 $ fileset 'a1 | a2'
29 a1
31 a1
30 a2
32 a2
31 $ fileset 'a* and "*1"'
33 $ fileset 'a* and "*1"'
32 a1
34 a1
33 $ fileset 'a* & "*1"'
35 $ fileset 'a* & "*1"'
34 a1
36 a1
35 $ fileset 'not (r"a*")'
37 $ fileset 'not (r"a*")'
36 b1
38 b1
39 b2
37 $ fileset '! ("a*")'
40 $ fileset '! ("a*")'
38 b1
41 b1
42 b2
39 $ fileset 'a* - a1'
43 $ fileset 'a* - a1'
40 a2
44 a2
41
45
46 Test files status
47
48 $ rm a1
49 $ hg rm a2
50 $ echo b >> b2
51 $ hg cp b1 c1
52 $ echo c > c2
53 $ echo c > c3
54 $ cat > .hgignore <<EOF
55 > \.hgignore
56 > 2$
57 > EOF
58 $ fileset 'modified()'
59 b2
60 $ fileset 'added()'
61 c1
62 $ fileset 'removed()'
63 a2
64 $ fileset 'deleted()'
65 a1
66 $ fileset 'unknown()'
67 c3
68 $ fileset 'ignored()'
69 .hgignore
70 c2
71 $ fileset 'hgignore()'
72 a2
73 b2
74 $ fileset 'clean()'
75 b1
76 $ fileset 'copied()'
77 c1
78
General Comments 0
You need to be logged in to leave comments. Login now