Show More
@@ -1,237 +1,279 b'' | |||||
1 | $ mkdir folder |
|
1 | $ mkdir folder | |
2 | $ cd folder |
|
2 | $ cd folder | |
3 | $ hg init |
|
3 | $ hg init | |
4 | $ mkdir x x/l x/m x/n x/l/u x/l/u/a |
|
4 | $ mkdir x x/l x/m x/n x/l/u x/l/u/a | |
5 | $ touch a b x/aa.o x/bb.o |
|
5 | $ touch a b x/aa.o x/bb.o | |
6 | $ hg status |
|
6 | $ hg status | |
7 | ? a |
|
7 | ? a | |
8 | ? b |
|
8 | ? b | |
9 | ? x/aa.o |
|
9 | ? x/aa.o | |
10 | ? x/bb.o |
|
10 | ? x/bb.o | |
11 |
|
11 | |||
12 | $ hg status --terse u |
|
12 | $ hg status --terse u | |
13 | ? a |
|
13 | ? a | |
14 | ? b |
|
14 | ? b | |
15 | ? x/ |
|
15 | ? x/ | |
16 | $ hg status --terse maudric |
|
16 | $ hg status --terse maudric | |
17 | ? a |
|
17 | ? a | |
18 | ? b |
|
18 | ? b | |
19 | ? x/ |
|
19 | ? x/ | |
20 | $ hg status --terse madric |
|
20 | $ hg status --terse madric | |
21 | ? a |
|
21 | ? a | |
22 | ? b |
|
22 | ? b | |
23 | ? x/aa.o |
|
23 | ? x/aa.o | |
24 | ? x/bb.o |
|
24 | ? x/bb.o | |
25 | $ hg status --terse f |
|
25 | $ hg status --terse f | |
26 | abort: 'f' not recognized |
|
26 | abort: 'f' not recognized | |
27 | [255] |
|
27 | [255] | |
28 |
|
28 | |||
29 | Add a .hgignore so that we can also have ignored files |
|
29 | Add a .hgignore so that we can also have ignored files | |
30 |
|
30 | |||
31 | $ echo ".*\.o" > .hgignore |
|
31 | $ echo ".*\.o" > .hgignore | |
32 | $ hg status |
|
32 | $ hg status | |
33 | ? .hgignore |
|
33 | ? .hgignore | |
34 | ? a |
|
34 | ? a | |
35 | ? b |
|
35 | ? b | |
36 | $ hg status -i |
|
36 | $ hg status -i | |
37 | I x/aa.o |
|
37 | I x/aa.o | |
38 | I x/bb.o |
|
38 | I x/bb.o | |
39 |
|
39 | |||
40 | Tersing ignored files |
|
40 | Tersing ignored files | |
41 | $ hg status -t i --ignored |
|
41 | $ hg status -t i --ignored | |
42 | I x/ |
|
42 | I x/ | |
43 |
|
43 | |||
44 | Adding more files |
|
44 | Adding more files | |
45 | $ mkdir y |
|
45 | $ mkdir y | |
46 | $ touch x/aa x/bb y/l y/m y/l.o y/m.o |
|
46 | $ touch x/aa x/bb y/l y/m y/l.o y/m.o | |
47 | $ touch x/l/aa x/m/aa x/n/aa x/l/u/bb x/l/u/a/bb |
|
47 | $ touch x/l/aa x/m/aa x/n/aa x/l/u/bb x/l/u/a/bb | |
48 |
|
48 | |||
49 | $ hg status |
|
49 | $ hg status | |
50 | ? .hgignore |
|
50 | ? .hgignore | |
51 | ? a |
|
51 | ? a | |
52 | ? b |
|
52 | ? b | |
53 | ? x/aa |
|
53 | ? x/aa | |
54 | ? x/bb |
|
54 | ? x/bb | |
55 | ? x/l/aa |
|
55 | ? x/l/aa | |
56 | ? x/l/u/a/bb |
|
56 | ? x/l/u/a/bb | |
57 | ? x/l/u/bb |
|
57 | ? x/l/u/bb | |
58 | ? x/m/aa |
|
58 | ? x/m/aa | |
59 | ? x/n/aa |
|
59 | ? x/n/aa | |
60 | ? y/l |
|
60 | ? y/l | |
61 | ? y/m |
|
61 | ? y/m | |
62 |
|
62 | |||
63 | $ hg status --terse u |
|
63 | $ hg status --terse u | |
64 | ? .hgignore |
|
64 | ? .hgignore | |
65 | ? a |
|
65 | ? a | |
66 | ? b |
|
66 | ? b | |
67 | ? x/ |
|
67 | ? x/ | |
68 | ? y/ |
|
68 | ? y/ | |
69 |
|
69 | |||
|
70 | Run from subdirectory | |||
|
71 | $ hg status --terse u --cwd x/l | |||
|
72 | ? .hgignore | |||
|
73 | ? a | |||
|
74 | ? b | |||
|
75 | ? x/ | |||
|
76 | ? y/ | |||
|
77 | $ relstatus() { | |||
|
78 | > hg status --terse u --config commands.status.relative=1 "$@"; | |||
|
79 | > } | |||
|
80 | This should probably have {"l/", "m/", "n/"} instead of {"."}. They should | |||
|
81 | probably come after "../y/". | |||
|
82 | $ relstatus --cwd x | |||
|
83 | ? ../.hgignore | |||
|
84 | ? ../a | |||
|
85 | ? ../b | |||
|
86 | ? . | |||
|
87 | ? ../y/ | |||
|
88 | This should probably have {"u/", "../m/", "../n/"} instead of {"../"}. | |||
|
89 | $ relstatus --cwd x/l | |||
|
90 | ? ../../.hgignore | |||
|
91 | ? ../../a | |||
|
92 | ? ../../b | |||
|
93 | ? ../ | |||
|
94 | ? ../../y/ | |||
|
95 | This should probably have {"a/", "bb", "../aa", "../../m/", "../../n/"} | |||
|
96 | instead of {"../../"}. | |||
|
97 | $ relstatus --cwd x/l/u | |||
|
98 | ? ../../../.hgignore | |||
|
99 | ? ../../../a | |||
|
100 | ? ../../../b | |||
|
101 | ? ../../ | |||
|
102 | ? ../../../y/ | |||
|
103 | This should probably have {"bb", "../bb", "../../aa", "../../../m/", | |||
|
104 | "../../../n/"} instead of {"../../../"}. | |||
|
105 | $ relstatus --cwd x/l/u/a | |||
|
106 | ? ../../../../.hgignore | |||
|
107 | ? ../../../../a | |||
|
108 | ? ../../../../b | |||
|
109 | ? ../../../ | |||
|
110 | ? ../../../../y/ | |||
|
111 | ||||
70 | $ hg add x/aa x/bb .hgignore |
|
112 | $ hg add x/aa x/bb .hgignore | |
71 | $ hg status --terse au |
|
113 | $ hg status --terse au | |
72 | A .hgignore |
|
114 | A .hgignore | |
73 | A x/aa |
|
115 | A x/aa | |
74 | A x/bb |
|
116 | A x/bb | |
75 | ? a |
|
117 | ? a | |
76 | ? b |
|
118 | ? b | |
77 | ? x/l/ |
|
119 | ? x/l/ | |
78 | ? x/m/ |
|
120 | ? x/m/ | |
79 | ? x/n/ |
|
121 | ? x/n/ | |
80 | ? y/ |
|
122 | ? y/ | |
81 |
|
123 | |||
82 | Including ignored files |
|
124 | Including ignored files | |
83 |
|
125 | |||
84 | $ hg status --terse aui |
|
126 | $ hg status --terse aui | |
85 | A .hgignore |
|
127 | A .hgignore | |
86 | A x/aa |
|
128 | A x/aa | |
87 | A x/bb |
|
129 | A x/bb | |
88 | ? a |
|
130 | ? a | |
89 | ? b |
|
131 | ? b | |
90 | ? x/l/ |
|
132 | ? x/l/ | |
91 | ? x/m/ |
|
133 | ? x/m/ | |
92 | ? x/n/ |
|
134 | ? x/n/ | |
93 | ? y/l |
|
135 | ? y/l | |
94 | ? y/m |
|
136 | ? y/m | |
95 | $ hg status --terse au -i |
|
137 | $ hg status --terse au -i | |
96 | I x/aa.o |
|
138 | I x/aa.o | |
97 | I x/bb.o |
|
139 | I x/bb.o | |
98 | I y/l.o |
|
140 | I y/l.o | |
99 | I y/m.o |
|
141 | I y/m.o | |
100 |
|
142 | |||
101 | Committing some of the files |
|
143 | Committing some of the files | |
102 |
|
144 | |||
103 | $ hg commit x/aa x/bb .hgignore -m "First commit" |
|
145 | $ hg commit x/aa x/bb .hgignore -m "First commit" | |
104 | $ hg status |
|
146 | $ hg status | |
105 | ? a |
|
147 | ? a | |
106 | ? b |
|
148 | ? b | |
107 | ? x/l/aa |
|
149 | ? x/l/aa | |
108 | ? x/l/u/a/bb |
|
150 | ? x/l/u/a/bb | |
109 | ? x/l/u/bb |
|
151 | ? x/l/u/bb | |
110 | ? x/m/aa |
|
152 | ? x/m/aa | |
111 | ? x/n/aa |
|
153 | ? x/n/aa | |
112 | ? y/l |
|
154 | ? y/l | |
113 | ? y/m |
|
155 | ? y/m | |
114 | $ hg status --terse mardu |
|
156 | $ hg status --terse mardu | |
115 | ? a |
|
157 | ? a | |
116 | ? b |
|
158 | ? b | |
117 | ? x/l/ |
|
159 | ? x/l/ | |
118 | ? x/m/ |
|
160 | ? x/m/ | |
119 | ? x/n/ |
|
161 | ? x/n/ | |
120 | ? y/ |
|
162 | ? y/ | |
121 |
|
163 | |||
122 | Modifying already committed files |
|
164 | Modifying already committed files | |
123 |
|
165 | |||
124 | $ echo "Hello" >> x/aa |
|
166 | $ echo "Hello" >> x/aa | |
125 | $ echo "World" >> x/bb |
|
167 | $ echo "World" >> x/bb | |
126 | $ hg status --terse maurdc |
|
168 | $ hg status --terse maurdc | |
127 | M x/aa |
|
169 | M x/aa | |
128 | M x/bb |
|
170 | M x/bb | |
129 | ? a |
|
171 | ? a | |
130 | ? b |
|
172 | ? b | |
131 | ? x/l/ |
|
173 | ? x/l/ | |
132 | ? x/m/ |
|
174 | ? x/m/ | |
133 | ? x/n/ |
|
175 | ? x/n/ | |
134 | ? y/ |
|
176 | ? y/ | |
135 |
|
177 | |||
136 | Respecting other flags |
|
178 | Respecting other flags | |
137 |
|
179 | |||
138 | $ hg status --terse marduic --all |
|
180 | $ hg status --terse marduic --all | |
139 | M x/aa |
|
181 | M x/aa | |
140 | M x/bb |
|
182 | M x/bb | |
141 | ? a |
|
183 | ? a | |
142 | ? b |
|
184 | ? b | |
143 | ? x/l/ |
|
185 | ? x/l/ | |
144 | ? x/m/ |
|
186 | ? x/m/ | |
145 | ? x/n/ |
|
187 | ? x/n/ | |
146 | ? y/l |
|
188 | ? y/l | |
147 | ? y/m |
|
189 | ? y/m | |
148 | I x/aa.o |
|
190 | I x/aa.o | |
149 | I x/bb.o |
|
191 | I x/bb.o | |
150 | I y/l.o |
|
192 | I y/l.o | |
151 | I y/m.o |
|
193 | I y/m.o | |
152 | C .hgignore |
|
194 | C .hgignore | |
153 | $ hg status --terse marduic -a |
|
195 | $ hg status --terse marduic -a | |
154 | $ hg status --terse marduic -c |
|
196 | $ hg status --terse marduic -c | |
155 | C .hgignore |
|
197 | C .hgignore | |
156 | $ hg status --terse marduic -m |
|
198 | $ hg status --terse marduic -m | |
157 | M x/aa |
|
199 | M x/aa | |
158 | M x/bb |
|
200 | M x/bb | |
159 |
|
201 | |||
160 | Passing 'i' in terse value will consider the ignored files while tersing |
|
202 | Passing 'i' in terse value will consider the ignored files while tersing | |
161 |
|
203 | |||
162 | $ hg status --terse marduic -u |
|
204 | $ hg status --terse marduic -u | |
163 | ? a |
|
205 | ? a | |
164 | ? b |
|
206 | ? b | |
165 | ? x/l/ |
|
207 | ? x/l/ | |
166 | ? x/m/ |
|
208 | ? x/m/ | |
167 | ? x/n/ |
|
209 | ? x/n/ | |
168 | ? y/l |
|
210 | ? y/l | |
169 | ? y/m |
|
211 | ? y/m | |
170 |
|
212 | |||
171 | Omitting 'i' in terse value does not consider ignored files while tersing |
|
213 | Omitting 'i' in terse value does not consider ignored files while tersing | |
172 |
|
214 | |||
173 | $ hg status --terse marduc -u |
|
215 | $ hg status --terse marduc -u | |
174 | ? a |
|
216 | ? a | |
175 | ? b |
|
217 | ? b | |
176 | ? x/l/ |
|
218 | ? x/l/ | |
177 | ? x/m/ |
|
219 | ? x/m/ | |
178 | ? x/n/ |
|
220 | ? x/n/ | |
179 | ? y/ |
|
221 | ? y/ | |
180 |
|
222 | |||
181 | Trying with --rev |
|
223 | Trying with --rev | |
182 |
|
224 | |||
183 | $ hg status --terse marduic --rev 0 --rev 1 |
|
225 | $ hg status --terse marduic --rev 0 --rev 1 | |
184 | abort: cannot use --terse with --rev |
|
226 | abort: cannot use --terse with --rev | |
185 | [255] |
|
227 | [255] | |
186 |
|
228 | |||
187 | Config item to set the default terseness |
|
229 | Config item to set the default terseness | |
188 | $ cat <<EOF >> $HGRCPATH |
|
230 | $ cat <<EOF >> $HGRCPATH | |
189 | > [commands] |
|
231 | > [commands] | |
190 | > status.terse = u |
|
232 | > status.terse = u | |
191 | > EOF |
|
233 | > EOF | |
192 | $ hg status -mu |
|
234 | $ hg status -mu | |
193 | M x/aa |
|
235 | M x/aa | |
194 | M x/bb |
|
236 | M x/bb | |
195 | ? a |
|
237 | ? a | |
196 | ? b |
|
238 | ? b | |
197 | ? x/l/ |
|
239 | ? x/l/ | |
198 | ? x/m/ |
|
240 | ? x/m/ | |
199 | ? x/n/ |
|
241 | ? x/n/ | |
200 | ? y/ |
|
242 | ? y/ | |
201 |
|
243 | |||
202 | Command line flag overrides the default |
|
244 | Command line flag overrides the default | |
203 | $ hg status --terse= |
|
245 | $ hg status --terse= | |
204 | M x/aa |
|
246 | M x/aa | |
205 | M x/bb |
|
247 | M x/bb | |
206 | ? a |
|
248 | ? a | |
207 | ? b |
|
249 | ? b | |
208 | ? x/l/aa |
|
250 | ? x/l/aa | |
209 | ? x/l/u/a/bb |
|
251 | ? x/l/u/a/bb | |
210 | ? x/l/u/bb |
|
252 | ? x/l/u/bb | |
211 | ? x/m/aa |
|
253 | ? x/m/aa | |
212 | ? x/n/aa |
|
254 | ? x/n/aa | |
213 | ? y/l |
|
255 | ? y/l | |
214 | ? y/m |
|
256 | ? y/m | |
215 | $ hg status --terse=mardu |
|
257 | $ hg status --terse=mardu | |
216 | M x/aa |
|
258 | M x/aa | |
217 | M x/bb |
|
259 | M x/bb | |
218 | ? a |
|
260 | ? a | |
219 | ? b |
|
261 | ? b | |
220 | ? x/l/ |
|
262 | ? x/l/ | |
221 | ? x/m/ |
|
263 | ? x/m/ | |
222 | ? x/n/ |
|
264 | ? x/n/ | |
223 | ? y/ |
|
265 | ? y/ | |
224 |
|
266 | |||
225 | Specifying --rev should still work, with the terseness disabled. |
|
267 | Specifying --rev should still work, with the terseness disabled. | |
226 | $ hg status --rev 0 |
|
268 | $ hg status --rev 0 | |
227 | M x/aa |
|
269 | M x/aa | |
228 | M x/bb |
|
270 | M x/bb | |
229 | ? a |
|
271 | ? a | |
230 | ? b |
|
272 | ? b | |
231 | ? x/l/aa |
|
273 | ? x/l/aa | |
232 | ? x/l/u/a/bb |
|
274 | ? x/l/u/a/bb | |
233 | ? x/l/u/bb |
|
275 | ? x/l/u/bb | |
234 | ? x/m/aa |
|
276 | ? x/m/aa | |
235 | ? x/n/aa |
|
277 | ? x/n/aa | |
236 | ? y/l |
|
278 | ? y/l | |
237 | ? y/m |
|
279 | ? y/m |
General Comments 0
You need to be logged in to leave comments.
Login now