annotate tests/test-status-color.t @ 12022:6b04f1e1aa8a

contrib/compress: compress should activate parentdelta
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 22 Aug 2010 19:41:04 +0200
parents 599a78030fa8
children 4c94b6d0fb1c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11783
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
1 $ echo "[extensions]" >> $HGRCPATH
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
2 $ echo "color=" >> $HGRCPATH
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
3 $ echo "[color]" >> $HGRCPATH
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
4 $ echo "mode=ansi" >> $HGRCPATH
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
5
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
6 $ hg init repo1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
7 $ cd repo1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
8 $ mkdir a b a/1 b/1 b/2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
9 $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
10
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
11 hg status in repo root:
7458
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
12
11783
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
13 $ hg status --color=always
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
14 ? a/1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
15 ? a/in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
16 ? b/1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
17 ? b/2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
18 ? b/in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
19 ? in_root
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
20
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
21 hg status . in repo root:
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
22
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
23 $ hg status --color=always .
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
24 ? a/1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
25 ? a/in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
26 ? b/1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
27 ? b/2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
28 ? b/in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
29 ? in_root
7458
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
30
11783
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
31 $ hg status --color=always --cwd a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
32 ? a/1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
33 ? a/in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
34 ? b/1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
35 ? b/2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
36 ? b/in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
37 ? in_root
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
38 $ hg status --color=always --cwd a .
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
39 ? 1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
40 ? in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
41 $ hg status --color=always --cwd a ..
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
42 ? 1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
43 ? in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
44 ? ../b/1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
45 ? ../b/2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
46 ? ../b/in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
47 ? ../in_root
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
48
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
49 $ hg status --color=always --cwd b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
50 ? a/1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
51 ? a/in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
52 ? b/1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
53 ? b/2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
54 ? b/in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
55 ? in_root
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
56 $ hg status --color=always --cwd b .
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
57 ? 1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
58 ? 2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
59 ? in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
60 $ hg status --color=always --cwd b ..
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
61 ? ../a/1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
62 ? ../a/in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
63 ? 1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
64 ? 2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
65 ? in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
66 ? ../in_root
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
67
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
68 $ hg status --color=always --cwd a/1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
69 ? a/1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
70 ? a/in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
71 ? b/1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
72 ? b/2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
73 ? b/in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
74 ? in_root
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
75 $ hg status --color=always --cwd a/1 .
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
76 ? in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
77 $ hg status --color=always --cwd a/1 ..
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
78 ? in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
79 ? ../in_a
7458
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
80
11783
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
81 $ hg status --color=always --cwd b/1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
82 ? a/1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
83 ? a/in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
84 ? b/1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
85 ? b/2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
86 ? b/in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
87 ? in_root
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
88 $ hg status --color=always --cwd b/1 .
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
89 ? in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
90 $ hg status --color=always --cwd b/1 ..
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
91 ? in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
92 ? ../2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
93 ? ../in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
94
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
95 $ hg status --color=always --cwd b/2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
96 ? a/1/in_a_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
97 ? a/in_a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
98 ? b/1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
99 ? b/2/in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
100 ? b/in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
101 ? in_root
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
102 $ hg status --color=always --cwd b/2 .
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
103 ? in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
104 $ hg status --color=always --cwd b/2 ..
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
105 ? ../1/in_b_1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
106 ? in_b_2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
107 ? ../in_b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
108 $ cd ..
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
109
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
110 $ hg init repo2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
111 $ cd repo2
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
112 $ touch modified removed deleted ignored
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
113 $ echo "^ignored$" > .hgignore
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
114 $ hg ci -A -m 'initial checkin' -d "1000000 0"
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
115 adding .hgignore
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
116 adding deleted
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
117 adding modified
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
118 adding removed
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
119 $ touch modified added unknown ignored
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
120 $ hg add added
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
121 $ hg remove removed
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
122 $ rm deleted
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
123
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
124 hg status:
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
125
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
126 $ hg status --color=always
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
127 A added
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
128 R removed
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
129 ! deleted
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
130 ? unknown
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
131
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
132 hg status modified added removed deleted unknown never-existed ignored:
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
133
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
134 $ hg status --color=always modified added removed deleted unknown never-existed ignored
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
135 never-existed: No such file or directory
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
136 A added
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
137 R removed
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
138 ! deleted
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
139 ? unknown
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
140
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
141 $ hg copy modified copied
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
142
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
143 hg status -C:
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
144
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
145 $ hg status --color=always -C
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
146 A added
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
147 A copied
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
148  modified
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
149 R removed
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
150 ! deleted
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
151 ? unknown
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
152
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
153 hg status -A:
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
154
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
155 $ hg status --color=always -A
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
156 A added
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
157 A copied
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
158  modified
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
159 R removed
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
160 ! deleted
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
161 ? unknown
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
162 I ignored
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
163 C .hgignore
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
164 C modified
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
165
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
166
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
167 $ echo "^ignoreddir$" > .hgignore
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
168 $ mkdir ignoreddir
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
169 $ touch ignoreddir/file
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
170
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
171 hg status ignoreddir/file:
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
172
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
173 $ hg status --color=always ignoreddir/file
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
174
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
175 hg status -i ignoreddir/file:
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
176
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
177 $ hg status --color=always -i ignoreddir/file
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
178 I ignoreddir/file
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
179 $ cd ..
7458
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
180
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
181 # check 'status -q' and some combinations
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
182
11783
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
183 $ hg init repo3
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
184 $ cd repo3
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
185 $ touch modified removed deleted ignored
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
186 $ echo "^ignored$" > .hgignore
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
187 $ hg commit -A -m 'initial checkin'
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
188 adding .hgignore
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
189 adding deleted
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
190 adding modified
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
191 adding removed
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
192 $ touch added unknown ignored
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
193 $ hg add added
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
194 $ echo "test" >> modified
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
195 $ hg remove removed
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
196 $ rm deleted
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
197 $ hg copy modified copied
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
198
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
199 test unknown color
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
200
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
201 $ hg --config color.status.modified=periwinkle status --color=always
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
202 ignoring unknown color/effect 'periwinkle' (configured in color.status.modified)
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
203 M modified
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
204 A added
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
205 A copied
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
206 R removed
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
207 ! deleted
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
208 ? unknown
8945
7b3d837ca60e color: don't blow up if configured with unknown color (just warn).
Greg Ward <greg-hg@gerg.ca>
parents: 7458
diff changeset
209
7458
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
210 # Run status with 2 different flags.
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
211 # Check if result is the same or different.
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
212 # If result is not as expected, raise error
11783
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
213 $ assert() {
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
214 > hg status --color=always $1 > ../a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
215 > hg status --color=always $2 > ../b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
216 > out=`diff ../a ../b`
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
217 > if [ $? -ne 0 ]; then
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
218 > out=1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
219 > else
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
220 > out=0
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
221 > fi
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
222 > if [ $3 -eq 0 ]; then
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
223 > df="same"
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
224 > else
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
225 > df="different"
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
226 > fi
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
227 > if [ $out -ne $3 ]; then
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
228 > echo "Error on $1 and $2, should be $df."
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
229 > fi
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
230 > }
7458
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
231
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
232 # assert flag1 flag2 [0-same | 1-different]
03dd55115985 color: Add tests for colorized diff and status output.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
233
11783
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
234 $ assert "-q" "-mard" 0
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
235 $ assert "-A" "-marduicC" 0
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
236 $ assert "-qA" "-mardcC" 0
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
237 $ assert "-qAui" "-A" 0
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
238 $ assert "-qAu" "-marducC" 0
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
239 $ assert "-qAi" "-mardicC" 0
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
240 $ assert "-qu" "-u" 0
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
241 $ assert "-q" "-u" 1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
242 $ assert "-m" "-a" 1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
243 $ assert "-r" "-d" 1
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
244 $ cd ..
10223
51421ab573de color: colorize output of hg resolve -l
Georg Brandl <georg@python.org>
parents: 8945
diff changeset
245
51421ab573de color: colorize output of hg resolve -l
Georg Brandl <georg@python.org>
parents: 8945
diff changeset
246 # test 'resolve -l'
11783
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
247 $ hg init repo4
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
248 $ cd repo4
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
249 $ echo "file a" > a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
250 $ echo "file b" > b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
251 $ hg add a b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
252 $ hg commit -m "initial"
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
253 $ echo "file a change 1" > a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
254 $ echo "file b change 1" > b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
255 $ hg commit -m "head 1"
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
256 $ hg update 0
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
257 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
258 $ echo "file a change 2" > a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
259 $ echo "file b change 2" > b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
260 $ hg commit -m "head 2"
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
261 created new head
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
262 $ hg merge
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
263 merging a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
264 warning: conflicts during merge.
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
265 merging a failed!
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
266 merging b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
267 warning: conflicts during merge.
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
268 merging b failed!
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
269 0 files updated, 0 files merged, 0 files removed, 2 files unresolved
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
270 use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
271 $ hg resolve -m b
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
272
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
273 hg resolve with one unresolved, one resolved:
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
274
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
275 $ hg resolve --color=always -l
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
276 U a
599a78030fa8 tests: unify test-status-color
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11141
diff changeset
277 R b