Show More
@@ -1,500 +1,500 b'' | |||||
1 | Create test repository: |
|
1 | Create test repository: | |
2 |
|
2 | |||
3 | $ hg init repo |
|
3 | $ hg init repo | |
4 | $ cd repo |
|
4 | $ cd repo | |
5 | $ echo x1 > x.txt |
|
5 | $ echo x1 > x.txt | |
6 |
|
6 | |||
7 | $ hg init foo |
|
7 | $ hg init foo | |
8 | $ cd foo |
|
8 | $ cd foo | |
9 | $ echo y1 > y.txt |
|
9 | $ echo y1 > y.txt | |
10 |
|
10 | |||
11 | $ hg init bar |
|
11 | $ hg init bar | |
12 | $ cd bar |
|
12 | $ cd bar | |
13 | $ echo z1 > z.txt |
|
13 | $ echo z1 > z.txt | |
14 |
|
14 | |||
15 | $ cd .. |
|
15 | $ cd .. | |
16 | $ echo 'bar = bar' > .hgsub |
|
16 | $ echo 'bar = bar' > .hgsub | |
17 |
|
17 | |||
18 | $ cd .. |
|
18 | $ cd .. | |
19 | $ echo 'foo = foo' > .hgsub |
|
19 | $ echo 'foo = foo' > .hgsub | |
20 |
|
20 | |||
21 | Add files --- .hgsub files must go first to trigger subrepos: |
|
21 | Add files --- .hgsub files must go first to trigger subrepos: | |
22 |
|
22 | |||
23 | $ hg add -S .hgsub |
|
23 | $ hg add -S .hgsub | |
24 | $ hg add -S foo/.hgsub |
|
24 | $ hg add -S foo/.hgsub | |
25 | $ hg add -S foo/bar |
|
25 | $ hg add -S foo/bar | |
26 | adding foo/bar/z.txt (glob) |
|
26 | adding foo/bar/z.txt (glob) | |
27 | $ hg add -S |
|
27 | $ hg add -S | |
28 | adding x.txt |
|
28 | adding x.txt | |
29 | adding foo/y.txt (glob) |
|
29 | adding foo/y.txt (glob) | |
30 |
|
30 | |||
31 | Test recursive status without committing anything: |
|
31 | Test recursive status without committing anything: | |
32 |
|
32 | |||
33 | $ hg status -S |
|
33 | $ hg status -S | |
34 | A .hgsub |
|
34 | A .hgsub | |
35 | A foo/.hgsub |
|
35 | A foo/.hgsub | |
36 | A foo/bar/z.txt |
|
36 | A foo/bar/z.txt | |
37 | A foo/y.txt |
|
37 | A foo/y.txt | |
38 | A x.txt |
|
38 | A x.txt | |
39 |
|
39 | |||
40 | Test recursive diff without committing anything: |
|
40 | Test recursive diff without committing anything: | |
41 |
|
41 | |||
42 | $ hg diff --nodates -S foo |
|
42 | $ hg diff --nodates -S foo | |
43 | diff -r 000000000000 foo/.hgsub |
|
43 | diff -r 000000000000 foo/.hgsub | |
44 | --- /dev/null |
|
44 | --- /dev/null | |
45 | +++ b/foo/.hgsub |
|
45 | +++ b/foo/.hgsub | |
46 | @@ -0,0 +1,1 @@ |
|
46 | @@ -0,0 +1,1 @@ | |
47 | +bar = bar |
|
47 | +bar = bar | |
48 | diff -r 000000000000 foo/y.txt |
|
48 | diff -r 000000000000 foo/y.txt | |
49 | --- /dev/null |
|
49 | --- /dev/null | |
50 | +++ b/foo/y.txt |
|
50 | +++ b/foo/y.txt | |
51 | @@ -0,0 +1,1 @@ |
|
51 | @@ -0,0 +1,1 @@ | |
52 | +y1 |
|
52 | +y1 | |
53 | diff -r 000000000000 foo/bar/z.txt |
|
53 | diff -r 000000000000 foo/bar/z.txt | |
54 | --- /dev/null |
|
54 | --- /dev/null | |
55 | +++ b/foo/bar/z.txt |
|
55 | +++ b/foo/bar/z.txt | |
56 | @@ -0,0 +1,1 @@ |
|
56 | @@ -0,0 +1,1 @@ | |
57 | +z1 |
|
57 | +z1 | |
58 |
|
58 | |||
59 | Commits: |
|
59 | Commits: | |
60 |
|
60 | |||
61 | $ hg commit -m fails |
|
61 | $ hg commit -m fails | |
62 | abort: uncommitted changes in subrepo foo |
|
62 | abort: uncommitted changes in subrepo foo | |
63 | (use --subrepos for recursive commit) |
|
63 | (use --subrepos for recursive commit) | |
64 | [255] |
|
64 | [255] | |
65 |
|
65 | |||
66 | The --subrepos flag overwrite the config setting: |
|
66 | The --subrepos flag overwrite the config setting: | |
67 |
|
67 | |||
68 | $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos |
|
68 | $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos | |
69 | committing subrepository foo |
|
69 | committing subrepository foo | |
70 | committing subrepository foo/bar (glob) |
|
70 | committing subrepository foo/bar (glob) | |
71 |
|
71 | |||
72 | $ cd foo |
|
72 | $ cd foo | |
73 | $ echo y2 >> y.txt |
|
73 | $ echo y2 >> y.txt | |
74 | $ hg commit -m 0-1-0 |
|
74 | $ hg commit -m 0-1-0 | |
75 |
|
75 | |||
76 | $ cd bar |
|
76 | $ cd bar | |
77 | $ echo z2 >> z.txt |
|
77 | $ echo z2 >> z.txt | |
78 | $ hg commit -m 0-1-1 |
|
78 | $ hg commit -m 0-1-1 | |
79 |
|
79 | |||
80 | $ cd .. |
|
80 | $ cd .. | |
81 | $ hg commit -m 0-2-1 |
|
81 | $ hg commit -m 0-2-1 | |
82 |
|
82 | |||
83 | $ cd .. |
|
83 | $ cd .. | |
84 | $ hg commit -m 1-2-1 |
|
84 | $ hg commit -m 1-2-1 | |
85 |
|
85 | |||
86 | Change working directory: |
|
86 | Change working directory: | |
87 |
|
87 | |||
88 | $ echo y3 >> foo/y.txt |
|
88 | $ echo y3 >> foo/y.txt | |
89 | $ echo z3 >> foo/bar/z.txt |
|
89 | $ echo z3 >> foo/bar/z.txt | |
90 | $ hg status -S |
|
90 | $ hg status -S | |
91 | M foo/bar/z.txt |
|
91 | M foo/bar/z.txt | |
92 | M foo/y.txt |
|
92 | M foo/y.txt | |
93 | $ hg diff --nodates -S |
|
93 | $ hg diff --nodates -S | |
94 | diff -r d254738c5f5e foo/y.txt |
|
94 | diff -r d254738c5f5e foo/y.txt | |
95 | --- a/foo/y.txt |
|
95 | --- a/foo/y.txt | |
96 | +++ b/foo/y.txt |
|
96 | +++ b/foo/y.txt | |
97 | @@ -1,2 +1,3 @@ |
|
97 | @@ -1,2 +1,3 @@ | |
98 | y1 |
|
98 | y1 | |
99 | y2 |
|
99 | y2 | |
100 | +y3 |
|
100 | +y3 | |
101 | diff -r 9647f22de499 foo/bar/z.txt |
|
101 | diff -r 9647f22de499 foo/bar/z.txt | |
102 | --- a/foo/bar/z.txt |
|
102 | --- a/foo/bar/z.txt | |
103 | +++ b/foo/bar/z.txt |
|
103 | +++ b/foo/bar/z.txt | |
104 | @@ -1,2 +1,3 @@ |
|
104 | @@ -1,2 +1,3 @@ | |
105 | z1 |
|
105 | z1 | |
106 | z2 |
|
106 | z2 | |
107 | +z3 |
|
107 | +z3 | |
108 |
|
108 | |||
109 | Status call crossing repository boundaries: |
|
109 | Status call crossing repository boundaries: | |
110 |
|
110 | |||
111 | $ hg status -S foo/bar/z.txt |
|
111 | $ hg status -S foo/bar/z.txt | |
112 | M foo/bar/z.txt |
|
112 | M foo/bar/z.txt | |
113 | $ hg status -S -I 'foo/?.txt' |
|
113 | $ hg status -S -I 'foo/?.txt' | |
114 | M foo/y.txt |
|
114 | M foo/y.txt | |
115 | $ hg status -S -I '**/?.txt' |
|
115 | $ hg status -S -I '**/?.txt' | |
116 | M foo/bar/z.txt |
|
116 | M foo/bar/z.txt | |
117 | M foo/y.txt |
|
117 | M foo/y.txt | |
118 | $ hg diff --nodates -S -I '**/?.txt' |
|
118 | $ hg diff --nodates -S -I '**/?.txt' | |
119 | diff -r d254738c5f5e foo/y.txt |
|
119 | diff -r d254738c5f5e foo/y.txt | |
120 | --- a/foo/y.txt |
|
120 | --- a/foo/y.txt | |
121 | +++ b/foo/y.txt |
|
121 | +++ b/foo/y.txt | |
122 | @@ -1,2 +1,3 @@ |
|
122 | @@ -1,2 +1,3 @@ | |
123 | y1 |
|
123 | y1 | |
124 | y2 |
|
124 | y2 | |
125 | +y3 |
|
125 | +y3 | |
126 | diff -r 9647f22de499 foo/bar/z.txt |
|
126 | diff -r 9647f22de499 foo/bar/z.txt | |
127 | --- a/foo/bar/z.txt |
|
127 | --- a/foo/bar/z.txt | |
128 | +++ b/foo/bar/z.txt |
|
128 | +++ b/foo/bar/z.txt | |
129 | @@ -1,2 +1,3 @@ |
|
129 | @@ -1,2 +1,3 @@ | |
130 | z1 |
|
130 | z1 | |
131 | z2 |
|
131 | z2 | |
132 | +z3 |
|
132 | +z3 | |
133 |
|
133 | |||
134 | Status from within a subdirectory: |
|
134 | Status from within a subdirectory: | |
135 |
|
135 | |||
136 | $ mkdir dir |
|
136 | $ mkdir dir | |
137 | $ cd dir |
|
137 | $ cd dir | |
138 | $ echo a1 > a.txt |
|
138 | $ echo a1 > a.txt | |
139 | $ hg status -S |
|
139 | $ hg status -S | |
140 | M foo/bar/z.txt |
|
140 | M foo/bar/z.txt | |
141 | M foo/y.txt |
|
141 | M foo/y.txt | |
142 | ? dir/a.txt |
|
142 | ? dir/a.txt | |
143 | $ hg diff --nodates -S |
|
143 | $ hg diff --nodates -S | |
144 | diff -r d254738c5f5e foo/y.txt |
|
144 | diff -r d254738c5f5e foo/y.txt | |
145 | --- a/foo/y.txt |
|
145 | --- a/foo/y.txt | |
146 | +++ b/foo/y.txt |
|
146 | +++ b/foo/y.txt | |
147 | @@ -1,2 +1,3 @@ |
|
147 | @@ -1,2 +1,3 @@ | |
148 | y1 |
|
148 | y1 | |
149 | y2 |
|
149 | y2 | |
150 | +y3 |
|
150 | +y3 | |
151 | diff -r 9647f22de499 foo/bar/z.txt |
|
151 | diff -r 9647f22de499 foo/bar/z.txt | |
152 | --- a/foo/bar/z.txt |
|
152 | --- a/foo/bar/z.txt | |
153 | +++ b/foo/bar/z.txt |
|
153 | +++ b/foo/bar/z.txt | |
154 | @@ -1,2 +1,3 @@ |
|
154 | @@ -1,2 +1,3 @@ | |
155 | z1 |
|
155 | z1 | |
156 | z2 |
|
156 | z2 | |
157 | +z3 |
|
157 | +z3 | |
158 |
|
158 | |||
159 | Status with relative path: |
|
159 | Status with relative path: | |
160 |
|
160 | |||
161 | $ hg status -S .. |
|
161 | $ hg status -S .. | |
162 | M ../foo/bar/z.txt |
|
162 | M ../foo/bar/z.txt | |
163 | M ../foo/y.txt |
|
163 | M ../foo/y.txt | |
164 | ? a.txt |
|
164 | ? a.txt | |
165 | $ hg diff --nodates -S .. |
|
165 | $ hg diff --nodates -S .. | |
166 | diff -r d254738c5f5e foo/y.txt |
|
166 | diff -r d254738c5f5e foo/y.txt | |
167 | --- a/foo/y.txt |
|
167 | --- a/foo/y.txt | |
168 | +++ b/foo/y.txt |
|
168 | +++ b/foo/y.txt | |
169 | @@ -1,2 +1,3 @@ |
|
169 | @@ -1,2 +1,3 @@ | |
170 | y1 |
|
170 | y1 | |
171 | y2 |
|
171 | y2 | |
172 | +y3 |
|
172 | +y3 | |
173 | diff -r 9647f22de499 foo/bar/z.txt |
|
173 | diff -r 9647f22de499 foo/bar/z.txt | |
174 | --- a/foo/bar/z.txt |
|
174 | --- a/foo/bar/z.txt | |
175 | +++ b/foo/bar/z.txt |
|
175 | +++ b/foo/bar/z.txt | |
176 | @@ -1,2 +1,3 @@ |
|
176 | @@ -1,2 +1,3 @@ | |
177 | z1 |
|
177 | z1 | |
178 | z2 |
|
178 | z2 | |
179 | +z3 |
|
179 | +z3 | |
180 | $ cd .. |
|
180 | $ cd .. | |
181 |
|
181 | |||
182 | Cleanup and final commit: |
|
182 | Cleanup and final commit: | |
183 |
|
183 | |||
184 | $ rm -r dir |
|
184 | $ rm -r dir | |
185 | $ hg commit --subrepos -m 2-3-2 |
|
185 | $ hg commit --subrepos -m 2-3-2 | |
186 | committing subrepository foo |
|
186 | committing subrepository foo | |
187 | committing subrepository foo/bar (glob) |
|
187 | committing subrepository foo/bar (glob) | |
188 |
|
188 | |||
189 | Test explicit path commands within subrepos: add/forget |
|
189 | Test explicit path commands within subrepos: add/forget | |
190 | $ echo z1 > foo/bar/z2.txt |
|
190 | $ echo z1 > foo/bar/z2.txt | |
191 | $ hg status -S |
|
191 | $ hg status -S | |
192 | ? foo/bar/z2.txt |
|
192 | ? foo/bar/z2.txt | |
193 | $ hg add foo/bar/z2.txt |
|
193 | $ hg add foo/bar/z2.txt | |
194 | $ hg status -S |
|
194 | $ hg status -S | |
195 | A foo/bar/z2.txt |
|
195 | A foo/bar/z2.txt | |
196 | $ hg forget foo/bar/z2.txt |
|
196 | $ hg forget foo/bar/z2.txt | |
197 | $ hg status -S |
|
197 | $ hg status -S | |
198 | ? foo/bar/z2.txt |
|
198 | ? foo/bar/z2.txt | |
199 | $ hg forget foo/bar/z2.txt |
|
199 | $ hg forget foo/bar/z2.txt | |
200 | not removing foo/bar/z2.txt: file is already untracked (glob) |
|
200 | not removing foo/bar/z2.txt: file is already untracked (glob) | |
201 | [1] |
|
201 | [1] | |
202 | $ hg status -S |
|
202 | $ hg status -S | |
203 | ? foo/bar/z2.txt |
|
203 | ? foo/bar/z2.txt | |
204 | $ rm foo/bar/z2.txt |
|
204 | $ rm foo/bar/z2.txt | |
205 |
|
205 | |||
206 | Log with the relationships between repo and its subrepo: |
|
206 | Log with the relationships between repo and its subrepo: | |
207 |
|
207 | |||
208 | $ hg log --template '{rev}:{node|short} {desc}\n' |
|
208 | $ hg log --template '{rev}:{node|short} {desc}\n' | |
209 | 2:1326fa26d0c0 2-3-2 |
|
209 | 2:1326fa26d0c0 2-3-2 | |
210 | 1:4b3c9ff4f66b 1-2-1 |
|
210 | 1:4b3c9ff4f66b 1-2-1 | |
211 | 0:23376cbba0d8 0-0-0 |
|
211 | 0:23376cbba0d8 0-0-0 | |
212 |
|
212 | |||
213 | $ hg -R foo log --template '{rev}:{node|short} {desc}\n' |
|
213 | $ hg -R foo log --template '{rev}:{node|short} {desc}\n' | |
214 | 3:65903cebad86 2-3-2 |
|
214 | 3:65903cebad86 2-3-2 | |
215 | 2:d254738c5f5e 0-2-1 |
|
215 | 2:d254738c5f5e 0-2-1 | |
216 | 1:8629ce7dcc39 0-1-0 |
|
216 | 1:8629ce7dcc39 0-1-0 | |
217 | 0:af048e97ade2 0-0-0 |
|
217 | 0:af048e97ade2 0-0-0 | |
218 |
|
218 | |||
219 | $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n' |
|
219 | $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n' | |
220 | 2:31ecbdafd357 2-3-2 |
|
220 | 2:31ecbdafd357 2-3-2 | |
221 | 1:9647f22de499 0-1-1 |
|
221 | 1:9647f22de499 0-1-1 | |
222 | 0:4904098473f9 0-0-0 |
|
222 | 0:4904098473f9 0-0-0 | |
223 |
|
223 | |||
224 | Status between revisions: |
|
224 | Status between revisions: | |
225 |
|
225 | |||
226 | $ hg status -S |
|
226 | $ hg status -S | |
227 | $ hg status -S --rev 0:1 |
|
227 | $ hg status -S --rev 0:1 | |
228 | M .hgsubstate |
|
228 | M .hgsubstate | |
229 | M foo/.hgsubstate |
|
229 | M foo/.hgsubstate | |
230 | M foo/bar/z.txt |
|
230 | M foo/bar/z.txt | |
231 | M foo/y.txt |
|
231 | M foo/y.txt | |
232 | $ hg diff --nodates -S -I '**/?.txt' --rev 0:1 |
|
232 | $ hg diff --nodates -S -I '**/?.txt' --rev 0:1 | |
233 | diff -r af048e97ade2 -r d254738c5f5e foo/y.txt |
|
233 | diff -r af048e97ade2 -r d254738c5f5e foo/y.txt | |
234 | --- a/foo/y.txt |
|
234 | --- a/foo/y.txt | |
235 | +++ b/foo/y.txt |
|
235 | +++ b/foo/y.txt | |
236 | @@ -1,1 +1,2 @@ |
|
236 | @@ -1,1 +1,2 @@ | |
237 | y1 |
|
237 | y1 | |
238 | +y2 |
|
238 | +y2 | |
239 | diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt |
|
239 | diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt | |
240 | --- a/foo/bar/z.txt |
|
240 | --- a/foo/bar/z.txt | |
241 | +++ b/foo/bar/z.txt |
|
241 | +++ b/foo/bar/z.txt | |
242 | @@ -1,1 +1,2 @@ |
|
242 | @@ -1,1 +1,2 @@ | |
243 | z1 |
|
243 | z1 | |
244 | +z2 |
|
244 | +z2 | |
245 |
|
245 | |||
246 | Enable progress extension for archive tests: |
|
246 | Enable progress extension for archive tests: | |
247 |
|
247 | |||
248 | $ cp $HGRCPATH $HGRCPATH.no-progress |
|
248 | $ cp $HGRCPATH $HGRCPATH.no-progress | |
249 | $ cat >> $HGRCPATH <<EOF |
|
249 | $ cat >> $HGRCPATH <<EOF | |
250 | > [extensions] |
|
250 | > [extensions] | |
251 | > progress = |
|
251 | > progress = | |
252 | > [progress] |
|
252 | > [progress] | |
253 | > assume-tty = 1 |
|
253 | > assume-tty = 1 | |
254 | > delay = 0 |
|
254 | > delay = 0 | |
255 | > format = topic bar number |
|
255 | > format = topic bar number | |
256 | > refresh = 0 |
|
256 | > refresh = 0 | |
257 | > width = 60 |
|
257 | > width = 60 | |
258 | > EOF |
|
258 | > EOF | |
259 |
|
259 | |||
260 | Test archiving to a directory tree (the doubled lines in the output |
|
260 | Test archiving to a directory tree (the doubled lines in the output | |
261 | only show up in the test output, not in real usage): |
|
261 | only show up in the test output, not in real usage): | |
262 |
|
262 | |||
263 | $ hg archive --subrepos ../archive |
|
263 | $ hg archive --subrepos ../archive | |
264 | \r (no-eol) (esc) |
|
264 | \r (no-eol) (esc) | |
265 | archiving [ ] 0/3\r (no-eol) (esc) |
|
265 | archiving [ ] 0/3\r (no-eol) (esc) | |
266 | archiving [ ] 0/3\r (no-eol) (esc) |
|
266 | archiving [ ] 0/3\r (no-eol) (esc) | |
267 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
267 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
268 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
268 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
269 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
269 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
270 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
270 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
271 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
271 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
272 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
272 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
273 | \r (no-eol) (esc) |
|
273 | \r (no-eol) (esc) | |
274 | \r (no-eol) (esc) |
|
274 | \r (no-eol) (esc) | |
275 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
275 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
276 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
276 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
277 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
277 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
278 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
278 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
279 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
279 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
280 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
280 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
281 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
281 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
282 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
282 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
283 | \r (no-eol) (esc) |
|
283 | \r (no-eol) (esc) | |
284 | \r (no-eol) (esc) |
|
284 | \r (no-eol) (esc) | |
285 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
285 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) | |
286 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
286 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) | |
287 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
287 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) | |
288 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
288 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) | |
289 | \r (no-eol) (esc) |
|
289 | \r (no-eol) (esc) | |
290 | $ find ../archive | sort |
|
290 | $ find ../archive | sort | |
291 | ../archive |
|
291 | ../archive | |
292 | ../archive/.hg_archival.txt |
|
292 | ../archive/.hg_archival.txt | |
293 | ../archive/.hgsub |
|
293 | ../archive/.hgsub | |
294 | ../archive/.hgsubstate |
|
294 | ../archive/.hgsubstate | |
295 | ../archive/foo |
|
295 | ../archive/foo | |
296 | ../archive/foo/.hgsub |
|
296 | ../archive/foo/.hgsub | |
297 | ../archive/foo/.hgsubstate |
|
297 | ../archive/foo/.hgsubstate | |
298 | ../archive/foo/bar |
|
298 | ../archive/foo/bar | |
299 | ../archive/foo/bar/z.txt |
|
299 | ../archive/foo/bar/z.txt | |
300 | ../archive/foo/y.txt |
|
300 | ../archive/foo/y.txt | |
301 | ../archive/x.txt |
|
301 | ../archive/x.txt | |
302 |
|
302 | |||
303 | Test archiving to zip file (unzip output is unstable): |
|
303 | Test archiving to zip file (unzip output is unstable): | |
304 |
|
304 | |||
305 | $ hg archive --subrepos ../archive.zip |
|
305 | $ hg archive --subrepos ../archive.zip | |
306 | \r (no-eol) (esc) |
|
306 | \r (no-eol) (esc) | |
307 | archiving [ ] 0/3\r (no-eol) (esc) |
|
307 | archiving [ ] 0/3\r (no-eol) (esc) | |
308 | archiving [ ] 0/3\r (no-eol) (esc) |
|
308 | archiving [ ] 0/3\r (no-eol) (esc) | |
309 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
309 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
310 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
310 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
311 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
311 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
312 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
312 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
313 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
313 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
314 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
314 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
315 | \r (no-eol) (esc) |
|
315 | \r (no-eol) (esc) | |
316 | \r (no-eol) (esc) |
|
316 | \r (no-eol) (esc) | |
317 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
317 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
318 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
318 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
319 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
319 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
320 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
320 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
321 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
321 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
322 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
322 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
323 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
323 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
324 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
324 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
325 | \r (no-eol) (esc) |
|
325 | \r (no-eol) (esc) | |
326 | \r (no-eol) (esc) |
|
326 | \r (no-eol) (esc) | |
327 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
327 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) | |
328 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
328 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) | |
329 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
329 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) | |
330 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
330 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) | |
331 | \r (no-eol) (esc) |
|
331 | \r (no-eol) (esc) | |
332 |
|
332 | |||
333 | Test archiving a revision that references a subrepo that is not yet |
|
333 | Test archiving a revision that references a subrepo that is not yet | |
334 | cloned: |
|
334 | cloned: | |
335 |
|
335 | |||
336 | $ hg clone -U . ../empty |
|
336 | $ hg clone -U . ../empty | |
337 | $ cd ../empty |
|
337 | $ cd ../empty | |
338 | $ hg archive --subrepos -r tip ../archive.tar.gz |
|
338 | $ hg archive --subrepos -r tip ../archive.tar.gz | |
339 | \r (no-eol) (esc) |
|
339 | \r (no-eol) (esc) | |
340 | archiving [ ] 0/3\r (no-eol) (esc) |
|
340 | archiving [ ] 0/3\r (no-eol) (esc) | |
341 | archiving [ ] 0/3\r (no-eol) (esc) |
|
341 | archiving [ ] 0/3\r (no-eol) (esc) | |
342 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
342 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
343 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
343 | archiving [=============> ] 1/3\r (no-eol) (esc) | |
344 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
344 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
345 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
345 | archiving [===========================> ] 2/3\r (no-eol) (esc) | |
346 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
346 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
347 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
347 | archiving [==========================================>] 3/3\r (no-eol) (esc) | |
348 | \r (no-eol) (esc) |
|
348 | \r (no-eol) (esc) | |
349 | \r (no-eol) (esc) |
|
349 | \r (no-eol) (esc) | |
350 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
350 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
351 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
|
351 | archiving (foo) [ ] 0/3\r (no-eol) (esc) | |
352 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
352 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
353 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) |
|
353 | archiving (foo) [===========> ] 1/3\r (no-eol) (esc) | |
354 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
354 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
355 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) |
|
355 | archiving (foo) [=======================> ] 2/3\r (no-eol) (esc) | |
356 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
356 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
357 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) |
|
357 | archiving (foo) [====================================>] 3/3\r (no-eol) (esc) | |
358 | \r (no-eol) (esc) |
|
358 | \r (no-eol) (esc) | |
359 | \r (no-eol) (esc) |
|
359 | \r (no-eol) (esc) | |
360 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
360 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) | |
361 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
|
361 | archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc) | |
362 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
362 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) | |
363 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc) |
|
363 | archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc) | |
364 | \r (no-eol) (esc) |
|
364 | \r (no-eol) (esc) | |
365 | cloning subrepo foo from $TESTTMP/repo/foo |
|
365 | cloning subrepo foo from $TESTTMP/repo/foo | |
366 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) |
|
366 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) | |
367 |
|
367 | |||
368 | The newly cloned subrepos contain no working copy: |
|
368 | The newly cloned subrepos contain no working copy: | |
369 |
|
369 | |||
370 | $ hg -R foo summary |
|
370 | $ hg -R foo summary | |
371 | parent: -1:000000000000 (no revision checked out) |
|
371 | parent: -1:000000000000 (no revision checked out) | |
372 | branch: default |
|
372 | branch: default | |
373 | commit: (clean) |
|
373 | commit: (clean) | |
374 | update: 4 new changesets (update) |
|
374 | update: 4 new changesets (update) | |
375 |
|
375 | |||
376 | Disable progress extension and cleanup: |
|
376 | Disable progress extension and cleanup: | |
377 |
|
377 | |||
378 | $ mv $HGRCPATH.no-progress $HGRCPATH |
|
378 | $ mv $HGRCPATH.no-progress $HGRCPATH | |
379 |
|
379 | |||
380 | Test archiving when there is a directory in the way for a subrepo |
|
380 | Test archiving when there is a directory in the way for a subrepo | |
381 | created by archive: |
|
381 | created by archive: | |
382 |
|
382 | |||
383 | $ hg clone -U . ../almost-empty |
|
383 | $ hg clone -U . ../almost-empty | |
384 | $ cd ../almost-empty |
|
384 | $ cd ../almost-empty | |
385 | $ mkdir foo |
|
385 | $ mkdir foo | |
386 | $ echo f > foo/f |
|
386 | $ echo f > foo/f | |
387 | $ hg archive --subrepos -r tip archive |
|
387 | $ hg archive --subrepos -r tip archive | |
388 | cloning subrepo foo from $TESTTMP/empty/foo |
|
388 | cloning subrepo foo from $TESTTMP/empty/foo | |
389 | abort: destination '$TESTTMP/almost-empty/foo' is not empty (glob) |
|
389 | abort: destination '$TESTTMP/almost-empty/foo' is not empty (glob) | |
390 | [255] |
|
390 | [255] | |
391 |
|
391 | |||
392 | Clone and test outgoing: |
|
392 | Clone and test outgoing: | |
393 |
|
393 | |||
394 | $ cd .. |
|
394 | $ cd .. | |
395 | $ hg clone repo repo2 |
|
395 | $ hg clone repo repo2 | |
396 | updating to branch default |
|
396 | updating to branch default | |
397 | cloning subrepo foo from $TESTTMP/repo/foo |
|
397 | cloning subrepo foo from $TESTTMP/repo/foo | |
398 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) |
|
398 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) | |
399 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
399 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
400 | $ cd repo2 |
|
400 | $ cd repo2 | |
401 | $ hg outgoing -S |
|
401 | $ hg outgoing -S | |
402 | comparing with $TESTTMP/repo (glob) |
|
402 | comparing with $TESTTMP/repo (glob) | |
403 | searching for changes |
|
403 | searching for changes | |
404 | no changes found |
|
404 | no changes found | |
405 | comparing with $TESTTMP/repo/foo |
|
405 | comparing with $TESTTMP/repo/foo | |
406 | searching for changes |
|
406 | searching for changes | |
407 | no changes found |
|
407 | no changes found | |
408 | comparing with $TESTTMP/repo/foo/bar |
|
408 | comparing with $TESTTMP/repo/foo/bar | |
409 | searching for changes |
|
409 | searching for changes | |
410 | no changes found |
|
410 | no changes found | |
411 | [1] |
|
411 | [1] | |
412 |
|
412 | |||
413 | Make nested change: |
|
413 | Make nested change: | |
414 |
|
414 | |||
415 | $ echo y4 >> foo/y.txt |
|
415 | $ echo y4 >> foo/y.txt | |
416 | $ hg diff --nodates -S |
|
416 | $ hg diff --nodates -S | |
417 | diff -r 65903cebad86 foo/y.txt |
|
417 | diff -r 65903cebad86 foo/y.txt | |
418 | --- a/foo/y.txt |
|
418 | --- a/foo/y.txt | |
419 | +++ b/foo/y.txt |
|
419 | +++ b/foo/y.txt | |
420 | @@ -1,3 +1,4 @@ |
|
420 | @@ -1,3 +1,4 @@ | |
421 | y1 |
|
421 | y1 | |
422 | y2 |
|
422 | y2 | |
423 | y3 |
|
423 | y3 | |
424 | +y4 |
|
424 | +y4 | |
425 | $ hg commit --subrepos -m 3-4-2 |
|
425 | $ hg commit --subrepos -m 3-4-2 | |
426 | committing subrepository foo |
|
426 | committing subrepository foo | |
427 | $ hg outgoing -S |
|
427 | $ hg outgoing -S | |
428 | comparing with $TESTTMP/repo (glob) |
|
428 | comparing with $TESTTMP/repo (glob) | |
429 | searching for changes |
|
429 | searching for changes | |
430 | changeset: 3:2655b8ecc4ee |
|
430 | changeset: 3:2655b8ecc4ee | |
431 | tag: tip |
|
431 | tag: tip | |
432 | user: test |
|
432 | user: test | |
433 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
433 | date: Thu Jan 01 00:00:00 1970 +0000 | |
434 | summary: 3-4-2 |
|
434 | summary: 3-4-2 | |
435 |
|
435 | |||
436 | comparing with $TESTTMP/repo/foo |
|
436 | comparing with $TESTTMP/repo/foo | |
437 | searching for changes |
|
437 | searching for changes | |
438 | changeset: 4:e96193d6cb36 |
|
438 | changeset: 4:e96193d6cb36 | |
439 | tag: tip |
|
439 | tag: tip | |
440 | user: test |
|
440 | user: test | |
441 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
441 | date: Thu Jan 01 00:00:00 1970 +0000 | |
442 | summary: 3-4-2 |
|
442 | summary: 3-4-2 | |
443 |
|
443 | |||
444 | comparing with $TESTTMP/repo/foo/bar |
|
444 | comparing with $TESTTMP/repo/foo/bar | |
445 | searching for changes |
|
445 | searching for changes | |
446 | no changes found |
|
446 | no changes found | |
447 |
|
447 | |||
448 |
|
448 | |||
449 | Switch to original repo and setup default path: |
|
449 | Switch to original repo and setup default path: | |
450 |
|
450 | |||
451 | $ cd ../repo |
|
451 | $ cd ../repo | |
452 | $ echo '[paths]' >> .hg/hgrc |
|
452 | $ echo '[paths]' >> .hg/hgrc | |
453 | $ echo 'default = ../repo2' >> .hg/hgrc |
|
453 | $ echo 'default = ../repo2' >> .hg/hgrc | |
454 |
|
454 | |||
455 | Test incoming: |
|
455 | Test incoming: | |
456 |
|
456 | |||
457 | $ hg incoming -S |
|
457 | $ hg incoming -S | |
458 | comparing with $TESTTMP/repo2 (glob) |
|
458 | comparing with $TESTTMP/repo2 (glob) | |
459 | searching for changes |
|
459 | searching for changes | |
460 | changeset: 3:2655b8ecc4ee |
|
460 | changeset: 3:2655b8ecc4ee | |
461 | tag: tip |
|
461 | tag: tip | |
462 | user: test |
|
462 | user: test | |
463 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
463 | date: Thu Jan 01 00:00:00 1970 +0000 | |
464 | summary: 3-4-2 |
|
464 | summary: 3-4-2 | |
465 |
|
465 | |||
466 | comparing with $TESTTMP/repo2/foo |
|
466 | comparing with $TESTTMP/repo2/foo | |
467 | searching for changes |
|
467 | searching for changes | |
468 | changeset: 4:e96193d6cb36 |
|
468 | changeset: 4:e96193d6cb36 | |
469 | tag: tip |
|
469 | tag: tip | |
470 | user: test |
|
470 | user: test | |
471 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
471 | date: Thu Jan 01 00:00:00 1970 +0000 | |
472 | summary: 3-4-2 |
|
472 | summary: 3-4-2 | |
473 |
|
473 | |||
474 | comparing with $TESTTMP/repo2/foo/bar |
|
474 | comparing with $TESTTMP/repo2/foo/bar | |
475 | searching for changes |
|
475 | searching for changes | |
476 | no changes found |
|
476 | no changes found | |
477 |
|
477 | |||
478 | $ hg incoming -S --bundle incoming.hg |
|
478 | $ hg incoming -S --bundle incoming.hg | |
479 | abort: cannot combine --bundle and --subrepos |
|
479 | abort: cannot combine --bundle and --subrepos | |
480 | [255] |
|
480 | [255] | |
481 |
|
481 | |||
482 | Test missing subrepo: |
|
482 | Test missing subrepo: | |
483 |
|
483 | |||
484 | $ rm -r foo |
|
484 | $ rm -r foo | |
485 | $ hg status -S |
|
485 | $ hg status -S | |
486 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" |
|
486 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" | |
487 |
|
487 | |||
488 | Issue2619: IndexError: list index out of range on hg add with subrepos |
|
488 | Issue2619: IndexError: list index out of range on hg add with subrepos | |
489 | The subrepo must sorts after the explicit filename. |
|
489 | The subrepo must sorts after the explicit filename. | |
490 |
|
490 | |||
491 | $ cd .. |
|
491 | $ cd .. | |
492 | $ hg init test |
|
492 | $ hg init test | |
493 | $ cd test |
|
493 | $ cd test | |
494 | $ hg init x |
|
494 | $ hg init x | |
495 | $ echo "x = x" >> .hgsub |
|
495 | $ echo "x = x" >> .hgsub | |
496 | $ hg add .hgsub |
|
496 | $ hg add .hgsub | |
497 | $ touch a x/a |
|
497 | $ touch a x/a | |
498 | $ hg add a x/a |
|
498 | $ hg add a x/a | |
499 |
|
499 | |||
500 | $ cd .. |
|
500 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now