Show More
@@ -1,384 +1,384 b'' | |||||
1 | #testcases tree flat |
|
1 | #testcases tree flat | |
2 | $ . "$TESTDIR/narrow-library.sh" |
|
2 | $ . "$TESTDIR/narrow-library.sh" | |
3 |
|
3 | |||
4 | #if tree |
|
4 | #if tree | |
5 | $ cat << EOF >> $HGRCPATH |
|
5 | $ cat << EOF >> $HGRCPATH | |
6 | > [experimental] |
|
6 | > [experimental] | |
7 | > treemanifest = 1 |
|
7 | > treemanifest = 1 | |
8 | > EOF |
|
8 | > EOF | |
9 | #endif |
|
9 | #endif | |
10 |
|
10 | |||
11 | $ hg init master |
|
11 | $ hg init master | |
12 | $ cd master |
|
12 | $ cd master | |
13 |
|
13 | |||
14 | $ mkdir inside |
|
14 | $ mkdir inside | |
15 | $ echo 'inside' > inside/f |
|
15 | $ echo 'inside' > inside/f | |
16 | $ hg add inside/f |
|
16 | $ hg add inside/f | |
17 | $ hg commit -m 'add inside' |
|
17 | $ hg commit -m 'add inside' | |
18 |
|
18 | |||
19 | $ mkdir widest |
|
19 | $ mkdir widest | |
20 | $ echo 'widest' > widest/f |
|
20 | $ echo 'widest' > widest/f | |
21 | $ hg add widest/f |
|
21 | $ hg add widest/f | |
22 | $ hg commit -m 'add widest' |
|
22 | $ hg commit -m 'add widest' | |
23 |
|
23 | |||
24 | $ mkdir outside |
|
24 | $ mkdir outside | |
25 | $ echo 'outside' > outside/f |
|
25 | $ echo 'outside' > outside/f | |
26 | $ hg add outside/f |
|
26 | $ hg add outside/f | |
27 | $ hg commit -m 'add outside' |
|
27 | $ hg commit -m 'add outside' | |
28 |
|
28 | |||
29 | $ cd .. |
|
29 | $ cd .. | |
30 |
|
30 | |||
31 | narrow clone the inside file |
|
31 | narrow clone the inside file | |
32 |
|
32 | |||
33 | $ hg clone --narrow ssh://user@dummy/master narrow --include inside |
|
33 | $ hg clone --narrow ssh://user@dummy/master narrow --include inside | |
34 | requesting all changes |
|
34 | requesting all changes | |
35 | adding changesets |
|
35 | adding changesets | |
36 | adding manifests |
|
36 | adding manifests | |
37 | adding file changes |
|
37 | adding file changes | |
38 | added 3 changesets with 1 changes to 1 files |
|
38 | added 3 changesets with 1 changes to 1 files | |
39 | new changesets *:* (glob) |
|
39 | new changesets *:* (glob) | |
40 | updating to branch default |
|
40 | updating to branch default | |
41 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
41 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
42 | $ cd narrow |
|
42 | $ cd narrow | |
43 | $ hg tracked |
|
43 | $ hg tracked | |
44 | I path:inside |
|
44 | I path:inside | |
45 | $ ls |
|
45 | $ ls | |
46 | inside |
|
46 | inside | |
47 | $ cat inside/f |
|
47 | $ cat inside/f | |
48 | inside |
|
48 | inside | |
49 | $ cd .. |
|
49 | $ cd .. | |
50 |
|
50 | |||
51 | add more upstream files which we will include in a wider narrow spec |
|
51 | add more upstream files which we will include in a wider narrow spec | |
52 |
|
52 | |||
53 | $ cd master |
|
53 | $ cd master | |
54 |
|
54 | |||
55 | $ mkdir wider |
|
55 | $ mkdir wider | |
56 | $ echo 'wider' > wider/f |
|
56 | $ echo 'wider' > wider/f | |
57 | $ hg add wider/f |
|
57 | $ hg add wider/f | |
58 | $ echo 'widest v2' > widest/f |
|
58 | $ echo 'widest v2' > widest/f | |
59 | $ hg commit -m 'add wider, update widest' |
|
59 | $ hg commit -m 'add wider, update widest' | |
60 |
|
60 | |||
61 | $ echo 'widest v3' > widest/f |
|
61 | $ echo 'widest v3' > widest/f | |
62 | $ hg commit -m 'update widest v3' |
|
62 | $ hg commit -m 'update widest v3' | |
63 |
|
63 | |||
64 | $ echo 'inside v2' > inside/f |
|
64 | $ echo 'inside v2' > inside/f | |
65 | $ hg commit -m 'update inside' |
|
65 | $ hg commit -m 'update inside' | |
66 |
|
66 | |||
67 | $ mkdir outside2 |
|
67 | $ mkdir outside2 | |
68 | $ echo 'outside2' > outside2/f |
|
68 | $ echo 'outside2' > outside2/f | |
69 | $ hg add outside2/f |
|
69 | $ hg add outside2/f | |
70 | $ hg commit -m 'add outside2' |
|
70 | $ hg commit -m 'add outside2' | |
71 |
|
71 | |||
72 | $ echo 'widest v4' > widest/f |
|
72 | $ echo 'widest v4' > widest/f | |
73 | $ hg commit -m 'update widest v4' |
|
73 | $ hg commit -m 'update widest v4' | |
74 |
|
74 | |||
75 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
75 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
76 |
|
|
76 | 7: update widest v4 | |
77 |
|
|
77 | 6: add outside2 | |
78 |
|
|
78 | 5: update inside | |
79 |
|
|
79 | 4: update widest v3 | |
80 |
|
|
80 | 3: add wider, update widest | |
81 |
|
|
81 | 2: add outside | |
82 |
|
|
82 | 1: add widest | |
83 |
|
|
83 | 0: add inside | |
84 |
|
84 | |||
85 |
$ |
|
85 | $ cd .. | |
86 |
|
86 | |||
87 | Widen the narrow spec to see the wider file. This should not get the newly |
|
87 | Widen the narrow spec to see the wider file. This should not get the newly | |
88 | added upstream revisions. |
|
88 | added upstream revisions. | |
89 |
|
89 | |||
90 | $ cd narrow |
|
90 | $ cd narrow | |
91 | $ hg tracked --addinclude wider/f |
|
91 | $ hg tracked --addinclude wider/f | |
92 | comparing with ssh://user@dummy/master |
|
92 | comparing with ssh://user@dummy/master | |
93 | searching for changes |
|
93 | searching for changes | |
94 | no changes found |
|
94 | no changes found | |
95 | adding changesets |
|
95 | adding changesets | |
96 | adding manifests |
|
96 | adding manifests | |
97 | adding file changes |
|
97 | adding file changes | |
98 | added 0 changesets with 0 changes to 1 files |
|
98 | added 0 changesets with 0 changes to 1 files | |
99 | 3 local changesets published |
|
99 | 3 local changesets published | |
100 | $ hg tracked |
|
100 | $ hg tracked | |
101 | I path:inside |
|
101 | I path:inside | |
102 | I path:wider/f |
|
102 | I path:wider/f | |
103 |
|
103 | |||
104 | Pull down the newly added upstream revision. |
|
104 | Pull down the newly added upstream revision. | |
105 |
|
105 | |||
106 | $ hg pull |
|
106 | $ hg pull | |
107 | pulling from ssh://user@dummy/master |
|
107 | pulling from ssh://user@dummy/master | |
108 | searching for changes |
|
108 | searching for changes | |
109 | adding changesets |
|
109 | adding changesets | |
110 | adding manifests |
|
110 | adding manifests | |
111 | adding file changes |
|
111 | adding file changes | |
112 | added 5 changesets with 2 changes to 2 files |
|
112 | added 5 changesets with 2 changes to 2 files | |
113 | new changesets *:* (glob) |
|
113 | new changesets *:* (glob) | |
114 | (run 'hg update' to get a working copy) |
|
114 | (run 'hg update' to get a working copy) | |
115 | $ hg update -r 'desc("add wider")' |
|
115 | $ hg update -r 'desc("add wider")' | |
116 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
116 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
117 | $ cat wider/f |
|
117 | $ cat wider/f | |
118 | wider |
|
118 | wider | |
119 |
|
119 | |||
120 | $ hg update -r 'desc("update inside")' |
|
120 | $ hg update -r 'desc("update inside")' | |
121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
122 | $ cat wider/f |
|
122 | $ cat wider/f | |
123 | wider |
|
123 | wider | |
124 | $ cat inside/f |
|
124 | $ cat inside/f | |
125 | inside v2 |
|
125 | inside v2 | |
126 |
|
126 | |||
127 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
127 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
128 |
|
|
128 | 7: update widest v4 | |
129 |
|
|
129 | 6: add outside2 | |
130 |
|
|
130 | 5: update inside | |
131 |
|
|
131 | 4: update widest v3 | |
132 |
|
|
132 | 3: add wider, update widest | |
133 |
|
|
133 | 2: add outside | |
134 |
|
|
134 | 1: add widest | |
135 |
|
|
135 | 0: add inside | |
136 |
|
136 | |||
137 | Check that widening with a newline fails |
|
137 | Check that widening with a newline fails | |
138 |
|
138 | |||
139 | $ hg tracked --addinclude 'widest |
|
139 | $ hg tracked --addinclude 'widest | |
140 | > ' |
|
140 | > ' | |
141 | abort: newlines are not allowed in narrowspec paths |
|
141 | abort: newlines are not allowed in narrowspec paths | |
142 | [255] |
|
142 | [255] | |
143 |
|
143 | |||
144 | widen the narrow spec to include the widest file |
|
144 | widen the narrow spec to include the widest file | |
145 |
|
145 | |||
146 | $ hg tracked --addinclude widest |
|
146 | $ hg tracked --addinclude widest | |
147 | comparing with ssh://user@dummy/master |
|
147 | comparing with ssh://user@dummy/master | |
148 | searching for changes |
|
148 | searching for changes | |
149 | no changes found |
|
149 | no changes found | |
150 | adding changesets |
|
150 | adding changesets | |
151 | adding manifests |
|
151 | adding manifests | |
152 | adding file changes |
|
152 | adding file changes | |
153 | added 0 changesets with 4 changes to 3 files |
|
153 | added 0 changesets with 4 changes to 3 files | |
154 | 5 local changesets published |
|
154 | 5 local changesets published | |
155 | $ hg tracked |
|
155 | $ hg tracked | |
156 | I path:inside |
|
156 | I path:inside | |
157 | I path:wider/f |
|
157 | I path:wider/f | |
158 | I path:widest |
|
158 | I path:widest | |
159 | $ hg update 'desc("add widest")' |
|
159 | $ hg update 'desc("add widest")' | |
160 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
160 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
161 | $ cat widest/f |
|
161 | $ cat widest/f | |
162 | widest |
|
162 | widest | |
163 | $ hg update 'desc("add wider, update widest")' |
|
163 | $ hg update 'desc("add wider, update widest")' | |
164 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
164 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
165 | $ cat wider/f |
|
165 | $ cat wider/f | |
166 | wider |
|
166 | wider | |
167 | $ cat widest/f |
|
167 | $ cat widest/f | |
168 | widest v2 |
|
168 | widest v2 | |
169 | $ hg update 'desc("update widest v3")' |
|
169 | $ hg update 'desc("update widest v3")' | |
170 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
170 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
171 | $ cat widest/f |
|
171 | $ cat widest/f | |
172 | widest v3 |
|
172 | widest v3 | |
173 | $ hg update 'desc("update widest v4")' |
|
173 | $ hg update 'desc("update widest v4")' | |
174 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
174 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
175 | $ cat widest/f |
|
175 | $ cat widest/f | |
176 | widest v4 |
|
176 | widest v4 | |
177 |
|
177 | |||
178 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
178 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
179 |
|
|
179 | 7: update widest v4 | |
180 |
|
|
180 | 6: add outside2 | |
181 |
|
|
181 | 5: update inside | |
182 |
|
|
182 | 4: update widest v3 | |
183 |
|
|
183 | 3: add wider, update widest | |
184 |
|
|
184 | 2: add outside | |
185 |
|
|
185 | 1: add widest | |
186 |
|
|
186 | 0: add inside | |
187 |
|
187 | |||
188 | separate suite of tests: files from 0-10 modified in changes 0-10. This allows |
|
188 | separate suite of tests: files from 0-10 modified in changes 0-10. This allows | |
189 | more obvious precise tests tickling particular corner cases. |
|
189 | more obvious precise tests tickling particular corner cases. | |
190 |
|
190 | |||
191 | $ cd .. |
|
191 | $ cd .. | |
192 | $ hg init upstream |
|
192 | $ hg init upstream | |
193 | $ cd upstream |
|
193 | $ cd upstream | |
194 | $ for x in `$TESTDIR/seq.py 0 10` |
|
194 | $ for x in `$TESTDIR/seq.py 0 10` | |
195 | > do |
|
195 | > do | |
196 | > mkdir d$x |
|
196 | > mkdir d$x | |
197 | > echo $x > d$x/f |
|
197 | > echo $x > d$x/f | |
198 | > hg add d$x/f |
|
198 | > hg add d$x/f | |
199 | > hg commit -m "add d$x/f" |
|
199 | > hg commit -m "add d$x/f" | |
200 | > done |
|
200 | > done | |
201 |
$ hg log -T "{ |
|
201 | $ hg log -T "{rev}: {desc}\n" | |
202 |
|
|
202 | 10: add d10/f | |
203 |
|
|
203 | 9: add d9/f | |
204 |
|
|
204 | 8: add d8/f | |
205 |
|
|
205 | 7: add d7/f | |
206 |
|
|
206 | 6: add d6/f | |
207 |
|
|
207 | 5: add d5/f | |
208 |
|
|
208 | 4: add d4/f | |
209 |
|
|
209 | 3: add d3/f | |
210 |
|
|
210 | 2: add d2/f | |
211 |
|
|
211 | 1: add d1/f | |
212 |
|
|
212 | 0: add d0/f | |
213 |
|
213 | |||
214 | make narrow clone with every third node. |
|
214 | make narrow clone with every third node. | |
215 |
|
215 | |||
216 | $ cd .. |
|
216 | $ cd .. | |
217 | $ hg clone --narrow ssh://user@dummy/upstream narrow2 --include d0 --include d3 --include d6 --include d9 |
|
217 | $ hg clone --narrow ssh://user@dummy/upstream narrow2 --include d0 --include d3 --include d6 --include d9 | |
218 | requesting all changes |
|
218 | requesting all changes | |
219 | adding changesets |
|
219 | adding changesets | |
220 | adding manifests |
|
220 | adding manifests | |
221 | adding file changes |
|
221 | adding file changes | |
222 | added 11 changesets with 4 changes to 4 files |
|
222 | added 11 changesets with 4 changes to 4 files | |
223 | new changesets *:* (glob) |
|
223 | new changesets *:* (glob) | |
224 | updating to branch default |
|
224 | updating to branch default | |
225 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
225 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
226 | $ cd narrow2 |
|
226 | $ cd narrow2 | |
227 | $ hg tracked |
|
227 | $ hg tracked | |
228 | I path:d0 |
|
228 | I path:d0 | |
229 | I path:d3 |
|
229 | I path:d3 | |
230 | I path:d6 |
|
230 | I path:d6 | |
231 | I path:d9 |
|
231 | I path:d9 | |
232 | $ hg verify |
|
232 | $ hg verify | |
233 | checking changesets |
|
233 | checking changesets | |
234 | checking manifests |
|
234 | checking manifests | |
235 | checking directory manifests (tree !) |
|
235 | checking directory manifests (tree !) | |
236 | crosschecking files in changesets and manifests |
|
236 | crosschecking files in changesets and manifests | |
237 | checking files |
|
237 | checking files | |
238 | 4 files, 11 changesets, 4 total revisions |
|
238 | 4 files, 11 changesets, 4 total revisions | |
239 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
239 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
240 |
|
|
240 | 10: add d10/f | |
241 |
|
|
241 | 9: add d9/f | |
242 |
|
|
242 | 8: add d8/f | |
243 |
|
|
243 | 7: add d7/f | |
244 |
|
|
244 | 6: add d6/f | |
245 |
|
|
245 | 5: add d5/f | |
246 |
|
|
246 | 4: add d4/f | |
247 |
|
|
247 | 3: add d3/f | |
248 |
|
|
248 | 2: add d2/f | |
249 |
|
|
249 | 1: add d1/f | |
250 |
|
|
250 | 0: add d0/f | |
251 | $ hg tracked --addinclude d1 |
|
251 | $ hg tracked --addinclude d1 | |
252 | comparing with ssh://user@dummy/upstream |
|
252 | comparing with ssh://user@dummy/upstream | |
253 | searching for changes |
|
253 | searching for changes | |
254 | no changes found |
|
254 | no changes found | |
255 | adding changesets |
|
255 | adding changesets | |
256 | adding manifests |
|
256 | adding manifests | |
257 | adding file changes |
|
257 | adding file changes | |
258 | added 0 changesets with 1 changes to 5 files |
|
258 | added 0 changesets with 1 changes to 5 files | |
259 | 11 local changesets published |
|
259 | 11 local changesets published | |
260 | $ hg tracked |
|
260 | $ hg tracked | |
261 | I path:d0 |
|
261 | I path:d0 | |
262 | I path:d1 |
|
262 | I path:d1 | |
263 | I path:d3 |
|
263 | I path:d3 | |
264 | I path:d6 |
|
264 | I path:d6 | |
265 | I path:d9 |
|
265 | I path:d9 | |
266 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
266 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
267 |
|
|
267 | 10: add d10/f | |
268 |
|
|
268 | 9: add d9/f | |
269 |
|
|
269 | 8: add d8/f | |
270 |
|
|
270 | 7: add d7/f | |
271 |
|
|
271 | 6: add d6/f | |
272 |
|
|
272 | 5: add d5/f | |
273 |
|
|
273 | 4: add d4/f | |
274 |
|
|
274 | 3: add d3/f | |
275 |
|
|
275 | 2: add d2/f | |
276 |
|
|
276 | 1: add d1/f | |
277 |
|
|
277 | 0: add d0/f | |
278 |
|
278 | |||
279 | Verify shouldn't claim the repo is corrupt after a widen. |
|
279 | Verify shouldn't claim the repo is corrupt after a widen. | |
280 |
|
280 | |||
281 | $ hg verify |
|
281 | $ hg verify | |
282 | checking changesets |
|
282 | checking changesets | |
283 | checking manifests |
|
283 | checking manifests | |
284 | checking directory manifests (tree !) |
|
284 | checking directory manifests (tree !) | |
285 | crosschecking files in changesets and manifests |
|
285 | crosschecking files in changesets and manifests | |
286 | checking files |
|
286 | checking files | |
287 | 5 files, 11 changesets, 5 total revisions |
|
287 | 5 files, 11 changesets, 5 total revisions | |
288 |
|
288 | |||
289 | Widening preserves parent of local commit |
|
289 | Widening preserves parent of local commit | |
290 |
|
290 | |||
291 | $ cd .. |
|
291 | $ cd .. | |
292 | $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2 |
|
292 | $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2 | |
293 | $ cd narrow3 |
|
293 | $ cd narrow3 | |
294 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
294 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
295 |
|
|
295 | 2: add d2/f | |
296 |
|
|
296 | 1: add d1/f | |
297 |
|
|
297 | 0: add d0/f | |
298 | $ hg pull -q -r 3 |
|
298 | $ hg pull -q -r 3 | |
299 | $ hg co -q tip |
|
299 | $ hg co -q tip | |
300 | $ hg pull -q -r 4 |
|
300 | $ hg pull -q -r 4 | |
301 | $ echo local > d2/f |
|
301 | $ echo local > d2/f | |
302 | $ hg ci -m local |
|
302 | $ hg ci -m local | |
303 | created new head |
|
303 | created new head | |
304 | $ hg tracked -q --addinclude d0 --addinclude d9 |
|
304 | $ hg tracked -q --addinclude d0 --addinclude d9 | |
305 |
|
305 | |||
306 | Widening preserves bookmarks |
|
306 | Widening preserves bookmarks | |
307 |
|
307 | |||
308 | $ cd .. |
|
308 | $ cd .. | |
309 | $ hg clone -q --narrow ssh://user@dummy/upstream narrow-bookmarks --include d4 |
|
309 | $ hg clone -q --narrow ssh://user@dummy/upstream narrow-bookmarks --include d4 | |
310 | $ cd narrow-bookmarks |
|
310 | $ cd narrow-bookmarks | |
311 | $ echo local > d4/f |
|
311 | $ echo local > d4/f | |
312 | $ hg ci -m local |
|
312 | $ hg ci -m local | |
313 | $ hg bookmarks bookmark |
|
313 | $ hg bookmarks bookmark | |
314 | $ hg bookmarks |
|
314 | $ hg bookmarks | |
315 | * bookmark 11:* (glob) |
|
315 | * bookmark 11:* (glob) | |
316 | $ hg -q tracked --addinclude d2 |
|
316 | $ hg -q tracked --addinclude d2 | |
317 | $ hg bookmarks |
|
317 | $ hg bookmarks | |
318 | * bookmark 11:* (glob) |
|
318 | * bookmark 11:* (glob) | |
319 | $ hg log -r bookmark -T '{desc}\n' |
|
319 | $ hg log -r bookmark -T '{desc}\n' | |
320 | local |
|
320 | local | |
321 |
|
321 | |||
322 | Widening that fails can be recovered from |
|
322 | Widening that fails can be recovered from | |
323 |
|
323 | |||
324 | $ cd .. |
|
324 | $ cd .. | |
325 | $ hg clone -q --narrow ssh://user@dummy/upstream interrupted --include d0 |
|
325 | $ hg clone -q --narrow ssh://user@dummy/upstream interrupted --include d0 | |
326 | $ cd interrupted |
|
326 | $ cd interrupted | |
327 | $ echo local > d0/f |
|
327 | $ echo local > d0/f | |
328 | $ hg ci -m local |
|
328 | $ hg ci -m local | |
329 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
|
329 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
330 | 11: local |
|
330 | 11: local | |
331 | 10: add d10/f |
|
331 | 10: add d10/f | |
332 | 9: add d9/f |
|
332 | 9: add d9/f | |
333 | 8: add d8/f |
|
333 | 8: add d8/f | |
334 | 7: add d7/f |
|
334 | 7: add d7/f | |
335 | 6: add d6/f |
|
335 | 6: add d6/f | |
336 | 5: add d5/f |
|
336 | 5: add d5/f | |
337 | 4: add d4/f |
|
337 | 4: add d4/f | |
338 | 3: add d3/f |
|
338 | 3: add d3/f | |
339 | 2: add d2/f |
|
339 | 2: add d2/f | |
340 | 1: add d1/f |
|
340 | 1: add d1/f | |
341 | 0: add d0/f |
|
341 | 0: add d0/f | |
342 | $ hg bookmarks bookmark |
|
342 | $ hg bookmarks bookmark | |
343 | $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1 |
|
343 | $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1 | |
344 | comparing with ssh://user@dummy/upstream |
|
344 | comparing with ssh://user@dummy/upstream | |
345 | searching for changes |
|
345 | searching for changes | |
346 | no changes found |
|
346 | no changes found | |
347 | adding changesets |
|
347 | adding changesets | |
348 | adding manifests |
|
348 | adding manifests | |
349 | adding file changes |
|
349 | adding file changes | |
350 | added 0 changesets with 1 changes to 2 files |
|
350 | added 0 changesets with 1 changes to 2 files | |
351 | 11 local changesets published |
|
351 | 11 local changesets published | |
352 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
|
352 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
353 | 11: local |
|
353 | 11: local | |
354 | 10: add d10/f |
|
354 | 10: add d10/f | |
355 | 9: add d9/f |
|
355 | 9: add d9/f | |
356 | 8: add d8/f |
|
356 | 8: add d8/f | |
357 | 7: add d7/f |
|
357 | 7: add d7/f | |
358 | 6: add d6/f |
|
358 | 6: add d6/f | |
359 | 5: add d5/f |
|
359 | 5: add d5/f | |
360 | 4: add d4/f |
|
360 | 4: add d4/f | |
361 | 3: add d3/f |
|
361 | 3: add d3/f | |
362 | 2: add d2/f |
|
362 | 2: add d2/f | |
363 | 1: add d1/f |
|
363 | 1: add d1/f | |
364 | 0: add d0/f |
|
364 | 0: add d0/f | |
365 | $ hg bookmarks |
|
365 | $ hg bookmarks | |
366 | * bookmark 11:* (glob) |
|
366 | * bookmark 11:* (glob) | |
367 | $ hg unbundle .hg/strip-backup/*-widen.hg |
|
367 | $ hg unbundle .hg/strip-backup/*-widen.hg | |
368 | abort: $ENOENT$: .hg/strip-backup/*-widen.hg |
|
368 | abort: $ENOENT$: .hg/strip-backup/*-widen.hg | |
369 | [255] |
|
369 | [255] | |
370 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
|
370 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
371 | 11: local |
|
371 | 11: local | |
372 | 10: add d10/f |
|
372 | 10: add d10/f | |
373 | 9: add d9/f |
|
373 | 9: add d9/f | |
374 | 8: add d8/f |
|
374 | 8: add d8/f | |
375 | 7: add d7/f |
|
375 | 7: add d7/f | |
376 | 6: add d6/f |
|
376 | 6: add d6/f | |
377 | 5: add d5/f |
|
377 | 5: add d5/f | |
378 | 4: add d4/f |
|
378 | 4: add d4/f | |
379 | 3: add d3/f |
|
379 | 3: add d3/f | |
380 | 2: add d2/f |
|
380 | 2: add d2/f | |
381 | 1: add d1/f |
|
381 | 1: add d1/f | |
382 | 0: add d0/f |
|
382 | 0: add d0/f | |
383 | $ hg bookmarks |
|
383 | $ hg bookmarks | |
384 | * bookmark 11:* (glob) |
|
384 | * bookmark 11:* (glob) |
@@ -1,365 +1,365 b'' | |||||
1 | #testcases flat tree |
|
1 | #testcases flat tree | |
2 | $ . "$TESTDIR/narrow-library.sh" |
|
2 | $ . "$TESTDIR/narrow-library.sh" | |
3 |
|
3 | |||
4 | #if tree |
|
4 | #if tree | |
5 | $ cat << EOF >> $HGRCPATH |
|
5 | $ cat << EOF >> $HGRCPATH | |
6 | > [experimental] |
|
6 | > [experimental] | |
7 | > treemanifest = 1 |
|
7 | > treemanifest = 1 | |
8 | > EOF |
|
8 | > EOF | |
9 | #endif |
|
9 | #endif | |
10 |
|
10 | |||
11 | $ hg init master |
|
11 | $ hg init master | |
12 | $ cd master |
|
12 | $ cd master | |
13 | $ cat >> .hg/hgrc <<EOF |
|
13 | $ cat >> .hg/hgrc <<EOF | |
14 | > [narrow] |
|
14 | > [narrow] | |
15 | > serveellipses=True |
|
15 | > serveellipses=True | |
16 | > EOF |
|
16 | > EOF | |
17 |
|
17 | |||
18 | $ mkdir inside |
|
18 | $ mkdir inside | |
19 | $ echo 'inside' > inside/f |
|
19 | $ echo 'inside' > inside/f | |
20 | $ hg add inside/f |
|
20 | $ hg add inside/f | |
21 | $ hg commit -m 'add inside' |
|
21 | $ hg commit -m 'add inside' | |
22 |
|
22 | |||
23 | $ mkdir widest |
|
23 | $ mkdir widest | |
24 | $ echo 'widest' > widest/f |
|
24 | $ echo 'widest' > widest/f | |
25 | $ hg add widest/f |
|
25 | $ hg add widest/f | |
26 | $ hg commit -m 'add widest' |
|
26 | $ hg commit -m 'add widest' | |
27 |
|
27 | |||
28 | $ mkdir outside |
|
28 | $ mkdir outside | |
29 | $ echo 'outside' > outside/f |
|
29 | $ echo 'outside' > outside/f | |
30 | $ hg add outside/f |
|
30 | $ hg add outside/f | |
31 | $ hg commit -m 'add outside' |
|
31 | $ hg commit -m 'add outside' | |
32 |
|
32 | |||
33 | $ cd .. |
|
33 | $ cd .. | |
34 |
|
34 | |||
35 | narrow clone the inside file |
|
35 | narrow clone the inside file | |
36 |
|
36 | |||
37 | $ hg clone --narrow ssh://user@dummy/master narrow --include inside |
|
37 | $ hg clone --narrow ssh://user@dummy/master narrow --include inside | |
38 | requesting all changes |
|
38 | requesting all changes | |
39 | adding changesets |
|
39 | adding changesets | |
40 | adding manifests |
|
40 | adding manifests | |
41 | adding file changes |
|
41 | adding file changes | |
42 | added 2 changesets with 1 changes to 1 files |
|
42 | added 2 changesets with 1 changes to 1 files | |
43 | new changesets *:* (glob) |
|
43 | new changesets *:* (glob) | |
44 | updating to branch default |
|
44 | updating to branch default | |
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
45 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 | $ cd narrow |
|
46 | $ cd narrow | |
47 | $ hg tracked |
|
47 | $ hg tracked | |
48 | I path:inside |
|
48 | I path:inside | |
49 | $ ls |
|
49 | $ ls | |
50 | inside |
|
50 | inside | |
51 | $ cat inside/f |
|
51 | $ cat inside/f | |
52 | inside |
|
52 | inside | |
53 | $ cd .. |
|
53 | $ cd .. | |
54 |
|
54 | |||
55 | add more upstream files which we will include in a wider narrow spec |
|
55 | add more upstream files which we will include in a wider narrow spec | |
56 |
|
56 | |||
57 | $ cd master |
|
57 | $ cd master | |
58 |
|
58 | |||
59 | $ mkdir wider |
|
59 | $ mkdir wider | |
60 | $ echo 'wider' > wider/f |
|
60 | $ echo 'wider' > wider/f | |
61 | $ hg add wider/f |
|
61 | $ hg add wider/f | |
62 | $ echo 'widest v2' > widest/f |
|
62 | $ echo 'widest v2' > widest/f | |
63 | $ hg commit -m 'add wider, update widest' |
|
63 | $ hg commit -m 'add wider, update widest' | |
64 |
|
64 | |||
65 | $ echo 'widest v3' > widest/f |
|
65 | $ echo 'widest v3' > widest/f | |
66 | $ hg commit -m 'update widest v3' |
|
66 | $ hg commit -m 'update widest v3' | |
67 |
|
67 | |||
68 | $ echo 'inside v2' > inside/f |
|
68 | $ echo 'inside v2' > inside/f | |
69 | $ hg commit -m 'update inside' |
|
69 | $ hg commit -m 'update inside' | |
70 |
|
70 | |||
71 | $ mkdir outside2 |
|
71 | $ mkdir outside2 | |
72 | $ echo 'outside2' > outside2/f |
|
72 | $ echo 'outside2' > outside2/f | |
73 | $ hg add outside2/f |
|
73 | $ hg add outside2/f | |
74 | $ hg commit -m 'add outside2' |
|
74 | $ hg commit -m 'add outside2' | |
75 |
|
75 | |||
76 | $ echo 'widest v4' > widest/f |
|
76 | $ echo 'widest v4' > widest/f | |
77 | $ hg commit -m 'update widest v4' |
|
77 | $ hg commit -m 'update widest v4' | |
78 |
|
78 | |||
79 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
79 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
80 |
|
|
80 | 7: update widest v4 | |
81 |
|
|
81 | 6: add outside2 | |
82 |
|
|
82 | 5: update inside | |
83 |
|
|
83 | 4: update widest v3 | |
84 |
|
|
84 | 3: add wider, update widest | |
85 |
|
|
85 | 2: add outside | |
86 |
|
|
86 | 1: add widest | |
87 |
|
|
87 | 0: add inside | |
88 |
|
88 | |||
89 |
$ |
|
89 | $ cd .. | |
90 |
|
90 | |||
91 | Widen the narrow spec to see the wider file. This should not get the newly |
|
91 | Widen the narrow spec to see the wider file. This should not get the newly | |
92 | added upstream revisions. |
|
92 | added upstream revisions. | |
93 |
|
93 | |||
94 | $ cd narrow |
|
94 | $ cd narrow | |
95 | $ hg tracked --addinclude wider/f |
|
95 | $ hg tracked --addinclude wider/f | |
96 | comparing with ssh://user@dummy/master |
|
96 | comparing with ssh://user@dummy/master | |
97 | searching for changes |
|
97 | searching for changes | |
98 | no changes found |
|
98 | no changes found | |
99 | saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) |
|
99 | saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) | |
100 | adding changesets |
|
100 | adding changesets | |
101 | adding manifests |
|
101 | adding manifests | |
102 | adding file changes |
|
102 | adding file changes | |
103 | added 2 changesets with 1 changes to 1 files |
|
103 | added 2 changesets with 1 changes to 1 files | |
104 | new changesets *:* (glob) |
|
104 | new changesets *:* (glob) | |
105 | $ hg tracked |
|
105 | $ hg tracked | |
106 | I path:inside |
|
106 | I path:inside | |
107 | I path:wider/f |
|
107 | I path:wider/f | |
108 |
|
108 | |||
109 | Pull down the newly added upstream revision. |
|
109 | Pull down the newly added upstream revision. | |
110 |
|
110 | |||
111 | $ hg pull |
|
111 | $ hg pull | |
112 | pulling from ssh://user@dummy/master |
|
112 | pulling from ssh://user@dummy/master | |
113 | searching for changes |
|
113 | searching for changes | |
114 | adding changesets |
|
114 | adding changesets | |
115 | adding manifests |
|
115 | adding manifests | |
116 | adding file changes |
|
116 | adding file changes | |
117 | added 4 changesets with 2 changes to 2 files |
|
117 | added 4 changesets with 2 changes to 2 files | |
118 | new changesets *:* (glob) |
|
118 | new changesets *:* (glob) | |
119 | (run 'hg update' to get a working copy) |
|
119 | (run 'hg update' to get a working copy) | |
120 | $ hg update -r 'desc("add wider")' |
|
120 | $ hg update -r 'desc("add wider")' | |
121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
122 | $ cat wider/f |
|
122 | $ cat wider/f | |
123 | wider |
|
123 | wider | |
124 |
|
124 | |||
125 | $ hg update -r 'desc("update inside")' |
|
125 | $ hg update -r 'desc("update inside")' | |
126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
126 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
127 | $ cat wider/f |
|
127 | $ cat wider/f | |
128 | wider |
|
128 | wider | |
129 | $ cat inside/f |
|
129 | $ cat inside/f | |
130 | inside v2 |
|
130 | inside v2 | |
131 |
|
131 | |||
132 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
132 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
133 |
... |
|
133 | ...5: update widest v4 | |
134 |
|
|
134 | 4: update inside | |
135 |
... |
|
135 | ...3: update widest v3 | |
136 |
|
|
136 | 2: add wider, update widest | |
137 |
... |
|
137 | ...1: add outside | |
138 |
|
|
138 | 0: add inside | |
139 |
|
139 | |||
140 | Check that widening with a newline fails |
|
140 | Check that widening with a newline fails | |
141 |
|
141 | |||
142 | $ hg tracked --addinclude 'widest |
|
142 | $ hg tracked --addinclude 'widest | |
143 | > ' |
|
143 | > ' | |
144 | abort: newlines are not allowed in narrowspec paths |
|
144 | abort: newlines are not allowed in narrowspec paths | |
145 | [255] |
|
145 | [255] | |
146 |
|
146 | |||
147 | widen the narrow spec to include the widest file |
|
147 | widen the narrow spec to include the widest file | |
148 |
|
148 | |||
149 | $ hg tracked --addinclude widest |
|
149 | $ hg tracked --addinclude widest | |
150 | comparing with ssh://user@dummy/master |
|
150 | comparing with ssh://user@dummy/master | |
151 | searching for changes |
|
151 | searching for changes | |
152 | no changes found |
|
152 | no changes found | |
153 | saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) |
|
153 | saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) | |
154 | adding changesets |
|
154 | adding changesets | |
155 | adding manifests |
|
155 | adding manifests | |
156 | adding file changes |
|
156 | adding file changes | |
157 | added 8 changesets with 7 changes to 3 files |
|
157 | added 8 changesets with 7 changes to 3 files | |
158 | new changesets *:* (glob) |
|
158 | new changesets *:* (glob) | |
159 | $ hg tracked |
|
159 | $ hg tracked | |
160 | I path:inside |
|
160 | I path:inside | |
161 | I path:wider/f |
|
161 | I path:wider/f | |
162 | I path:widest |
|
162 | I path:widest | |
163 | $ hg update 'desc("add widest")' |
|
163 | $ hg update 'desc("add widest")' | |
164 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
164 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
165 | $ cat widest/f |
|
165 | $ cat widest/f | |
166 | widest |
|
166 | widest | |
167 | $ hg update 'desc("add wider, update widest")' |
|
167 | $ hg update 'desc("add wider, update widest")' | |
168 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
168 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
169 | $ cat wider/f |
|
169 | $ cat wider/f | |
170 | wider |
|
170 | wider | |
171 | $ cat widest/f |
|
171 | $ cat widest/f | |
172 | widest v2 |
|
172 | widest v2 | |
173 | $ hg update 'desc("update widest v3")' |
|
173 | $ hg update 'desc("update widest v3")' | |
174 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
174 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
175 | $ cat widest/f |
|
175 | $ cat widest/f | |
176 | widest v3 |
|
176 | widest v3 | |
177 | $ hg update 'desc("update widest v4")' |
|
177 | $ hg update 'desc("update widest v4")' | |
178 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
178 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
179 | $ cat widest/f |
|
179 | $ cat widest/f | |
180 | widest v4 |
|
180 | widest v4 | |
181 |
|
181 | |||
182 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
182 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
183 |
|
|
183 | 7: update widest v4 | |
184 |
... |
|
184 | ...6: add outside2 | |
185 |
|
|
185 | 5: update inside | |
186 |
|
|
186 | 4: update widest v3 | |
187 |
|
|
187 | 3: add wider, update widest | |
188 |
... |
|
188 | ...2: add outside | |
189 |
|
|
189 | 1: add widest | |
190 |
|
|
190 | 0: add inside | |
191 |
|
191 | |||
192 | separate suite of tests: files from 0-10 modified in changes 0-10. This allows |
|
192 | separate suite of tests: files from 0-10 modified in changes 0-10. This allows | |
193 | more obvious precise tests tickling particular corner cases. |
|
193 | more obvious precise tests tickling particular corner cases. | |
194 |
|
194 | |||
195 | $ cd .. |
|
195 | $ cd .. | |
196 | $ hg init upstream |
|
196 | $ hg init upstream | |
197 | $ cd upstream |
|
197 | $ cd upstream | |
198 | $ cat >> .hg/hgrc <<EOF |
|
198 | $ cat >> .hg/hgrc <<EOF | |
199 | > [narrow] |
|
199 | > [narrow] | |
200 | > serveellipses=True |
|
200 | > serveellipses=True | |
201 | > EOF |
|
201 | > EOF | |
202 | $ for x in `$TESTDIR/seq.py 0 10` |
|
202 | $ for x in `$TESTDIR/seq.py 0 10` | |
203 | > do |
|
203 | > do | |
204 | > mkdir d$x |
|
204 | > mkdir d$x | |
205 | > echo $x > d$x/f |
|
205 | > echo $x > d$x/f | |
206 | > hg add d$x/f |
|
206 | > hg add d$x/f | |
207 | > hg commit -m "add d$x/f" |
|
207 | > hg commit -m "add d$x/f" | |
208 | > done |
|
208 | > done | |
209 |
$ hg log -T "{ |
|
209 | $ hg log -T "{rev}: {desc}\n" | |
210 |
|
|
210 | 10: add d10/f | |
211 |
|
|
211 | 9: add d9/f | |
212 |
|
|
212 | 8: add d8/f | |
213 |
|
|
213 | 7: add d7/f | |
214 |
|
|
214 | 6: add d6/f | |
215 |
|
|
215 | 5: add d5/f | |
216 |
|
|
216 | 4: add d4/f | |
217 |
|
|
217 | 3: add d3/f | |
218 |
|
|
218 | 2: add d2/f | |
219 |
|
|
219 | 1: add d1/f | |
220 |
|
|
220 | 0: add d0/f | |
221 |
|
221 | |||
222 | make narrow clone with every third node. |
|
222 | make narrow clone with every third node. | |
223 |
|
223 | |||
224 | $ cd .. |
|
224 | $ cd .. | |
225 | $ hg clone --narrow ssh://user@dummy/upstream narrow2 --include d0 --include d3 --include d6 --include d9 |
|
225 | $ hg clone --narrow ssh://user@dummy/upstream narrow2 --include d0 --include d3 --include d6 --include d9 | |
226 | requesting all changes |
|
226 | requesting all changes | |
227 | adding changesets |
|
227 | adding changesets | |
228 | adding manifests |
|
228 | adding manifests | |
229 | adding file changes |
|
229 | adding file changes | |
230 | added 8 changesets with 4 changes to 4 files |
|
230 | added 8 changesets with 4 changes to 4 files | |
231 | new changesets *:* (glob) |
|
231 | new changesets *:* (glob) | |
232 | updating to branch default |
|
232 | updating to branch default | |
233 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
233 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
234 | $ cd narrow2 |
|
234 | $ cd narrow2 | |
235 | $ hg tracked |
|
235 | $ hg tracked | |
236 | I path:d0 |
|
236 | I path:d0 | |
237 | I path:d3 |
|
237 | I path:d3 | |
238 | I path:d6 |
|
238 | I path:d6 | |
239 | I path:d9 |
|
239 | I path:d9 | |
240 | $ hg verify |
|
240 | $ hg verify | |
241 | checking changesets |
|
241 | checking changesets | |
242 | checking manifests |
|
242 | checking manifests | |
243 | checking directory manifests (tree !) |
|
243 | checking directory manifests (tree !) | |
244 | crosschecking files in changesets and manifests |
|
244 | crosschecking files in changesets and manifests | |
245 | checking files |
|
245 | checking files | |
246 | 4 files, 8 changesets, 4 total revisions |
|
246 | 4 files, 8 changesets, 4 total revisions | |
247 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
247 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
248 |
... |
|
248 | ...7: add d10/f | |
249 |
|
|
249 | 6: add d9/f | |
250 |
... |
|
250 | ...5: add d8/f | |
251 |
|
|
251 | 4: add d6/f | |
252 |
... |
|
252 | ...3: add d5/f | |
253 |
|
|
253 | 2: add d3/f | |
254 |
... |
|
254 | ...1: add d2/f | |
255 |
|
|
255 | 0: add d0/f | |
256 | $ hg tracked --addinclude d1 |
|
256 | $ hg tracked --addinclude d1 | |
257 | comparing with ssh://user@dummy/upstream |
|
257 | comparing with ssh://user@dummy/upstream | |
258 | searching for changes |
|
258 | searching for changes | |
259 | no changes found |
|
259 | no changes found | |
260 | saved backup bundle to $TESTTMP/narrow2/.hg/strip-backup/*-widen.hg (glob) |
|
260 | saved backup bundle to $TESTTMP/narrow2/.hg/strip-backup/*-widen.hg (glob) | |
261 | adding changesets |
|
261 | adding changesets | |
262 | adding manifests |
|
262 | adding manifests | |
263 | adding file changes |
|
263 | adding file changes | |
264 | added 9 changesets with 5 changes to 5 files |
|
264 | added 9 changesets with 5 changes to 5 files | |
265 | new changesets *:* (glob) |
|
265 | new changesets *:* (glob) | |
266 | $ hg tracked |
|
266 | $ hg tracked | |
267 | I path:d0 |
|
267 | I path:d0 | |
268 | I path:d1 |
|
268 | I path:d1 | |
269 | I path:d3 |
|
269 | I path:d3 | |
270 | I path:d6 |
|
270 | I path:d6 | |
271 | I path:d9 |
|
271 | I path:d9 | |
272 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
272 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
273 |
... |
|
273 | ...8: add d10/f | |
274 |
|
|
274 | 7: add d9/f | |
275 |
... |
|
275 | ...6: add d8/f | |
276 |
|
|
276 | 5: add d6/f | |
277 |
... |
|
277 | ...4: add d5/f | |
278 |
|
|
278 | 3: add d3/f | |
279 |
... |
|
279 | ...2: add d2/f | |
280 |
|
|
280 | 1: add d1/f | |
281 |
|
|
281 | 0: add d0/f | |
282 |
|
282 | |||
283 | Verify shouldn't claim the repo is corrupt after a widen. |
|
283 | Verify shouldn't claim the repo is corrupt after a widen. | |
284 |
|
284 | |||
285 | $ hg verify |
|
285 | $ hg verify | |
286 | checking changesets |
|
286 | checking changesets | |
287 | checking manifests |
|
287 | checking manifests | |
288 | checking directory manifests (tree !) |
|
288 | checking directory manifests (tree !) | |
289 | crosschecking files in changesets and manifests |
|
289 | crosschecking files in changesets and manifests | |
290 | checking files |
|
290 | checking files | |
291 | 5 files, 9 changesets, 5 total revisions |
|
291 | 5 files, 9 changesets, 5 total revisions | |
292 |
|
292 | |||
293 | Widening preserves parent of local commit |
|
293 | Widening preserves parent of local commit | |
294 |
|
294 | |||
295 | $ cd .. |
|
295 | $ cd .. | |
296 | $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2 |
|
296 | $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2 | |
297 | $ cd narrow3 |
|
297 | $ cd narrow3 | |
298 |
$ hg log -T "{if(ellipsis, '...')}{ |
|
298 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
299 |
|
|
299 | 1: add d2/f | |
300 |
... |
|
300 | ...0: add d1/f | |
301 | $ hg pull -q -r 3 |
|
301 | $ hg pull -q -r 3 | |
302 | $ hg co -q tip |
|
302 | $ hg co -q tip | |
303 | $ hg pull -q -r 4 |
|
303 | $ hg pull -q -r 4 | |
304 | $ echo local > d2/f |
|
304 | $ echo local > d2/f | |
305 | $ hg ci -m local |
|
305 | $ hg ci -m local | |
306 | created new head |
|
306 | created new head | |
307 | $ hg tracked -q --addinclude d0 --addinclude d9 |
|
307 | $ hg tracked -q --addinclude d0 --addinclude d9 | |
308 |
|
308 | |||
309 | Widening preserves bookmarks |
|
309 | Widening preserves bookmarks | |
310 |
|
310 | |||
311 | $ cd .. |
|
311 | $ cd .. | |
312 | $ hg clone -q --narrow ssh://user@dummy/upstream narrow-bookmarks --include d4 |
|
312 | $ hg clone -q --narrow ssh://user@dummy/upstream narrow-bookmarks --include d4 | |
313 | $ cd narrow-bookmarks |
|
313 | $ cd narrow-bookmarks | |
314 | $ echo local > d4/f |
|
314 | $ echo local > d4/f | |
315 | $ hg ci -m local |
|
315 | $ hg ci -m local | |
316 | $ hg bookmarks bookmark |
|
316 | $ hg bookmarks bookmark | |
317 | $ hg bookmarks |
|
317 | $ hg bookmarks | |
318 | * bookmark 3:* (glob) |
|
318 | * bookmark 3:* (glob) | |
319 | $ hg -q tracked --addinclude d2 |
|
319 | $ hg -q tracked --addinclude d2 | |
320 | $ hg bookmarks |
|
320 | $ hg bookmarks | |
321 | * bookmark 5:* (glob) |
|
321 | * bookmark 5:* (glob) | |
322 | $ hg log -r bookmark -T '{desc}\n' |
|
322 | $ hg log -r bookmark -T '{desc}\n' | |
323 | local |
|
323 | local | |
324 |
|
324 | |||
325 | Widening that fails can be recovered from |
|
325 | Widening that fails can be recovered from | |
326 |
|
326 | |||
327 | $ cd .. |
|
327 | $ cd .. | |
328 | $ hg clone -q --narrow ssh://user@dummy/upstream interrupted --include d0 |
|
328 | $ hg clone -q --narrow ssh://user@dummy/upstream interrupted --include d0 | |
329 | $ cd interrupted |
|
329 | $ cd interrupted | |
330 | $ echo local > d0/f |
|
330 | $ echo local > d0/f | |
331 | $ hg ci -m local |
|
331 | $ hg ci -m local | |
332 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
|
332 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
333 | 2: local |
|
333 | 2: local | |
334 | ...1: add d10/f |
|
334 | ...1: add d10/f | |
335 | 0: add d0/f |
|
335 | 0: add d0/f | |
336 | $ hg bookmarks bookmark |
|
336 | $ hg bookmarks bookmark | |
337 | $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1 |
|
337 | $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1 | |
338 | comparing with ssh://user@dummy/upstream |
|
338 | comparing with ssh://user@dummy/upstream | |
339 | searching for changes |
|
339 | searching for changes | |
340 | no changes found |
|
340 | no changes found | |
341 | saved backup bundle to $TESTTMP/interrupted/.hg/strip-backup/*-widen.hg (glob) |
|
341 | saved backup bundle to $TESTTMP/interrupted/.hg/strip-backup/*-widen.hg (glob) | |
342 | adding changesets |
|
342 | adding changesets | |
343 | adding manifests |
|
343 | adding manifests | |
344 | adding file changes |
|
344 | adding file changes | |
345 | added 3 changesets with 2 changes to 2 files |
|
345 | added 3 changesets with 2 changes to 2 files | |
346 | transaction abort! |
|
346 | transaction abort! | |
347 | rollback completed |
|
347 | rollback completed | |
348 | abort: pretxnchangegroup.bad hook exited with status 1 |
|
348 | abort: pretxnchangegroup.bad hook exited with status 1 | |
349 | [255] |
|
349 | [255] | |
350 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
|
350 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
351 | $ hg bookmarks |
|
351 | $ hg bookmarks | |
352 | no bookmarks set |
|
352 | no bookmarks set | |
353 | $ hg unbundle .hg/strip-backup/*-widen.hg |
|
353 | $ hg unbundle .hg/strip-backup/*-widen.hg | |
354 | adding changesets |
|
354 | adding changesets | |
355 | adding manifests |
|
355 | adding manifests | |
356 | adding file changes |
|
356 | adding file changes | |
357 | added 3 changesets with 2 changes to 1 files |
|
357 | added 3 changesets with 2 changes to 1 files | |
358 | new changesets *:* (glob) |
|
358 | new changesets *:* (glob) | |
359 | (run 'hg update' to get a working copy) |
|
359 | (run 'hg update' to get a working copy) | |
360 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
|
360 | $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | |
361 | 2: local |
|
361 | 2: local | |
362 | ...1: add d10/f |
|
362 | ...1: add d10/f | |
363 | 0: add d0/f |
|
363 | 0: add d0/f | |
364 | $ hg bookmarks |
|
364 | $ hg bookmarks | |
365 | * bookmark 2:* (glob) |
|
365 | * bookmark 2:* (glob) |
@@ -1,402 +1,402 b'' | |||||
1 | #testcases flat tree |
|
1 | #testcases flat tree | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/narrow-library.sh" |
|
3 | $ . "$TESTDIR/narrow-library.sh" | |
4 |
|
4 | |||
5 | #if tree |
|
5 | #if tree | |
6 | $ cat << EOF >> $HGRCPATH |
|
6 | $ cat << EOF >> $HGRCPATH | |
7 | > [experimental] |
|
7 | > [experimental] | |
8 | > treemanifest = 1 |
|
8 | > treemanifest = 1 | |
9 | > EOF |
|
9 | > EOF | |
10 | #endif |
|
10 | #endif | |
11 |
|
11 | |||
12 | $ hg init master |
|
12 | $ hg init master | |
13 | $ cd master |
|
13 | $ cd master | |
14 | $ cat >> .hg/hgrc <<EOF |
|
14 | $ cat >> .hg/hgrc <<EOF | |
15 | > [narrow] |
|
15 | > [narrow] | |
16 | > serveellipses=True |
|
16 | > serveellipses=True | |
17 | > EOF |
|
17 | > EOF | |
18 | $ for x in `$TESTDIR/seq.py 0 10` |
|
18 | $ for x in `$TESTDIR/seq.py 0 10` | |
19 | > do |
|
19 | > do | |
20 | > mkdir d$x |
|
20 | > mkdir d$x | |
21 | > echo $x > d$x/f |
|
21 | > echo $x > d$x/f | |
22 | > hg add d$x/f |
|
22 | > hg add d$x/f | |
23 | > hg commit -m "add d$x/f" |
|
23 | > hg commit -m "add d$x/f" | |
24 | > done |
|
24 | > done | |
25 |
$ hg log -T "{ |
|
25 | $ hg log -T "{rev}: {desc}\n" | |
26 |
|
|
26 | 10: add d10/f | |
27 |
|
|
27 | 9: add d9/f | |
28 |
|
|
28 | 8: add d8/f | |
29 |
|
|
29 | 7: add d7/f | |
30 |
|
|
30 | 6: add d6/f | |
31 |
|
|
31 | 5: add d5/f | |
32 |
|
|
32 | 4: add d4/f | |
33 |
|
|
33 | 3: add d3/f | |
34 |
|
|
34 | 2: add d2/f | |
35 |
|
|
35 | 1: add d1/f | |
36 |
|
|
36 | 0: add d0/f | |
37 | $ cd .. |
|
37 | $ cd .. | |
38 |
|
38 | |||
39 | Error if '.' or '..' are in the directory to track. |
|
39 | Error if '.' or '..' are in the directory to track. | |
40 | $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf |
|
40 | $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf | |
41 | requesting all changes |
|
41 | requesting all changes | |
42 | abort: "." and ".." are not allowed in narrowspec paths |
|
42 | abort: "." and ".." are not allowed in narrowspec paths | |
43 | [255] |
|
43 | [255] | |
44 | $ hg clone --narrow ssh://user@dummy/master foo --include asdf/.. |
|
44 | $ hg clone --narrow ssh://user@dummy/master foo --include asdf/.. | |
45 | requesting all changes |
|
45 | requesting all changes | |
46 | abort: "." and ".." are not allowed in narrowspec paths |
|
46 | abort: "." and ".." are not allowed in narrowspec paths | |
47 | [255] |
|
47 | [255] | |
48 | $ hg clone --narrow ssh://user@dummy/master foo --include a/./c |
|
48 | $ hg clone --narrow ssh://user@dummy/master foo --include a/./c | |
49 | requesting all changes |
|
49 | requesting all changes | |
50 | abort: "." and ".." are not allowed in narrowspec paths |
|
50 | abort: "." and ".." are not allowed in narrowspec paths | |
51 | [255] |
|
51 | [255] | |
52 |
|
52 | |||
53 | Names with '.' in them are OK. |
|
53 | Names with '.' in them are OK. | |
54 | $ hg clone --narrow ssh://user@dummy/master should-work --include a/.b/c |
|
54 | $ hg clone --narrow ssh://user@dummy/master should-work --include a/.b/c | |
55 | requesting all changes |
|
55 | requesting all changes | |
56 | adding changesets |
|
56 | adding changesets | |
57 | adding manifests |
|
57 | adding manifests | |
58 | adding file changes |
|
58 | adding file changes | |
59 | added 1 changesets with 0 changes to 0 files |
|
59 | added 1 changesets with 0 changes to 0 files | |
60 | new changesets * (glob) |
|
60 | new changesets * (glob) | |
61 | updating to branch default |
|
61 | updating to branch default | |
62 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
62 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
63 |
|
63 | |||
64 | Test repo with local changes |
|
64 | Test repo with local changes | |
65 | $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6 |
|
65 | $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6 | |
66 | requesting all changes |
|
66 | requesting all changes | |
67 | adding changesets |
|
67 | adding changesets | |
68 | adding manifests |
|
68 | adding manifests | |
69 | adding file changes |
|
69 | adding file changes | |
70 | added 6 changesets with 3 changes to 3 files |
|
70 | added 6 changesets with 3 changes to 3 files | |
71 | new changesets *:* (glob) |
|
71 | new changesets *:* (glob) | |
72 | updating to branch default |
|
72 | updating to branch default | |
73 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
73 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
74 | $ cd narrow-local-changes |
|
74 | $ cd narrow-local-changes | |
75 | $ cat >> $HGRCPATH << EOF |
|
75 | $ cat >> $HGRCPATH << EOF | |
76 | > [experimental] |
|
76 | > [experimental] | |
77 | > evolution=createmarkers |
|
77 | > evolution=createmarkers | |
78 | > EOF |
|
78 | > EOF | |
79 | $ echo local change >> d0/f |
|
79 | $ echo local change >> d0/f | |
80 | $ hg ci -m 'local change to d0' |
|
80 | $ hg ci -m 'local change to d0' | |
81 | $ hg co '.^' |
|
81 | $ hg co '.^' | |
82 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
82 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
83 | $ echo local change >> d3/f |
|
83 | $ echo local change >> d3/f | |
84 | $ hg ci -m 'local hidden change to d3' |
|
84 | $ hg ci -m 'local hidden change to d3' | |
85 | created new head |
|
85 | created new head | |
86 | $ hg ci --amend -m 'local change to d3' |
|
86 | $ hg ci --amend -m 'local change to d3' | |
87 | $ hg tracked --removeinclude d0 |
|
87 | $ hg tracked --removeinclude d0 | |
88 | comparing with ssh://user@dummy/master |
|
88 | comparing with ssh://user@dummy/master | |
89 | searching for changes |
|
89 | searching for changes | |
90 | looking for local changes to affected paths |
|
90 | looking for local changes to affected paths | |
91 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
91 | The following changeset(s) or their ancestors have local changes not on the remote: | |
92 | * (glob) |
|
92 | * (glob) | |
93 | abort: local changes found |
|
93 | abort: local changes found | |
94 | (use --force-delete-local-changes to ignore) |
|
94 | (use --force-delete-local-changes to ignore) | |
95 | [255] |
|
95 | [255] | |
96 | Check that nothing was removed by the failed attempts |
|
96 | Check that nothing was removed by the failed attempts | |
97 | $ hg tracked |
|
97 | $ hg tracked | |
98 | I path:d0 |
|
98 | I path:d0 | |
99 | I path:d3 |
|
99 | I path:d3 | |
100 | I path:d6 |
|
100 | I path:d6 | |
101 | $ hg files |
|
101 | $ hg files | |
102 | d0/f |
|
102 | d0/f | |
103 | d3/f |
|
103 | d3/f | |
104 | d6/f |
|
104 | d6/f | |
105 | $ find * |
|
105 | $ find * | |
106 | d0 |
|
106 | d0 | |
107 | d0/f |
|
107 | d0/f | |
108 | d3 |
|
108 | d3 | |
109 | d3/f |
|
109 | d3/f | |
110 | d6 |
|
110 | d6 | |
111 | d6/f |
|
111 | d6/f | |
112 | $ hg verify -q |
|
112 | $ hg verify -q | |
113 | Force deletion of local changes |
|
113 | Force deletion of local changes | |
114 |
$ hg log -T "{ |
|
114 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" | |
115 |
|
|
115 | 8: local change to d3 | |
116 |
|
|
116 | 6: local change to d0 | |
117 |
|
|
117 | 5: add d10/f outsidenarrow | |
118 |
|
|
118 | 4: add d6/f | |
119 |
|
|
119 | 3: add d5/f outsidenarrow | |
120 |
|
|
120 | 2: add d3/f | |
121 |
|
|
121 | 1: add d2/f outsidenarrow | |
122 |
|
|
122 | 0: add d0/f | |
123 | $ hg tracked --removeinclude d0 --force-delete-local-changes |
|
123 | $ hg tracked --removeinclude d0 --force-delete-local-changes | |
124 | comparing with ssh://user@dummy/master |
|
124 | comparing with ssh://user@dummy/master | |
125 | searching for changes |
|
125 | searching for changes | |
126 | looking for local changes to affected paths |
|
126 | looking for local changes to affected paths | |
127 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
127 | The following changeset(s) or their ancestors have local changes not on the remote: | |
128 | * (glob) |
|
128 | * (glob) | |
129 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
129 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
130 | deleting data/d0/f.i (reporevlogstore !) |
|
130 | deleting data/d0/f.i (reporevlogstore !) | |
131 | deleting meta/d0/00manifest.i (tree !) |
|
131 | deleting meta/d0/00manifest.i (tree !) | |
132 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
132 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
133 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) |
|
133 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) | |
134 | deleting data/d0/f/index (reposimplestore !) |
|
134 | deleting data/d0/f/index (reposimplestore !) | |
135 |
|
135 | |||
136 |
$ hg log -T "{ |
|
136 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" | |
137 |
|
|
137 | 7: local change to d3 | |
138 |
|
|
138 | 5: add d10/f outsidenarrow | |
139 |
|
|
139 | 4: add d6/f | |
140 |
|
|
140 | 3: add d5/f outsidenarrow | |
141 |
|
|
141 | 2: add d3/f | |
142 |
|
|
142 | 1: add d2/f outsidenarrow | |
143 |
|
|
143 | 0: add d0/f outsidenarrow | |
144 | Can restore stripped local changes after widening |
|
144 | Can restore stripped local changes after widening | |
145 | $ hg tracked --addinclude d0 -q |
|
145 | $ hg tracked --addinclude d0 -q | |
146 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q |
|
146 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q | |
147 | $ hg --hidden co -r 'desc("local change to d0")' -q |
|
147 | $ hg --hidden co -r 'desc("local change to d0")' -q | |
148 | $ cat d0/f |
|
148 | $ cat d0/f | |
149 | 0 |
|
149 | 0 | |
150 | local change |
|
150 | local change | |
151 | Pruned commits affecting removed paths should not prevent narrowing |
|
151 | Pruned commits affecting removed paths should not prevent narrowing | |
152 | $ hg co '.^' |
|
152 | $ hg co '.^' | |
153 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
153 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
154 | $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'` |
|
154 | $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'` | |
155 | obsoleted 1 changesets |
|
155 | obsoleted 1 changesets | |
156 | $ hg tracked --removeinclude d0 |
|
156 | $ hg tracked --removeinclude d0 | |
157 | comparing with ssh://user@dummy/master |
|
157 | comparing with ssh://user@dummy/master | |
158 | searching for changes |
|
158 | searching for changes | |
159 | looking for local changes to affected paths |
|
159 | looking for local changes to affected paths | |
160 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
160 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
161 | deleting data/d0/f.i (reporevlogstore !) |
|
161 | deleting data/d0/f.i (reporevlogstore !) | |
162 | deleting meta/d0/00manifest.i (tree !) |
|
162 | deleting meta/d0/00manifest.i (tree !) | |
163 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
163 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
164 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) |
|
164 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) | |
165 | deleting data/d0/f/index (reposimplestore !) |
|
165 | deleting data/d0/f/index (reposimplestore !) | |
166 |
|
166 | |||
167 | Updates off of stripped commit if necessary |
|
167 | Updates off of stripped commit if necessary | |
168 | $ hg co -r 'desc("local change to d3")' -q |
|
168 | $ hg co -r 'desc("local change to d3")' -q | |
169 | $ echo local change >> d6/f |
|
169 | $ echo local change >> d6/f | |
170 | $ hg ci -m 'local change to d6' |
|
170 | $ hg ci -m 'local change to d6' | |
171 | $ hg tracked --removeinclude d3 --force-delete-local-changes |
|
171 | $ hg tracked --removeinclude d3 --force-delete-local-changes | |
172 | comparing with ssh://user@dummy/master |
|
172 | comparing with ssh://user@dummy/master | |
173 | searching for changes |
|
173 | searching for changes | |
174 | looking for local changes to affected paths |
|
174 | looking for local changes to affected paths | |
175 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
175 | The following changeset(s) or their ancestors have local changes not on the remote: | |
176 | * (glob) |
|
176 | * (glob) | |
177 | * (glob) |
|
177 | * (glob) | |
178 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
178 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
179 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
179 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
180 | deleting data/d3/f.i (reporevlogstore !) |
|
180 | deleting data/d3/f.i (reporevlogstore !) | |
181 | deleting meta/d3/00manifest.i (tree !) |
|
181 | deleting meta/d3/00manifest.i (tree !) | |
182 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) |
|
182 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |
183 | deleting data/d3/f/99fa7136105a15e2045ce3d9152e4837c5349e4d (reposimplestore !) |
|
183 | deleting data/d3/f/99fa7136105a15e2045ce3d9152e4837c5349e4d (reposimplestore !) | |
184 | deleting data/d3/f/index (reposimplestore !) |
|
184 | deleting data/d3/f/index (reposimplestore !) | |
185 | $ hg log -T '{desc}\n' -r . |
|
185 | $ hg log -T '{desc}\n' -r . | |
186 | add d10/f |
|
186 | add d10/f | |
187 | Updates to nullid if necessary |
|
187 | Updates to nullid if necessary | |
188 | $ hg tracked --addinclude d3 -q |
|
188 | $ hg tracked --addinclude d3 -q | |
189 | $ hg co null -q |
|
189 | $ hg co null -q | |
190 | $ mkdir d3 |
|
190 | $ mkdir d3 | |
191 | $ echo local change > d3/f |
|
191 | $ echo local change > d3/f | |
192 | $ hg add d3/f |
|
192 | $ hg add d3/f | |
193 | $ hg ci -m 'local change to d3' |
|
193 | $ hg ci -m 'local change to d3' | |
194 | created new head |
|
194 | created new head | |
195 | $ hg tracked --removeinclude d3 --force-delete-local-changes |
|
195 | $ hg tracked --removeinclude d3 --force-delete-local-changes | |
196 | comparing with ssh://user@dummy/master |
|
196 | comparing with ssh://user@dummy/master | |
197 | searching for changes |
|
197 | searching for changes | |
198 | looking for local changes to affected paths |
|
198 | looking for local changes to affected paths | |
199 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
199 | The following changeset(s) or their ancestors have local changes not on the remote: | |
200 | * (glob) |
|
200 | * (glob) | |
201 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
201 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
202 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
202 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
203 | deleting data/d3/f.i (reporevlogstore !) |
|
203 | deleting data/d3/f.i (reporevlogstore !) | |
204 | deleting meta/d3/00manifest.i (tree !) |
|
204 | deleting meta/d3/00manifest.i (tree !) | |
205 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) |
|
205 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |
206 | deleting data/d3/f/5ce0767945cbdbca3b924bb9fbf5143f72ab40ac (reposimplestore !) |
|
206 | deleting data/d3/f/5ce0767945cbdbca3b924bb9fbf5143f72ab40ac (reposimplestore !) | |
207 | deleting data/d3/f/index (reposimplestore !) |
|
207 | deleting data/d3/f/index (reposimplestore !) | |
208 | $ hg id |
|
208 | $ hg id | |
209 | 000000000000 |
|
209 | 000000000000 | |
210 | $ cd .. |
|
210 | $ cd .. | |
211 |
|
211 | |||
212 | Can remove last include, making repo empty |
|
212 | Can remove last include, making repo empty | |
213 | $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 |
|
213 | $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 | |
214 | adding changesets |
|
214 | adding changesets | |
215 | adding manifests |
|
215 | adding manifests | |
216 | adding file changes |
|
216 | adding file changes | |
217 | added 2 changesets with 1 changes to 1 files |
|
217 | added 2 changesets with 1 changes to 1 files | |
218 | new changesets *:* (glob) |
|
218 | new changesets *:* (glob) | |
219 | updating to branch default |
|
219 | updating to branch default | |
220 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
220 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
221 | $ cd narrow-empty |
|
221 | $ cd narrow-empty | |
222 | $ hg tracked --removeinclude d0 |
|
222 | $ hg tracked --removeinclude d0 | |
223 | comparing with ssh://user@dummy/master |
|
223 | comparing with ssh://user@dummy/master | |
224 | searching for changes |
|
224 | searching for changes | |
225 | looking for local changes to affected paths |
|
225 | looking for local changes to affected paths | |
226 | deleting data/d0/f.i (reporevlogstore !) |
|
226 | deleting data/d0/f.i (reporevlogstore !) | |
227 | deleting meta/d0/00manifest.i (tree !) |
|
227 | deleting meta/d0/00manifest.i (tree !) | |
228 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
228 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
229 | deleting data/d0/f/index (reposimplestore !) |
|
229 | deleting data/d0/f/index (reposimplestore !) | |
230 | $ hg tracked |
|
230 | $ hg tracked | |
231 | $ hg files |
|
231 | $ hg files | |
232 | [1] |
|
232 | [1] | |
233 | $ test -d d0 |
|
233 | $ test -d d0 | |
234 | [1] |
|
234 | [1] | |
235 | Do some work in the empty clone |
|
235 | Do some work in the empty clone | |
236 | $ hg diff --change . |
|
236 | $ hg diff --change . | |
237 | $ hg branch foo |
|
237 | $ hg branch foo | |
238 | marked working directory as branch foo |
|
238 | marked working directory as branch foo | |
239 | (branches are permanent and global, did you want a bookmark?) |
|
239 | (branches are permanent and global, did you want a bookmark?) | |
240 | $ hg ci -m empty |
|
240 | $ hg ci -m empty | |
241 | $ hg pull -q |
|
241 | $ hg pull -q | |
242 | Can widen the empty clone |
|
242 | Can widen the empty clone | |
243 | $ hg tracked --addinclude d0 |
|
243 | $ hg tracked --addinclude d0 | |
244 | comparing with ssh://user@dummy/master |
|
244 | comparing with ssh://user@dummy/master | |
245 | searching for changes |
|
245 | searching for changes | |
246 | no changes found |
|
246 | no changes found | |
247 | saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob) |
|
247 | saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob) | |
248 | adding changesets |
|
248 | adding changesets | |
249 | adding manifests |
|
249 | adding manifests | |
250 | adding file changes |
|
250 | adding file changes | |
251 | added 3 changesets with 1 changes to 1 files |
|
251 | added 3 changesets with 1 changes to 1 files | |
252 | new changesets *:* (glob) |
|
252 | new changesets *:* (glob) | |
253 | $ hg tracked |
|
253 | $ hg tracked | |
254 | I path:d0 |
|
254 | I path:d0 | |
255 | $ hg files |
|
255 | $ hg files | |
256 | d0/f |
|
256 | d0/f | |
257 | $ find * |
|
257 | $ find * | |
258 | d0 |
|
258 | d0 | |
259 | d0/f |
|
259 | d0/f | |
260 | $ cd .. |
|
260 | $ cd .. | |
261 |
|
261 | |||
262 | TODO(martinvonz): test including e.g. d3/g and then removing it once |
|
262 | TODO(martinvonz): test including e.g. d3/g and then removing it once | |
263 | https://bitbucket.org/Google/narrowhg/issues/6 is fixed |
|
263 | https://bitbucket.org/Google/narrowhg/issues/6 is fixed | |
264 |
|
264 | |||
265 | $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9 |
|
265 | $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9 | |
266 | requesting all changes |
|
266 | requesting all changes | |
267 | adding changesets |
|
267 | adding changesets | |
268 | adding manifests |
|
268 | adding manifests | |
269 | adding file changes |
|
269 | adding file changes | |
270 | added 8 changesets with 4 changes to 4 files |
|
270 | added 8 changesets with 4 changes to 4 files | |
271 | new changesets *:* (glob) |
|
271 | new changesets *:* (glob) | |
272 | updating to branch default |
|
272 | updating to branch default | |
273 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
273 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
274 | $ cd narrow |
|
274 | $ cd narrow | |
275 | $ hg tracked |
|
275 | $ hg tracked | |
276 | I path:d0 |
|
276 | I path:d0 | |
277 | I path:d3 |
|
277 | I path:d3 | |
278 | I path:d6 |
|
278 | I path:d6 | |
279 | I path:d9 |
|
279 | I path:d9 | |
280 | $ hg tracked --removeinclude d6 |
|
280 | $ hg tracked --removeinclude d6 | |
281 | comparing with ssh://user@dummy/master |
|
281 | comparing with ssh://user@dummy/master | |
282 | searching for changes |
|
282 | searching for changes | |
283 | looking for local changes to affected paths |
|
283 | looking for local changes to affected paths | |
284 | deleting data/d6/f.i (reporevlogstore !) |
|
284 | deleting data/d6/f.i (reporevlogstore !) | |
285 | deleting meta/d6/00manifest.i (tree !) |
|
285 | deleting meta/d6/00manifest.i (tree !) | |
286 | deleting data/d6/f/7339d30678f451ac8c3f38753beeb4cf2e1655c7 (reposimplestore !) |
|
286 | deleting data/d6/f/7339d30678f451ac8c3f38753beeb4cf2e1655c7 (reposimplestore !) | |
287 | deleting data/d6/f/index (reposimplestore !) |
|
287 | deleting data/d6/f/index (reposimplestore !) | |
288 | $ hg tracked |
|
288 | $ hg tracked | |
289 | I path:d0 |
|
289 | I path:d0 | |
290 | I path:d3 |
|
290 | I path:d3 | |
291 | I path:d9 |
|
291 | I path:d9 | |
292 | #if repofncache |
|
292 | #if repofncache | |
293 | $ hg debugrebuildfncache |
|
293 | $ hg debugrebuildfncache | |
294 | fncache already up to date |
|
294 | fncache already up to date | |
295 | #endif |
|
295 | #endif | |
296 | $ find * |
|
296 | $ find * | |
297 | d0 |
|
297 | d0 | |
298 | d0/f |
|
298 | d0/f | |
299 | d3 |
|
299 | d3 | |
300 | d3/f |
|
300 | d3/f | |
301 | d9 |
|
301 | d9 | |
302 | d9/f |
|
302 | d9/f | |
303 | $ hg verify -q |
|
303 | $ hg verify -q | |
304 | $ hg tracked --addexclude d3/f |
|
304 | $ hg tracked --addexclude d3/f | |
305 | comparing with ssh://user@dummy/master |
|
305 | comparing with ssh://user@dummy/master | |
306 | searching for changes |
|
306 | searching for changes | |
307 | looking for local changes to affected paths |
|
307 | looking for local changes to affected paths | |
308 | deleting data/d3/f.i (reporevlogstore !) |
|
308 | deleting data/d3/f.i (reporevlogstore !) | |
309 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) |
|
309 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |
310 | deleting data/d3/f/index (reposimplestore !) |
|
310 | deleting data/d3/f/index (reposimplestore !) | |
311 | $ hg tracked |
|
311 | $ hg tracked | |
312 | I path:d0 |
|
312 | I path:d0 | |
313 | I path:d3 |
|
313 | I path:d3 | |
314 | I path:d9 |
|
314 | I path:d9 | |
315 | X path:d3/f |
|
315 | X path:d3/f | |
316 | #if repofncache |
|
316 | #if repofncache | |
317 | $ hg debugrebuildfncache |
|
317 | $ hg debugrebuildfncache | |
318 | fncache already up to date |
|
318 | fncache already up to date | |
319 | #endif |
|
319 | #endif | |
320 | $ find * |
|
320 | $ find * | |
321 | d0 |
|
321 | d0 | |
322 | d0/f |
|
322 | d0/f | |
323 | d9 |
|
323 | d9 | |
324 | d9/f |
|
324 | d9/f | |
325 | $ hg verify -q |
|
325 | $ hg verify -q | |
326 | $ hg tracked --addexclude d0 |
|
326 | $ hg tracked --addexclude d0 | |
327 | comparing with ssh://user@dummy/master |
|
327 | comparing with ssh://user@dummy/master | |
328 | searching for changes |
|
328 | searching for changes | |
329 | looking for local changes to affected paths |
|
329 | looking for local changes to affected paths | |
330 | deleting data/d0/f.i (reporevlogstore !) |
|
330 | deleting data/d0/f.i (reporevlogstore !) | |
331 | deleting meta/d0/00manifest.i (tree !) |
|
331 | deleting meta/d0/00manifest.i (tree !) | |
332 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
332 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
333 | deleting data/d0/f/index (reposimplestore !) |
|
333 | deleting data/d0/f/index (reposimplestore !) | |
334 | $ hg tracked |
|
334 | $ hg tracked | |
335 | I path:d3 |
|
335 | I path:d3 | |
336 | I path:d9 |
|
336 | I path:d9 | |
337 | X path:d0 |
|
337 | X path:d0 | |
338 | X path:d3/f |
|
338 | X path:d3/f | |
339 | #if repofncache |
|
339 | #if repofncache | |
340 | $ hg debugrebuildfncache |
|
340 | $ hg debugrebuildfncache | |
341 | fncache already up to date |
|
341 | fncache already up to date | |
342 | #endif |
|
342 | #endif | |
343 | $ find * |
|
343 | $ find * | |
344 | d9 |
|
344 | d9 | |
345 | d9/f |
|
345 | d9/f | |
346 |
|
346 | |||
347 | Make a 15 of changes to d9 to test the path without --verbose |
|
347 | Make a 15 of changes to d9 to test the path without --verbose | |
348 | (Note: using regexes instead of "* (glob)" because if the test fails, it |
|
348 | (Note: using regexes instead of "* (glob)" because if the test fails, it | |
349 | produces more sensible diffs) |
|
349 | produces more sensible diffs) | |
350 | $ hg tracked |
|
350 | $ hg tracked | |
351 | I path:d3 |
|
351 | I path:d3 | |
352 | I path:d9 |
|
352 | I path:d9 | |
353 | X path:d0 |
|
353 | X path:d0 | |
354 | X path:d3/f |
|
354 | X path:d3/f | |
355 | $ for x in `$TESTDIR/seq.py 1 15` |
|
355 | $ for x in `$TESTDIR/seq.py 1 15` | |
356 | > do |
|
356 | > do | |
357 | > echo local change >> d9/f |
|
357 | > echo local change >> d9/f | |
358 | > hg commit -m "change $x to d9/f" |
|
358 | > hg commit -m "change $x to d9/f" | |
359 | > done |
|
359 | > done | |
360 | $ hg tracked --removeinclude d9 |
|
360 | $ hg tracked --removeinclude d9 | |
361 | comparing with ssh://user@dummy/master |
|
361 | comparing with ssh://user@dummy/master | |
362 | searching for changes |
|
362 | searching for changes | |
363 | looking for local changes to affected paths |
|
363 | looking for local changes to affected paths | |
364 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
364 | The following changeset(s) or their ancestors have local changes not on the remote: | |
365 | ^[0-9a-f]{12}$ (re) |
|
365 | ^[0-9a-f]{12}$ (re) | |
366 | ^[0-9a-f]{12}$ (re) |
|
366 | ^[0-9a-f]{12}$ (re) | |
367 | ^[0-9a-f]{12}$ (re) |
|
367 | ^[0-9a-f]{12}$ (re) | |
368 | ^[0-9a-f]{12}$ (re) |
|
368 | ^[0-9a-f]{12}$ (re) | |
369 | ^[0-9a-f]{12}$ (re) |
|
369 | ^[0-9a-f]{12}$ (re) | |
370 | ^[0-9a-f]{12}$ (re) |
|
370 | ^[0-9a-f]{12}$ (re) | |
371 | ^[0-9a-f]{12}$ (re) |
|
371 | ^[0-9a-f]{12}$ (re) | |
372 | ^[0-9a-f]{12}$ (re) |
|
372 | ^[0-9a-f]{12}$ (re) | |
373 | ^[0-9a-f]{12}$ (re) |
|
373 | ^[0-9a-f]{12}$ (re) | |
374 | ^[0-9a-f]{12}$ (re) |
|
374 | ^[0-9a-f]{12}$ (re) | |
375 | ...and 5 more, use --verbose to list all |
|
375 | ...and 5 more, use --verbose to list all | |
376 | abort: local changes found |
|
376 | abort: local changes found | |
377 | (use --force-delete-local-changes to ignore) |
|
377 | (use --force-delete-local-changes to ignore) | |
378 | [255] |
|
378 | [255] | |
379 | Now test it *with* verbose. |
|
379 | Now test it *with* verbose. | |
380 | $ hg tracked --removeinclude d9 --verbose |
|
380 | $ hg tracked --removeinclude d9 --verbose | |
381 | comparing with ssh://user@dummy/master |
|
381 | comparing with ssh://user@dummy/master | |
382 | searching for changes |
|
382 | searching for changes | |
383 | looking for local changes to affected paths |
|
383 | looking for local changes to affected paths | |
384 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
384 | The following changeset(s) or their ancestors have local changes not on the remote: | |
385 | ^[0-9a-f]{12}$ (re) |
|
385 | ^[0-9a-f]{12}$ (re) | |
386 | ^[0-9a-f]{12}$ (re) |
|
386 | ^[0-9a-f]{12}$ (re) | |
387 | ^[0-9a-f]{12}$ (re) |
|
387 | ^[0-9a-f]{12}$ (re) | |
388 | ^[0-9a-f]{12}$ (re) |
|
388 | ^[0-9a-f]{12}$ (re) | |
389 | ^[0-9a-f]{12}$ (re) |
|
389 | ^[0-9a-f]{12}$ (re) | |
390 | ^[0-9a-f]{12}$ (re) |
|
390 | ^[0-9a-f]{12}$ (re) | |
391 | ^[0-9a-f]{12}$ (re) |
|
391 | ^[0-9a-f]{12}$ (re) | |
392 | ^[0-9a-f]{12}$ (re) |
|
392 | ^[0-9a-f]{12}$ (re) | |
393 | ^[0-9a-f]{12}$ (re) |
|
393 | ^[0-9a-f]{12}$ (re) | |
394 | ^[0-9a-f]{12}$ (re) |
|
394 | ^[0-9a-f]{12}$ (re) | |
395 | ^[0-9a-f]{12}$ (re) |
|
395 | ^[0-9a-f]{12}$ (re) | |
396 | ^[0-9a-f]{12}$ (re) |
|
396 | ^[0-9a-f]{12}$ (re) | |
397 | ^[0-9a-f]{12}$ (re) |
|
397 | ^[0-9a-f]{12}$ (re) | |
398 | ^[0-9a-f]{12}$ (re) |
|
398 | ^[0-9a-f]{12}$ (re) | |
399 | ^[0-9a-f]{12}$ (re) |
|
399 | ^[0-9a-f]{12}$ (re) | |
400 | abort: local changes found |
|
400 | abort: local changes found | |
401 | (use --force-delete-local-changes to ignore) |
|
401 | (use --force-delete-local-changes to ignore) | |
402 | [255] |
|
402 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now