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