Show More
@@ -1,310 +1,319 b'' | |||||
1 | $ "$TESTDIR/hghave" tic || exit 80 |
|
1 | $ "$TESTDIR/hghave" tic || exit 80 | |
2 |
|
2 | |||
3 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "color=" >> $HGRCPATH |
|
4 | $ echo "color=" >> $HGRCPATH | |
5 | $ echo "[color]" >> $HGRCPATH |
|
5 | $ echo "[color]" >> $HGRCPATH | |
6 | $ echo "mode=ansi" >> $HGRCPATH |
|
6 | $ echo "mode=ansi" >> $HGRCPATH | |
7 | Terminfo codes compatibility fix |
|
7 | Terminfo codes compatibility fix | |
8 | $ echo "color.none=0" >> $HGRCPATH |
|
8 | $ echo "color.none=0" >> $HGRCPATH | |
9 |
|
9 | |||
10 | $ hg init repo1 |
|
10 | $ hg init repo1 | |
11 | $ cd repo1 |
|
11 | $ cd repo1 | |
12 | $ mkdir a b a/1 b/1 b/2 |
|
12 | $ mkdir a b a/1 b/1 b/2 | |
13 | $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2 |
|
13 | $ touch in_root a/in_a b/in_b a/1/in_a_1 b/1/in_b_1 b/2/in_b_2 | |
14 |
|
14 | |||
15 | hg status in repo root: |
|
15 | hg status in repo root: | |
16 |
|
16 | |||
17 | $ hg status --color=always |
|
17 | $ hg status --color=always | |
18 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
18 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
19 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
19 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
20 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
20 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
21 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
21 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
22 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
22 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
23 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
23 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
24 |
|
24 | |||
25 | hg status . in repo root: |
|
25 | hg status . in repo root: | |
26 |
|
26 | |||
27 | $ hg status --color=always . |
|
27 | $ hg status --color=always . | |
28 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
28 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
29 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
29 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
30 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
30 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
31 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
31 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
32 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
32 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
33 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
33 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
34 |
|
34 | |||
35 | $ hg status --color=always --cwd a |
|
35 | $ hg status --color=always --cwd a | |
36 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
36 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
37 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
37 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
38 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
38 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
39 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
39 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
40 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
40 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
41 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
41 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
42 | $ hg status --color=always --cwd a . |
|
42 | $ hg status --color=always --cwd a . | |
43 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) |
|
43 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) | |
44 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) |
|
44 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) | |
45 | $ hg status --color=always --cwd a .. |
|
45 | $ hg status --color=always --cwd a .. | |
46 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) |
|
46 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_a_1\x1b[0m (esc) | |
47 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) |
|
47 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a\x1b[0m (esc) | |
48 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/1/in_b_1\x1b[0m (esc) |
|
48 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/1/in_b_1\x1b[0m (esc) | |
49 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/2/in_b_2\x1b[0m (esc) |
|
49 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/2/in_b_2\x1b[0m (esc) | |
50 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/in_b\x1b[0m (esc) |
|
50 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../b/in_b\x1b[0m (esc) | |
51 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) |
|
51 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) | |
52 |
|
52 | |||
53 | $ hg status --color=always --cwd b |
|
53 | $ hg status --color=always --cwd b | |
54 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
54 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
55 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
55 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
56 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
56 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
57 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
57 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
58 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
58 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
59 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
59 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
60 | $ hg status --color=always --cwd b . |
|
60 | $ hg status --color=always --cwd b . | |
61 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) |
|
61 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) | |
62 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) |
|
62 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) | |
63 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) |
|
63 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) | |
64 | $ hg status --color=always --cwd b .. |
|
64 | $ hg status --color=always --cwd b .. | |
65 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/1/in_a_1\x1b[0m (esc) |
|
65 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/1/in_a_1\x1b[0m (esc) | |
66 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/in_a\x1b[0m (esc) |
|
66 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../a/in_a\x1b[0m (esc) | |
67 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) |
|
67 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m1/in_b_1\x1b[0m (esc) | |
68 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) |
|
68 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m2/in_b_2\x1b[0m (esc) | |
69 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) |
|
69 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b\x1b[0m (esc) | |
70 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) |
|
70 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_root\x1b[0m (esc) | |
71 |
|
71 | |||
72 | $ hg status --color=always --cwd a/1 |
|
72 | $ hg status --color=always --cwd a/1 | |
73 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
73 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
74 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
74 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
75 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
75 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
76 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
76 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
77 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
77 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
78 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
78 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
79 | $ hg status --color=always --cwd a/1 . |
|
79 | $ hg status --color=always --cwd a/1 . | |
80 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) |
|
80 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) | |
81 | $ hg status --color=always --cwd a/1 .. |
|
81 | $ hg status --color=always --cwd a/1 .. | |
82 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) |
|
82 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_a_1\x1b[0m (esc) | |
83 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_a\x1b[0m (esc) |
|
83 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_a\x1b[0m (esc) | |
84 |
|
84 | |||
85 | $ hg status --color=always --cwd b/1 |
|
85 | $ hg status --color=always --cwd b/1 | |
86 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
86 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
87 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
87 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
88 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
88 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
89 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
89 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
90 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
90 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
91 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
91 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
92 | $ hg status --color=always --cwd b/1 . |
|
92 | $ hg status --color=always --cwd b/1 . | |
93 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) |
|
93 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) | |
94 | $ hg status --color=always --cwd b/1 .. |
|
94 | $ hg status --color=always --cwd b/1 .. | |
95 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) |
|
95 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_1\x1b[0m (esc) | |
96 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../2/in_b_2\x1b[0m (esc) |
|
96 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../2/in_b_2\x1b[0m (esc) | |
97 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) |
|
97 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) | |
98 |
|
98 | |||
99 | $ hg status --color=always --cwd b/2 |
|
99 | $ hg status --color=always --cwd b/2 | |
100 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) |
|
100 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/1/in_a_1\x1b[0m (esc) | |
101 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) |
|
101 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4ma/in_a\x1b[0m (esc) | |
102 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) |
|
102 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/1/in_b_1\x1b[0m (esc) | |
103 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) |
|
103 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/2/in_b_2\x1b[0m (esc) | |
104 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) |
|
104 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4mb/in_b\x1b[0m (esc) | |
105 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) |
|
105 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_root\x1b[0m (esc) | |
106 | $ hg status --color=always --cwd b/2 . |
|
106 | $ hg status --color=always --cwd b/2 . | |
107 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) |
|
107 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) | |
108 | $ hg status --color=always --cwd b/2 .. |
|
108 | $ hg status --color=always --cwd b/2 .. | |
109 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../1/in_b_1\x1b[0m (esc) |
|
109 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../1/in_b_1\x1b[0m (esc) | |
110 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) |
|
110 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4min_b_2\x1b[0m (esc) | |
111 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) |
|
111 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4m../in_b\x1b[0m (esc) | |
112 |
|
112 | |||
113 | Make sure --color=never works |
|
113 | Make sure --color=never works | |
114 | $ hg status --color=never |
|
114 | $ hg status --color=never | |
115 | ? a/1/in_a_1 |
|
115 | ? a/1/in_a_1 | |
116 | ? a/in_a |
|
116 | ? a/in_a | |
117 | ? b/1/in_b_1 |
|
117 | ? b/1/in_b_1 | |
118 | ? b/2/in_b_2 |
|
118 | ? b/2/in_b_2 | |
119 | ? b/in_b |
|
119 | ? b/in_b | |
120 | ? in_root |
|
120 | ? in_root | |
121 |
|
121 | |||
|
122 | Make sure ui.formatted=False works | |||
|
123 | $ hg status --config ui.formatted=False | |||
|
124 | ? a/1/in_a_1 | |||
|
125 | ? a/in_a | |||
|
126 | ? b/1/in_b_1 | |||
|
127 | ? b/2/in_b_2 | |||
|
128 | ? b/in_b | |||
|
129 | ? in_root | |||
|
130 | ||||
122 | $ cd .. |
|
131 | $ cd .. | |
123 |
|
132 | |||
124 | $ hg init repo2 |
|
133 | $ hg init repo2 | |
125 | $ cd repo2 |
|
134 | $ cd repo2 | |
126 | $ touch modified removed deleted ignored |
|
135 | $ touch modified removed deleted ignored | |
127 | $ echo "^ignored$" > .hgignore |
|
136 | $ echo "^ignored$" > .hgignore | |
128 | $ hg ci -A -m 'initial checkin' |
|
137 | $ hg ci -A -m 'initial checkin' | |
129 | adding .hgignore |
|
138 | adding .hgignore | |
130 | adding deleted |
|
139 | adding deleted | |
131 | adding modified |
|
140 | adding modified | |
132 | adding removed |
|
141 | adding removed | |
133 | $ touch modified added unknown ignored |
|
142 | $ touch modified added unknown ignored | |
134 | $ hg add added |
|
143 | $ hg add added | |
135 | $ hg remove removed |
|
144 | $ hg remove removed | |
136 | $ rm deleted |
|
145 | $ rm deleted | |
137 |
|
146 | |||
138 | hg status: |
|
147 | hg status: | |
139 |
|
148 | |||
140 | $ hg status --color=always |
|
149 | $ hg status --color=always | |
141 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
150 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
142 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
151 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
143 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
152 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
144 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
153 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
145 |
|
154 | |||
146 | hg status modified added removed deleted unknown never-existed ignored: |
|
155 | hg status modified added removed deleted unknown never-existed ignored: | |
147 |
|
156 | |||
148 | $ hg status --color=always modified added removed deleted unknown never-existed ignored |
|
157 | $ hg status --color=always modified added removed deleted unknown never-existed ignored | |
149 | never-existed: * (glob) |
|
158 | never-existed: * (glob) | |
150 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
159 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
151 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
160 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
152 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
161 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
153 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
162 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
154 |
|
163 | |||
155 | $ hg copy modified copied |
|
164 | $ hg copy modified copied | |
156 |
|
165 | |||
157 | hg status -C: |
|
166 | hg status -C: | |
158 |
|
167 | |||
159 | $ hg status --color=always -C |
|
168 | $ hg status --color=always -C | |
160 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
169 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
161 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
170 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) | |
162 | \x1b[0;0m modified\x1b[0m (esc) |
|
171 | \x1b[0;0m modified\x1b[0m (esc) | |
163 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
172 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
164 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
173 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
165 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
174 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
166 |
|
175 | |||
167 | hg status -A: |
|
176 | hg status -A: | |
168 |
|
177 | |||
169 | $ hg status --color=always -A |
|
178 | $ hg status --color=always -A | |
170 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
179 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
171 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
180 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) | |
172 | \x1b[0;0m modified\x1b[0m (esc) |
|
181 | \x1b[0;0m modified\x1b[0m (esc) | |
173 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
182 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
174 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
183 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
175 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
184 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
176 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignored\x1b[0m (esc) |
|
185 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignored\x1b[0m (esc) | |
177 | \x1b[0;0mC \x1b[0m\x1b[0;0m.hgignore\x1b[0m (esc) |
|
186 | \x1b[0;0mC \x1b[0m\x1b[0;0m.hgignore\x1b[0m (esc) | |
178 | \x1b[0;0mC \x1b[0m\x1b[0;0mmodified\x1b[0m (esc) |
|
187 | \x1b[0;0mC \x1b[0m\x1b[0;0mmodified\x1b[0m (esc) | |
179 |
|
188 | |||
180 | hg status -A (with terminfo color): |
|
189 | hg status -A (with terminfo color): | |
181 |
|
190 | |||
182 | $ mkdir "$TESTTMP/terminfo" |
|
191 | $ mkdir "$TESTTMP/terminfo" | |
183 | $ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti" |
|
192 | $ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti" | |
184 | $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --color=always -A |
|
193 | $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --color=always -A | |
185 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1madded\x1b[30m (esc) |
|
194 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1madded\x1b[30m (esc) | |
186 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1mcopied\x1b[30m (esc) |
|
195 | \x1b[30m\x1b[32m\x1b[1mA \x1b[30m\x1b[30m\x1b[32m\x1b[1mcopied\x1b[30m (esc) | |
187 | \x1b[30m\x1b[30m modified\x1b[30m (esc) |
|
196 | \x1b[30m\x1b[30m modified\x1b[30m (esc) | |
188 | \x1b[30m\x1b[31m\x1b[1mR \x1b[30m\x1b[30m\x1b[31m\x1b[1mremoved\x1b[30m (esc) |
|
197 | \x1b[30m\x1b[31m\x1b[1mR \x1b[30m\x1b[30m\x1b[31m\x1b[1mremoved\x1b[30m (esc) | |
189 | \x1b[30m\x1b[36m\x1b[1m\x1b[4m! \x1b[30m\x1b[30m\x1b[36m\x1b[1m\x1b[4mdeleted\x1b[30m (esc) |
|
198 | \x1b[30m\x1b[36m\x1b[1m\x1b[4m! \x1b[30m\x1b[30m\x1b[36m\x1b[1m\x1b[4mdeleted\x1b[30m (esc) | |
190 | \x1b[30m\x1b[35m\x1b[1m\x1b[4m? \x1b[30m\x1b[30m\x1b[35m\x1b[1m\x1b[4munknown\x1b[30m (esc) |
|
199 | \x1b[30m\x1b[35m\x1b[1m\x1b[4m? \x1b[30m\x1b[30m\x1b[35m\x1b[1m\x1b[4munknown\x1b[30m (esc) | |
191 | \x1b[30m\x1b[30m\x1b[1mI \x1b[30m\x1b[30m\x1b[30m\x1b[1mignored\x1b[30m (esc) |
|
200 | \x1b[30m\x1b[30m\x1b[1mI \x1b[30m\x1b[30m\x1b[30m\x1b[1mignored\x1b[30m (esc) | |
192 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30m.hgignore\x1b[30m (esc) |
|
201 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30m.hgignore\x1b[30m (esc) | |
193 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30mmodified\x1b[30m (esc) |
|
202 | \x1b[30m\x1b[30mC \x1b[30m\x1b[30m\x1b[30mmodified\x1b[30m (esc) | |
194 |
|
203 | |||
195 |
|
204 | |||
196 | $ echo "^ignoreddir$" > .hgignore |
|
205 | $ echo "^ignoreddir$" > .hgignore | |
197 | $ mkdir ignoreddir |
|
206 | $ mkdir ignoreddir | |
198 | $ touch ignoreddir/file |
|
207 | $ touch ignoreddir/file | |
199 |
|
208 | |||
200 | hg status ignoreddir/file: |
|
209 | hg status ignoreddir/file: | |
201 |
|
210 | |||
202 | $ hg status --color=always ignoreddir/file |
|
211 | $ hg status --color=always ignoreddir/file | |
203 |
|
212 | |||
204 | hg status -i ignoreddir/file: |
|
213 | hg status -i ignoreddir/file: | |
205 |
|
214 | |||
206 | $ hg status --color=always -i ignoreddir/file |
|
215 | $ hg status --color=always -i ignoreddir/file | |
207 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignoreddir/file\x1b[0m (esc) |
|
216 | \x1b[0;30;1mI \x1b[0m\x1b[0;30;1mignoreddir/file\x1b[0m (esc) | |
208 | $ cd .. |
|
217 | $ cd .. | |
209 |
|
218 | |||
210 | check 'status -q' and some combinations |
|
219 | check 'status -q' and some combinations | |
211 |
|
220 | |||
212 | $ hg init repo3 |
|
221 | $ hg init repo3 | |
213 | $ cd repo3 |
|
222 | $ cd repo3 | |
214 | $ touch modified removed deleted ignored |
|
223 | $ touch modified removed deleted ignored | |
215 | $ echo "^ignored$" > .hgignore |
|
224 | $ echo "^ignored$" > .hgignore | |
216 | $ hg commit -A -m 'initial checkin' |
|
225 | $ hg commit -A -m 'initial checkin' | |
217 | adding .hgignore |
|
226 | adding .hgignore | |
218 | adding deleted |
|
227 | adding deleted | |
219 | adding modified |
|
228 | adding modified | |
220 | adding removed |
|
229 | adding removed | |
221 | $ touch added unknown ignored |
|
230 | $ touch added unknown ignored | |
222 | $ hg add added |
|
231 | $ hg add added | |
223 | $ echo "test" >> modified |
|
232 | $ echo "test" >> modified | |
224 | $ hg remove removed |
|
233 | $ hg remove removed | |
225 | $ rm deleted |
|
234 | $ rm deleted | |
226 | $ hg copy modified copied |
|
235 | $ hg copy modified copied | |
227 |
|
236 | |||
228 | test unknown color |
|
237 | test unknown color | |
229 |
|
238 | |||
230 | $ hg --config color.status.modified=periwinkle status --color=always |
|
239 | $ hg --config color.status.modified=periwinkle status --color=always | |
231 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) |
|
240 | ignoring unknown color/effect 'periwinkle' (configured in color.status.modified) | |
232 | M modified |
|
241 | M modified | |
233 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) |
|
242 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1madded\x1b[0m (esc) | |
234 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) |
|
243 | \x1b[0;32;1mA \x1b[0m\x1b[0;32;1mcopied\x1b[0m (esc) | |
235 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) |
|
244 | \x1b[0;31;1mR \x1b[0m\x1b[0;31;1mremoved\x1b[0m (esc) | |
236 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) |
|
245 | \x1b[0;36;1;4m! \x1b[0m\x1b[0;36;1;4mdeleted\x1b[0m (esc) | |
237 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) |
|
246 | \x1b[0;35;1;4m? \x1b[0m\x1b[0;35;1;4munknown\x1b[0m (esc) | |
238 |
|
247 | |||
239 | Run status with 2 different flags. |
|
248 | Run status with 2 different flags. | |
240 | Check if result is the same or different. |
|
249 | Check if result is the same or different. | |
241 | If result is not as expected, raise error |
|
250 | If result is not as expected, raise error | |
242 |
|
251 | |||
243 | $ assert() { |
|
252 | $ assert() { | |
244 | > hg status --color=always $1 > ../a |
|
253 | > hg status --color=always $1 > ../a | |
245 | > hg status --color=always $2 > ../b |
|
254 | > hg status --color=always $2 > ../b | |
246 | > if diff ../a ../b > /dev/null; then |
|
255 | > if diff ../a ../b > /dev/null; then | |
247 | > out=0 |
|
256 | > out=0 | |
248 | > else |
|
257 | > else | |
249 | > out=1 |
|
258 | > out=1 | |
250 | > fi |
|
259 | > fi | |
251 | > if [ $3 -eq 0 ]; then |
|
260 | > if [ $3 -eq 0 ]; then | |
252 | > df="same" |
|
261 | > df="same" | |
253 | > else |
|
262 | > else | |
254 | > df="different" |
|
263 | > df="different" | |
255 | > fi |
|
264 | > fi | |
256 | > if [ $out -ne $3 ]; then |
|
265 | > if [ $out -ne $3 ]; then | |
257 | > echo "Error on $1 and $2, should be $df." |
|
266 | > echo "Error on $1 and $2, should be $df." | |
258 | > fi |
|
267 | > fi | |
259 | > } |
|
268 | > } | |
260 |
|
269 | |||
261 | assert flag1 flag2 [0-same | 1-different] |
|
270 | assert flag1 flag2 [0-same | 1-different] | |
262 |
|
271 | |||
263 | $ assert "-q" "-mard" 0 |
|
272 | $ assert "-q" "-mard" 0 | |
264 | $ assert "-A" "-marduicC" 0 |
|
273 | $ assert "-A" "-marduicC" 0 | |
265 | $ assert "-qA" "-mardcC" 0 |
|
274 | $ assert "-qA" "-mardcC" 0 | |
266 | $ assert "-qAui" "-A" 0 |
|
275 | $ assert "-qAui" "-A" 0 | |
267 | $ assert "-qAu" "-marducC" 0 |
|
276 | $ assert "-qAu" "-marducC" 0 | |
268 | $ assert "-qAi" "-mardicC" 0 |
|
277 | $ assert "-qAi" "-mardicC" 0 | |
269 | $ assert "-qu" "-u" 0 |
|
278 | $ assert "-qu" "-u" 0 | |
270 | $ assert "-q" "-u" 1 |
|
279 | $ assert "-q" "-u" 1 | |
271 | $ assert "-m" "-a" 1 |
|
280 | $ assert "-m" "-a" 1 | |
272 | $ assert "-r" "-d" 1 |
|
281 | $ assert "-r" "-d" 1 | |
273 | $ cd .. |
|
282 | $ cd .. | |
274 |
|
283 | |||
275 | test 'resolve -l' |
|
284 | test 'resolve -l' | |
276 |
|
285 | |||
277 | $ hg init repo4 |
|
286 | $ hg init repo4 | |
278 | $ cd repo4 |
|
287 | $ cd repo4 | |
279 | $ echo "file a" > a |
|
288 | $ echo "file a" > a | |
280 | $ echo "file b" > b |
|
289 | $ echo "file b" > b | |
281 | $ hg add a b |
|
290 | $ hg add a b | |
282 | $ hg commit -m "initial" |
|
291 | $ hg commit -m "initial" | |
283 | $ echo "file a change 1" > a |
|
292 | $ echo "file a change 1" > a | |
284 | $ echo "file b change 1" > b |
|
293 | $ echo "file b change 1" > b | |
285 | $ hg commit -m "head 1" |
|
294 | $ hg commit -m "head 1" | |
286 | $ hg update 0 |
|
295 | $ hg update 0 | |
287 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
296 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
288 | $ echo "file a change 2" > a |
|
297 | $ echo "file a change 2" > a | |
289 | $ echo "file b change 2" > b |
|
298 | $ echo "file b change 2" > b | |
290 | $ hg commit -m "head 2" |
|
299 | $ hg commit -m "head 2" | |
291 | created new head |
|
300 | created new head | |
292 | $ hg merge |
|
301 | $ hg merge | |
293 | merging a |
|
302 | merging a | |
294 | warning: conflicts during merge. |
|
303 | warning: conflicts during merge. | |
295 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
304 | merging a incomplete! (edit conflicts, then use 'hg resolve --mark') | |
296 | merging b |
|
305 | merging b | |
297 | warning: conflicts during merge. |
|
306 | warning: conflicts during merge. | |
298 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
307 | merging b incomplete! (edit conflicts, then use 'hg resolve --mark') | |
299 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved |
|
308 | 0 files updated, 0 files merged, 0 files removed, 2 files unresolved | |
300 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
309 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
301 | [1] |
|
310 | [1] | |
302 | $ hg resolve -m b |
|
311 | $ hg resolve -m b | |
303 |
|
312 | |||
304 | hg resolve with one unresolved, one resolved: |
|
313 | hg resolve with one unresolved, one resolved: | |
305 |
|
314 | |||
306 | $ hg resolve --color=always -l |
|
315 | $ hg resolve --color=always -l | |
307 | \x1b[0;31;1mU a\x1b[0m (esc) |
|
316 | \x1b[0;31;1mU a\x1b[0m (esc) | |
308 | \x1b[0;32;1mR b\x1b[0m (esc) |
|
317 | \x1b[0;32;1mR b\x1b[0m (esc) | |
309 |
|
318 | |||
310 | $ cd .. |
|
319 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now