##// END OF EJS Templates
subrepo: fix test breakage introduced in 2b34d004e644...
Kevin Bullock -
r19049:2e547698 default
parent child Browse files
Show More
@@ -1,559 +1,560 b''
1 $ "$TESTDIR/hghave" git || exit 80
1 $ "$TESTDIR/hghave" git || exit 80
2
2
3 make git commits repeatable
3 make git commits repeatable
4
4
5 $ echo "[core]" >> $HOME/.gitconfig
5 $ echo "[core]" >> $HOME/.gitconfig
6 $ echo "autocrlf = false" >> $HOME/.gitconfig
6 $ echo "autocrlf = false" >> $HOME/.gitconfig
7 $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
7 $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
8 $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
8 $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
9 $ GIT_AUTHOR_DATE='1234567891 +0000'; export GIT_AUTHOR_DATE
9 $ GIT_AUTHOR_DATE='1234567891 +0000'; export GIT_AUTHOR_DATE
10 $ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
10 $ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
11 $ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
11 $ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
12 $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
12 $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
13
13
14 root hg repo
14 root hg repo
15
15
16 $ hg init t
16 $ hg init t
17 $ cd t
17 $ cd t
18 $ echo a > a
18 $ echo a > a
19 $ hg add a
19 $ hg add a
20 $ hg commit -m a
20 $ hg commit -m a
21 $ cd ..
21 $ cd ..
22
22
23 new external git repo
23 new external git repo
24
24
25 $ mkdir gitroot
25 $ mkdir gitroot
26 $ cd gitroot
26 $ cd gitroot
27 $ git init -q
27 $ git init -q
28 $ echo g > g
28 $ echo g > g
29 $ git add g
29 $ git add g
30 $ git commit -q -m g
30 $ git commit -q -m g
31
31
32 add subrepo clone
32 add subrepo clone
33
33
34 $ cd ../t
34 $ cd ../t
35 $ echo 's = [git]../gitroot' > .hgsub
35 $ echo 's = [git]../gitroot' > .hgsub
36 $ git clone -q ../gitroot s
36 $ git clone -q ../gitroot s
37 $ hg add .hgsub
37 $ hg add .hgsub
38 $ hg commit -m 'new git subrepo'
38 $ hg commit -m 'new git subrepo'
39 $ hg debugsub
39 $ hg debugsub
40 path s
40 path s
41 source ../gitroot
41 source ../gitroot
42 revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
42 revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
43
43
44 record a new commit from upstream from a different branch
44 record a new commit from upstream from a different branch
45
45
46 $ cd ../gitroot
46 $ cd ../gitroot
47 $ git checkout -q -b testing
47 $ git checkout -q -b testing
48 $ echo gg >> g
48 $ echo gg >> g
49 $ git commit -q -a -m gg
49 $ git commit -q -a -m gg
50
50
51 $ cd ../t/s
51 $ cd ../t/s
52 $ git pull -q >/dev/null 2>/dev/null
52 $ git pull -q >/dev/null 2>/dev/null
53 $ git checkout -q -b testing origin/testing >/dev/null
53 $ git checkout -q -b testing origin/testing >/dev/null
54
54
55 $ cd ..
55 $ cd ..
56 $ hg status --subrepos
56 $ hg status --subrepos
57 M s/g
57 M s/g
58 $ hg commit -m 'update git subrepo'
58 $ hg commit -m 'update git subrepo'
59 $ hg debugsub
59 $ hg debugsub
60 path s
60 path s
61 source ../gitroot
61 source ../gitroot
62 revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a
62 revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a
63
63
64 make $GITROOT pushable, by replacing it with a clone with nothing checked out
64 make $GITROOT pushable, by replacing it with a clone with nothing checked out
65
65
66 $ cd ..
66 $ cd ..
67 $ git clone gitroot gitrootbare --bare -q
67 $ git clone gitroot gitrootbare --bare -q
68 $ rm -rf gitroot
68 $ rm -rf gitroot
69 $ mv gitrootbare gitroot
69 $ mv gitrootbare gitroot
70
70
71 clone root
71 clone root
72
72
73 $ cd t
73 $ cd t
74 $ hg clone . ../tc
74 $ hg clone . ../tc
75 updating to branch default
75 updating to branch default
76 cloning subrepo s from $TESTTMP/gitroot
76 cloning subrepo s from $TESTTMP/gitroot
77 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
78 $ cd ../tc
78 $ cd ../tc
79 $ hg debugsub
79 $ hg debugsub
80 path s
80 path s
81 source ../gitroot
81 source ../gitroot
82 revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a
82 revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a
83
83
84 update to previous substate
84 update to previous substate
85
85
86 $ hg update 1 -q
86 $ hg update 1 -q
87 $ cat s/g
87 $ cat s/g
88 g
88 g
89 $ hg debugsub
89 $ hg debugsub
90 path s
90 path s
91 source ../gitroot
91 source ../gitroot
92 revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
92 revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
93
93
94 clone root, make local change
94 clone root, make local change
95
95
96 $ cd ../t
96 $ cd ../t
97 $ hg clone . ../ta
97 $ hg clone . ../ta
98 updating to branch default
98 updating to branch default
99 cloning subrepo s from $TESTTMP/gitroot
99 cloning subrepo s from $TESTTMP/gitroot
100 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
101
101
102 $ cd ../ta
102 $ cd ../ta
103 $ echo ggg >> s/g
103 $ echo ggg >> s/g
104 $ hg status --subrepos
104 $ hg status --subrepos
105 M s/g
105 M s/g
106 $ hg commit --subrepos -m ggg
106 $ hg commit --subrepos -m ggg
107 committing subrepository s
107 committing subrepository s
108 $ hg debugsub
108 $ hg debugsub
109 path s
109 path s
110 source ../gitroot
110 source ../gitroot
111 revision 79695940086840c99328513acbe35f90fcd55e57
111 revision 79695940086840c99328513acbe35f90fcd55e57
112
112
113 clone root separately, make different local change
113 clone root separately, make different local change
114
114
115 $ cd ../t
115 $ cd ../t
116 $ hg clone . ../tb
116 $ hg clone . ../tb
117 updating to branch default
117 updating to branch default
118 cloning subrepo s from $TESTTMP/gitroot
118 cloning subrepo s from $TESTTMP/gitroot
119 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
119 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
120
120
121 $ cd ../tb/s
121 $ cd ../tb/s
122 $ echo f > f
122 $ echo f > f
123 $ git add f
123 $ git add f
124 $ cd ..
124 $ cd ..
125
125
126 $ hg status --subrepos
126 $ hg status --subrepos
127 A s/f
127 A s/f
128 $ hg commit --subrepos -m f
128 $ hg commit --subrepos -m f
129 committing subrepository s
129 committing subrepository s
130 $ hg debugsub
130 $ hg debugsub
131 path s
131 path s
132 source ../gitroot
132 source ../gitroot
133 revision aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
133 revision aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
134
134
135 user b push changes
135 user b push changes
136
136
137 $ hg push 2>/dev/null
137 $ hg push 2>/dev/null
138 pushing to $TESTTMP/t (glob)
138 pushing to $TESTTMP/t (glob)
139 pushing branch testing of subrepo s
139 pushing branch testing of subrepo s
140 searching for changes
140 searching for changes
141 adding changesets
141 adding changesets
142 adding manifests
142 adding manifests
143 adding file changes
143 adding file changes
144 added 1 changesets with 1 changes to 1 files
144 added 1 changesets with 1 changes to 1 files
145
145
146 user a pulls, merges, commits
146 user a pulls, merges, commits
147
147
148 $ cd ../ta
148 $ cd ../ta
149 $ hg pull
149 $ hg pull
150 pulling from $TESTTMP/t (glob)
150 pulling from $TESTTMP/t (glob)
151 searching for changes
151 searching for changes
152 adding changesets
152 adding changesets
153 adding manifests
153 adding manifests
154 adding file changes
154 adding file changes
155 added 1 changesets with 1 changes to 1 files (+1 heads)
155 added 1 changesets with 1 changes to 1 files (+1 heads)
156 (run 'hg heads' to see heads, 'hg merge' to merge)
156 (run 'hg heads' to see heads, 'hg merge' to merge)
157 $ hg merge 2>/dev/null
157 $ hg merge 2>/dev/null
158 pulling subrepo s from $TESTTMP/gitroot
158 pulling subrepo s from $TESTTMP/gitroot
159 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
159 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 (branch merge, don't forget to commit)
160 (branch merge, don't forget to commit)
161 $ cat s/f
161 $ cat s/f
162 f
162 f
163 $ cat s/g
163 $ cat s/g
164 g
164 g
165 gg
165 gg
166 ggg
166 ggg
167 $ hg commit --subrepos -m 'merge'
167 $ hg commit --subrepos -m 'merge'
168 committing subrepository s
168 committing subrepository s
169 $ hg status --subrepos --rev 1:5
169 $ hg status --subrepos --rev 1:5
170 M .hgsubstate
170 M .hgsubstate
171 M s/g
171 M s/g
172 A s/f
172 A s/f
173 $ hg debugsub
173 $ hg debugsub
174 path s
174 path s
175 source ../gitroot
175 source ../gitroot
176 revision f47b465e1bce645dbf37232a00574aa1546ca8d3
176 revision f47b465e1bce645dbf37232a00574aa1546ca8d3
177 $ hg push 2>/dev/null
177 $ hg push 2>/dev/null
178 pushing to $TESTTMP/t (glob)
178 pushing to $TESTTMP/t (glob)
179 pushing branch testing of subrepo s
179 pushing branch testing of subrepo s
180 searching for changes
180 searching for changes
181 adding changesets
181 adding changesets
182 adding manifests
182 adding manifests
183 adding file changes
183 adding file changes
184 added 2 changesets with 2 changes to 1 files
184 added 2 changesets with 2 changes to 1 files
185
185
186 make upstream git changes
186 make upstream git changes
187
187
188 $ cd ..
188 $ cd ..
189 $ git clone -q gitroot gitclone
189 $ git clone -q gitroot gitclone
190 $ cd gitclone
190 $ cd gitclone
191 $ echo ff >> f
191 $ echo ff >> f
192 $ git commit -q -a -m ff
192 $ git commit -q -a -m ff
193 $ echo fff >> f
193 $ echo fff >> f
194 $ git commit -q -a -m fff
194 $ git commit -q -a -m fff
195 $ git push origin testing 2>/dev/null
195 $ git push origin testing 2>/dev/null
196
196
197 make and push changes to hg without updating the subrepo
197 make and push changes to hg without updating the subrepo
198
198
199 $ cd ../t
199 $ cd ../t
200 $ hg clone . ../td
200 $ hg clone . ../td
201 updating to branch default
201 updating to branch default
202 cloning subrepo s from $TESTTMP/gitroot
202 cloning subrepo s from $TESTTMP/gitroot
203 checking out detached HEAD in subrepo s
203 checking out detached HEAD in subrepo s
204 check out a git branch if you intend to make changes
204 check out a git branch if you intend to make changes
205 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
205 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
206 $ cd ../td
206 $ cd ../td
207 $ echo aa >> a
207 $ echo aa >> a
208 $ hg commit -m aa
208 $ hg commit -m aa
209 $ hg push
209 $ hg push
210 pushing to $TESTTMP/t (glob)
210 pushing to $TESTTMP/t (glob)
211 searching for changes
211 searching for changes
212 adding changesets
212 adding changesets
213 adding manifests
213 adding manifests
214 adding file changes
214 adding file changes
215 added 1 changesets with 1 changes to 1 files
215 added 1 changesets with 1 changes to 1 files
216
216
217 sync to upstream git, distribute changes
217 sync to upstream git, distribute changes
218
218
219 $ cd ../ta
219 $ cd ../ta
220 $ hg pull -u -q
220 $ hg pull -u -q
221 $ cd s
221 $ cd s
222 $ git pull -q >/dev/null 2>/dev/null
222 $ git pull -q >/dev/null 2>/dev/null
223 $ cd ..
223 $ cd ..
224 $ hg commit -m 'git upstream sync'
224 $ hg commit -m 'git upstream sync'
225 $ hg debugsub
225 $ hg debugsub
226 path s
226 path s
227 source ../gitroot
227 source ../gitroot
228 revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc
228 revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc
229 $ hg push -q
229 $ hg push -q
230
230
231 $ cd ../tb
231 $ cd ../tb
232 $ hg pull -q
232 $ hg pull -q
233 $ hg update 2>/dev/null
233 $ hg update 2>/dev/null
234 pulling subrepo s from $TESTTMP/gitroot
234 pulling subrepo s from $TESTTMP/gitroot
235 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
235 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
236 $ hg debugsub
236 $ hg debugsub
237 path s
237 path s
238 source ../gitroot
238 source ../gitroot
239 revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc
239 revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc
240
240
241 create a new git branch
241 create a new git branch
242
242
243 $ cd s
243 $ cd s
244 $ git checkout -b b2
244 $ git checkout -b b2
245 Switched to a new branch 'b2'
245 Switched to a new branch 'b2'
246 $ echo a>a
246 $ echo a>a
247 $ git add a
247 $ git add a
248 $ git commit -qm 'add a'
248 $ git commit -qm 'add a'
249 $ cd ..
249 $ cd ..
250 $ hg commit -m 'add branch in s'
250 $ hg commit -m 'add branch in s'
251
251
252 pulling new git branch should not create tracking branch named 'origin/b2'
252 pulling new git branch should not create tracking branch named 'origin/b2'
253 (issue3870)
253 (issue3870)
254 $ cd ../td/s
254 $ cd ../td/s
255 $ git remote set-url origin $TESTTMP/tb/s
255 $ git remote set-url origin $TESTTMP/tb/s
256 $ git branch --no-track oldtesting
256 $ cd ..
257 $ cd ..
257 $ hg pull -q ../tb
258 $ hg pull -q ../tb
258 $ hg up
259 $ hg up
259 From $TESTTMP/tb/s
260 From $TESTTMP/tb/s
260 * [new branch] b2 -> origin/b2
261 * [new branch] b2 -> origin/b2
261 Previous HEAD position was f47b465... merge
262 Previous HEAD position was f47b465... merge
262 Switched to a new branch 'b2'
263 Switched to a new branch 'b2'
263 pulling subrepo s from $TESTTMP/tb/s
264 pulling subrepo s from $TESTTMP/tb/s
264 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
265 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
265
266
266 update to a revision without the subrepo, keeping the local git repository
267 update to a revision without the subrepo, keeping the local git repository
267
268
268 $ cd ../t
269 $ cd ../t
269 $ hg up 0
270 $ hg up 0
270 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
271 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
271 $ ls -a s
272 $ ls -a s
272 .
273 .
273 ..
274 ..
274 .git
275 .git
275
276
276 $ hg up 2
277 $ hg up 2
277 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
278 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
278 $ ls -a s
279 $ ls -a s
279 .
280 .
280 ..
281 ..
281 .git
282 .git
282 g
283 g
283
284
284 archive subrepos
285 archive subrepos
285
286
286 $ cd ../tc
287 $ cd ../tc
287 $ hg pull -q
288 $ hg pull -q
288 $ hg archive --subrepos -r 5 ../archive 2>/dev/null
289 $ hg archive --subrepos -r 5 ../archive 2>/dev/null
289 pulling subrepo s from $TESTTMP/gitroot
290 pulling subrepo s from $TESTTMP/gitroot
290 $ cd ../archive
291 $ cd ../archive
291 $ cat s/f
292 $ cat s/f
292 f
293 f
293 $ cat s/g
294 $ cat s/g
294 g
295 g
295 gg
296 gg
296 ggg
297 ggg
297
298
298 $ hg -R ../tc archive --subrepo -r 5 -X ../tc/**f ../archive_x 2>/dev/null
299 $ hg -R ../tc archive --subrepo -r 5 -X ../tc/**f ../archive_x 2>/dev/null
299 $ find ../archive_x | sort | grep -v pax_global_header
300 $ find ../archive_x | sort | grep -v pax_global_header
300 ../archive_x
301 ../archive_x
301 ../archive_x/.hg_archival.txt
302 ../archive_x/.hg_archival.txt
302 ../archive_x/.hgsub
303 ../archive_x/.hgsub
303 ../archive_x/.hgsubstate
304 ../archive_x/.hgsubstate
304 ../archive_x/a
305 ../archive_x/a
305 ../archive_x/s
306 ../archive_x/s
306 ../archive_x/s/g
307 ../archive_x/s/g
307
308
308 create nested repo
309 create nested repo
309
310
310 $ cd ..
311 $ cd ..
311 $ hg init outer
312 $ hg init outer
312 $ cd outer
313 $ cd outer
313 $ echo b>b
314 $ echo b>b
314 $ hg add b
315 $ hg add b
315 $ hg commit -m b
316 $ hg commit -m b
316
317
317 $ hg clone ../t inner
318 $ hg clone ../t inner
318 updating to branch default
319 updating to branch default
319 cloning subrepo s from $TESTTMP/gitroot
320 cloning subrepo s from $TESTTMP/gitroot
320 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
321 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
321 $ echo inner = inner > .hgsub
322 $ echo inner = inner > .hgsub
322 $ hg add .hgsub
323 $ hg add .hgsub
323 $ hg commit -m 'nested sub'
324 $ hg commit -m 'nested sub'
324
325
325 nested commit
326 nested commit
326
327
327 $ echo ffff >> inner/s/f
328 $ echo ffff >> inner/s/f
328 $ hg status --subrepos
329 $ hg status --subrepos
329 M inner/s/f
330 M inner/s/f
330 $ hg commit --subrepos -m nested
331 $ hg commit --subrepos -m nested
331 committing subrepository inner
332 committing subrepository inner
332 committing subrepository inner/s (glob)
333 committing subrepository inner/s (glob)
333
334
334 nested archive
335 nested archive
335
336
336 $ hg archive --subrepos ../narchive
337 $ hg archive --subrepos ../narchive
337 $ ls ../narchive/inner/s | grep -v pax_global_header
338 $ ls ../narchive/inner/s | grep -v pax_global_header
338 f
339 f
339 g
340 g
340
341
341 relative source expansion
342 relative source expansion
342
343
343 $ cd ..
344 $ cd ..
344 $ mkdir d
345 $ mkdir d
345 $ hg clone t d/t
346 $ hg clone t d/t
346 updating to branch default
347 updating to branch default
347 cloning subrepo s from $TESTTMP/gitroot
348 cloning subrepo s from $TESTTMP/gitroot
348 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
349 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
349
350
350 Don't crash if the subrepo is missing
351 Don't crash if the subrepo is missing
351
352
352 $ hg clone t missing -q
353 $ hg clone t missing -q
353 $ cd missing
354 $ cd missing
354 $ rm -rf s
355 $ rm -rf s
355 $ hg status -S
356 $ hg status -S
356 $ hg sum | grep commit
357 $ hg sum | grep commit
357 commit: 1 subrepos
358 commit: 1 subrepos
358 $ hg push -q
359 $ hg push -q
359 abort: subrepo s is missing (in subrepo s)
360 abort: subrepo s is missing (in subrepo s)
360 [255]
361 [255]
361 $ hg commit --subrepos -qm missing
362 $ hg commit --subrepos -qm missing
362 abort: subrepo s is missing (in subrepo s)
363 abort: subrepo s is missing (in subrepo s)
363 [255]
364 [255]
364 $ hg update -C
365 $ hg update -C
365 cloning subrepo s from $TESTTMP/gitroot
366 cloning subrepo s from $TESTTMP/gitroot
366 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
367 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
367 $ hg sum | grep commit
368 $ hg sum | grep commit
368 commit: (clean)
369 commit: (clean)
369
370
370 Don't crash if the .hgsubstate entry is missing
371 Don't crash if the .hgsubstate entry is missing
371
372
372 $ hg update 1 -q
373 $ hg update 1 -q
373 $ hg rm .hgsubstate
374 $ hg rm .hgsubstate
374 $ hg commit .hgsubstate -m 'no substate'
375 $ hg commit .hgsubstate -m 'no substate'
375 nothing changed
376 nothing changed
376 [1]
377 [1]
377 $ hg tag -l nosubstate
378 $ hg tag -l nosubstate
378 $ hg manifest
379 $ hg manifest
379 .hgsub
380 .hgsub
380 .hgsubstate
381 .hgsubstate
381 a
382 a
382
383
383 $ hg status -S
384 $ hg status -S
384 R .hgsubstate
385 R .hgsubstate
385 $ hg sum | grep commit
386 $ hg sum | grep commit
386 commit: 1 removed, 1 subrepos (new branch head)
387 commit: 1 removed, 1 subrepos (new branch head)
387
388
388 $ hg commit -m 'restore substate'
389 $ hg commit -m 'restore substate'
389 nothing changed
390 nothing changed
390 [1]
391 [1]
391 $ hg manifest
392 $ hg manifest
392 .hgsub
393 .hgsub
393 .hgsubstate
394 .hgsubstate
394 a
395 a
395 $ hg sum | grep commit
396 $ hg sum | grep commit
396 commit: 1 removed, 1 subrepos (new branch head)
397 commit: 1 removed, 1 subrepos (new branch head)
397
398
398 $ hg update -qC nosubstate
399 $ hg update -qC nosubstate
399 $ ls s
400 $ ls s
400 g
401 g
401
402
402 issue3109: false positives in git diff-index
403 issue3109: false positives in git diff-index
403
404
404 $ hg update -q
405 $ hg update -q
405 $ touch -t 200001010000 s/g
406 $ touch -t 200001010000 s/g
406 $ hg status --subrepos
407 $ hg status --subrepos
407 $ touch -t 200001010000 s/g
408 $ touch -t 200001010000 s/g
408 $ hg sum | grep commit
409 $ hg sum | grep commit
409 commit: (clean)
410 commit: (clean)
410
411
411 Check hg update --clean
412 Check hg update --clean
412 $ cd $TESTTMP/ta
413 $ cd $TESTTMP/ta
413 $ echo > s/g
414 $ echo > s/g
414 $ cd s
415 $ cd s
415 $ echo c1 > f1
416 $ echo c1 > f1
416 $ echo c1 > f2
417 $ echo c1 > f2
417 $ git add f1
418 $ git add f1
418 $ cd ..
419 $ cd ..
419 $ hg status -S
420 $ hg status -S
420 M s/g
421 M s/g
421 A s/f1
422 A s/f1
422 $ ls s
423 $ ls s
423 f
424 f
424 f1
425 f1
425 f2
426 f2
426 g
427 g
427 $ hg update --clean
428 $ hg update --clean
428 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
429 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
429 $ hg status -S
430 $ hg status -S
430 $ ls s
431 $ ls s
431 f
432 f
432 f1
433 f1
433 f2
434 f2
434 g
435 g
435
436
436 Sticky subrepositories, no changes
437 Sticky subrepositories, no changes
437 $ cd $TESTTMP/ta
438 $ cd $TESTTMP/ta
438 $ hg id -n
439 $ hg id -n
439 7
440 7
440 $ cd s
441 $ cd s
441 $ git rev-parse HEAD
442 $ git rev-parse HEAD
442 32a343883b74769118bb1d3b4b1fbf9156f4dddc
443 32a343883b74769118bb1d3b4b1fbf9156f4dddc
443 $ cd ..
444 $ cd ..
444 $ hg update 1 > /dev/null 2>&1
445 $ hg update 1 > /dev/null 2>&1
445 $ hg id -n
446 $ hg id -n
446 1
447 1
447 $ cd s
448 $ cd s
448 $ git rev-parse HEAD
449 $ git rev-parse HEAD
449 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
450 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
450 $ cd ..
451 $ cd ..
451
452
452 Sticky subrepositorys, file changes
453 Sticky subrepositorys, file changes
453 $ touch s/f1
454 $ touch s/f1
454 $ cd s
455 $ cd s
455 $ git add f1
456 $ git add f1
456 $ cd ..
457 $ cd ..
457 $ hg id -n
458 $ hg id -n
458 1+
459 1+
459 $ cd s
460 $ cd s
460 $ git rev-parse HEAD
461 $ git rev-parse HEAD
461 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
462 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
462 $ cd ..
463 $ cd ..
463 $ hg update 4
464 $ hg update 4
464 subrepository sources for s differ
465 subrepository sources for s differ
465 use (l)ocal source (da5f5b1) or (r)emote source (aa84837)?
466 use (l)ocal source (da5f5b1) or (r)emote source (aa84837)?
466 l
467 l
467 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
468 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
468 $ hg id -n
469 $ hg id -n
469 4+
470 4+
470 $ cd s
471 $ cd s
471 $ git rev-parse HEAD
472 $ git rev-parse HEAD
472 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
473 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
473 $ cd ..
474 $ cd ..
474 $ hg update --clean tip > /dev/null 2>&1
475 $ hg update --clean tip > /dev/null 2>&1
475
476
476 Sticky subrepository, revision updates
477 Sticky subrepository, revision updates
477 $ hg id -n
478 $ hg id -n
478 7
479 7
479 $ cd s
480 $ cd s
480 $ git rev-parse HEAD
481 $ git rev-parse HEAD
481 32a343883b74769118bb1d3b4b1fbf9156f4dddc
482 32a343883b74769118bb1d3b4b1fbf9156f4dddc
482 $ cd ..
483 $ cd ..
483 $ cd s
484 $ cd s
484 $ git checkout aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
485 $ git checkout aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
485 Previous HEAD position was 32a3438... fff
486 Previous HEAD position was 32a3438... fff
486 HEAD is now at aa84837... f
487 HEAD is now at aa84837... f
487 $ cd ..
488 $ cd ..
488 $ hg update 1
489 $ hg update 1
489 subrepository sources for s differ (in checked out version)
490 subrepository sources for s differ (in checked out version)
490 use (l)ocal source (32a3438) or (r)emote source (da5f5b1)?
491 use (l)ocal source (32a3438) or (r)emote source (da5f5b1)?
491 l
492 l
492 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
493 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
493 $ hg id -n
494 $ hg id -n
494 1+
495 1+
495 $ cd s
496 $ cd s
496 $ git rev-parse HEAD
497 $ git rev-parse HEAD
497 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
498 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
498 $ cd ..
499 $ cd ..
499
500
500 Sticky subrepository, file changes and revision updates
501 Sticky subrepository, file changes and revision updates
501 $ touch s/f1
502 $ touch s/f1
502 $ cd s
503 $ cd s
503 $ git add f1
504 $ git add f1
504 $ git rev-parse HEAD
505 $ git rev-parse HEAD
505 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
506 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
506 $ cd ..
507 $ cd ..
507 $ hg id -n
508 $ hg id -n
508 1+
509 1+
509 $ hg update 7
510 $ hg update 7
510 subrepository sources for s differ
511 subrepository sources for s differ
511 use (l)ocal source (32a3438) or (r)emote source (32a3438)?
512 use (l)ocal source (32a3438) or (r)emote source (32a3438)?
512 l
513 l
513 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
514 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
514 $ hg id -n
515 $ hg id -n
515 7+
516 7+
516 $ cd s
517 $ cd s
517 $ git rev-parse HEAD
518 $ git rev-parse HEAD
518 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
519 aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
519 $ cd ..
520 $ cd ..
520
521
521 Sticky repository, update --clean
522 Sticky repository, update --clean
522 $ hg update --clean tip 2>/dev/null
523 $ hg update --clean tip 2>/dev/null
523 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
524 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
524 $ hg id -n
525 $ hg id -n
525 7
526 7
526 $ cd s
527 $ cd s
527 $ git rev-parse HEAD
528 $ git rev-parse HEAD
528 32a343883b74769118bb1d3b4b1fbf9156f4dddc
529 32a343883b74769118bb1d3b4b1fbf9156f4dddc
529 $ cd ..
530 $ cd ..
530
531
531 Test subrepo already at intended revision:
532 Test subrepo already at intended revision:
532 $ cd s
533 $ cd s
533 $ git checkout 32a343883b74769118bb1d3b4b1fbf9156f4dddc
534 $ git checkout 32a343883b74769118bb1d3b4b1fbf9156f4dddc
534 HEAD is now at 32a3438... fff
535 HEAD is now at 32a3438... fff
535 $ cd ..
536 $ cd ..
536 $ hg update 1
537 $ hg update 1
537 Previous HEAD position was 32a3438... fff
538 Previous HEAD position was 32a3438... fff
538 HEAD is now at da5f5b1... g
539 HEAD is now at da5f5b1... g
539 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
540 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
540 $ hg id -n
541 $ hg id -n
541 1
542 1
542 $ cd s
543 $ cd s
543 $ git rev-parse HEAD
544 $ git rev-parse HEAD
544 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
545 da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
545 $ cd ..
546 $ cd ..
546
547
547 Test forgetting files, not implemented in git subrepo, used to
548 Test forgetting files, not implemented in git subrepo, used to
548 traceback
549 traceback
549 #if no-windows
550 #if no-windows
550 $ hg forget 'notafile*'
551 $ hg forget 'notafile*'
551 notafile*: No such file or directory
552 notafile*: No such file or directory
552 [1]
553 [1]
553 #else
554 #else
554 $ hg forget 'notafile'
555 $ hg forget 'notafile'
555 notafile: * (glob)
556 notafile: * (glob)
556 [1]
557 [1]
557 #endif
558 #endif
558
559
559 $ cd ..
560 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now