##// END OF EJS Templates
grammar: rolled-back
timeless@mozdev.org -
r17529:b61a6271 default
parent child Browse files
Show More
@@ -1,514 +1,514 b''
1 $ echo "[ui]" >> $HGRCPATH
1 $ echo "[ui]" >> $HGRCPATH
2 $ echo "commitsubrepos = Yes" >> $HGRCPATH
2 $ echo "commitsubrepos = Yes" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
4 $ echo "mq=" >> $HGRCPATH
4 $ echo "mq=" >> $HGRCPATH
5 $ echo "record=" >> $HGRCPATH
5 $ echo "record=" >> $HGRCPATH
6 $ echo "[diff]" >> $HGRCPATH
6 $ echo "[diff]" >> $HGRCPATH
7 $ echo "nodates=1" >> $HGRCPATH
7 $ echo "nodates=1" >> $HGRCPATH
8
8
9 $ stdin=`pwd`/stdin.tmp
9 $ stdin=`pwd`/stdin.tmp
10
10
11 fn to create new repository w/dirty subrepo, and cd into it
11 fn to create new repository w/dirty subrepo, and cd into it
12 $ mkrepo() {
12 $ mkrepo() {
13 > hg init $1
13 > hg init $1
14 > cd $1
14 > cd $1
15 > hg qinit
15 > hg qinit
16 > }
16 > }
17
17
18 fn to create dirty subrepo
18 fn to create dirty subrepo
19 $ mksubrepo() {
19 $ mksubrepo() {
20 > hg init $1
20 > hg init $1
21 > cd $1
21 > cd $1
22 > echo a > a
22 > echo a > a
23 > hg add
23 > hg add
24 > cd ..
24 > cd ..
25 > }
25 > }
26
26
27 $ testadd() {
27 $ testadd() {
28 > cat - > "$stdin"
28 > cat - > "$stdin"
29 > mksubrepo sub
29 > mksubrepo sub
30 > echo sub = sub >> .hgsub
30 > echo sub = sub >> .hgsub
31 > hg add .hgsub
31 > hg add .hgsub
32 > echo % abort when adding .hgsub w/dirty subrepo
32 > echo % abort when adding .hgsub w/dirty subrepo
33 > hg status -S
33 > hg status -S
34 > echo '%' $*
34 > echo '%' $*
35 > cat "$stdin" | hg $*
35 > cat "$stdin" | hg $*
36 > echo [$?]
36 > echo [$?]
37 > hg -R sub ci -m0sub
37 > hg -R sub ci -m0sub
38 > echo % update substate when adding .hgsub w/clean updated subrepo
38 > echo % update substate when adding .hgsub w/clean updated subrepo
39 > hg status -S
39 > hg status -S
40 > echo '%' $*
40 > echo '%' $*
41 > cat "$stdin" | hg $*
41 > cat "$stdin" | hg $*
42 > hg debugsub
42 > hg debugsub
43 > }
43 > }
44
44
45 $ testmod() {
45 $ testmod() {
46 > cat - > "$stdin"
46 > cat - > "$stdin"
47 > mksubrepo sub2
47 > mksubrepo sub2
48 > echo sub2 = sub2 >> .hgsub
48 > echo sub2 = sub2 >> .hgsub
49 > echo % abort when modifying .hgsub w/dirty subrepo
49 > echo % abort when modifying .hgsub w/dirty subrepo
50 > hg status -S
50 > hg status -S
51 > echo '%' $*
51 > echo '%' $*
52 > cat "$stdin" | hg $*
52 > cat "$stdin" | hg $*
53 > echo [$?]
53 > echo [$?]
54 > hg -R sub2 ci -m0sub2
54 > hg -R sub2 ci -m0sub2
55 > echo % update substate when modifying .hgsub w/clean updated subrepo
55 > echo % update substate when modifying .hgsub w/clean updated subrepo
56 > hg status -S
56 > hg status -S
57 > echo '%' $*
57 > echo '%' $*
58 > cat "$stdin" | hg $*
58 > cat "$stdin" | hg $*
59 > hg debugsub
59 > hg debugsub
60 > }
60 > }
61
61
62 $ testrm1() {
62 $ testrm1() {
63 > cat - > "$stdin"
63 > cat - > "$stdin"
64 > mksubrepo sub3
64 > mksubrepo sub3
65 > echo sub3 = sub3 >> .hgsub
65 > echo sub3 = sub3 >> .hgsub
66 > hg ci -Aqmsub3
66 > hg ci -Aqmsub3
67 > $EXTRA
67 > $EXTRA
68 > echo b >> sub3/a
68 > echo b >> sub3/a
69 > hg rm .hgsub
69 > hg rm .hgsub
70 > echo % update substate when removing .hgsub w/dirty subrepo
70 > echo % update substate when removing .hgsub w/dirty subrepo
71 > hg status -S
71 > hg status -S
72 > echo '%' $*
72 > echo '%' $*
73 > cat "$stdin" | hg $*
73 > cat "$stdin" | hg $*
74 > echo % debugsub should be empty
74 > echo % debugsub should be empty
75 > hg debugsub
75 > hg debugsub
76 > }
76 > }
77
77
78 $ testrm2() {
78 $ testrm2() {
79 > cat - > "$stdin"
79 > cat - > "$stdin"
80 > mksubrepo sub4
80 > mksubrepo sub4
81 > echo sub4 = sub4 >> .hgsub
81 > echo sub4 = sub4 >> .hgsub
82 > hg ci -Aqmsub4
82 > hg ci -Aqmsub4
83 > $EXTRA
83 > $EXTRA
84 > hg rm .hgsub
84 > hg rm .hgsub
85 > echo % update substate when removing .hgsub w/clean updated subrepo
85 > echo % update substate when removing .hgsub w/clean updated subrepo
86 > hg status -S
86 > hg status -S
87 > echo '%' $*
87 > echo '%' $*
88 > cat "$stdin" | hg $*
88 > cat "$stdin" | hg $*
89 > echo % debugsub should be empty
89 > echo % debugsub should be empty
90 > hg debugsub
90 > hg debugsub
91 > }
91 > }
92
92
93
93
94 handle subrepos safely on qnew
94 handle subrepos safely on qnew
95
95
96 $ mkrepo repo-2499-qnew
96 $ mkrepo repo-2499-qnew
97 $ testadd qnew -m0 0.diff
97 $ testadd qnew -m0 0.diff
98 adding a
98 adding a
99 % abort when adding .hgsub w/dirty subrepo
99 % abort when adding .hgsub w/dirty subrepo
100 A .hgsub
100 A .hgsub
101 A sub/a
101 A sub/a
102 % qnew -m0 0.diff
102 % qnew -m0 0.diff
103 abort: uncommitted changes in subrepository sub
103 abort: uncommitted changes in subrepository sub
104 [255]
104 [255]
105 % update substate when adding .hgsub w/clean updated subrepo
105 % update substate when adding .hgsub w/clean updated subrepo
106 A .hgsub
106 A .hgsub
107 % qnew -m0 0.diff
107 % qnew -m0 0.diff
108 path sub
108 path sub
109 source sub
109 source sub
110 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
110 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
111
111
112 $ testmod qnew -m1 1.diff
112 $ testmod qnew -m1 1.diff
113 adding a
113 adding a
114 % abort when modifying .hgsub w/dirty subrepo
114 % abort when modifying .hgsub w/dirty subrepo
115 M .hgsub
115 M .hgsub
116 A sub2/a
116 A sub2/a
117 % qnew -m1 1.diff
117 % qnew -m1 1.diff
118 abort: uncommitted changes in subrepository sub2
118 abort: uncommitted changes in subrepository sub2
119 [255]
119 [255]
120 % update substate when modifying .hgsub w/clean updated subrepo
120 % update substate when modifying .hgsub w/clean updated subrepo
121 M .hgsub
121 M .hgsub
122 % qnew -m1 1.diff
122 % qnew -m1 1.diff
123 path sub
123 path sub
124 source sub
124 source sub
125 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
125 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
126 path sub2
126 path sub2
127 source sub2
127 source sub2
128 revision 1f94c7611cc6b74f5a17b16121a1170d44776845
128 revision 1f94c7611cc6b74f5a17b16121a1170d44776845
129
129
130 $ hg qpop -qa
130 $ hg qpop -qa
131 patch queue now empty
131 patch queue now empty
132 $ testrm1 qnew -m2 2.diff
132 $ testrm1 qnew -m2 2.diff
133 adding a
133 adding a
134 % update substate when removing .hgsub w/dirty subrepo
134 % update substate when removing .hgsub w/dirty subrepo
135 M sub3/a
135 M sub3/a
136 R .hgsub
136 R .hgsub
137 % qnew -m2 2.diff
137 % qnew -m2 2.diff
138 % debugsub should be empty
138 % debugsub should be empty
139
139
140 $ hg qpop -qa
140 $ hg qpop -qa
141 patch queue now empty
141 patch queue now empty
142 $ testrm2 qnew -m3 3.diff
142 $ testrm2 qnew -m3 3.diff
143 adding a
143 adding a
144 % update substate when removing .hgsub w/clean updated subrepo
144 % update substate when removing .hgsub w/clean updated subrepo
145 R .hgsub
145 R .hgsub
146 % qnew -m3 3.diff
146 % qnew -m3 3.diff
147 % debugsub should be empty
147 % debugsub should be empty
148
148
149 $ cd ..
149 $ cd ..
150
150
151
151
152 handle subrepos safely on qrefresh
152 handle subrepos safely on qrefresh
153
153
154 $ mkrepo repo-2499-qrefresh
154 $ mkrepo repo-2499-qrefresh
155 $ hg qnew -m0 0.diff
155 $ hg qnew -m0 0.diff
156 $ testadd qrefresh
156 $ testadd qrefresh
157 adding a
157 adding a
158 % abort when adding .hgsub w/dirty subrepo
158 % abort when adding .hgsub w/dirty subrepo
159 A .hgsub
159 A .hgsub
160 A sub/a
160 A sub/a
161 % qrefresh
161 % qrefresh
162 abort: uncommitted changes in subrepository sub
162 abort: uncommitted changes in subrepository sub
163 [255]
163 [255]
164 % update substate when adding .hgsub w/clean updated subrepo
164 % update substate when adding .hgsub w/clean updated subrepo
165 A .hgsub
165 A .hgsub
166 % qrefresh
166 % qrefresh
167 path sub
167 path sub
168 source sub
168 source sub
169 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
169 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
170
170
171 $ hg qnew -m1 1.diff
171 $ hg qnew -m1 1.diff
172 $ testmod qrefresh
172 $ testmod qrefresh
173 adding a
173 adding a
174 % abort when modifying .hgsub w/dirty subrepo
174 % abort when modifying .hgsub w/dirty subrepo
175 M .hgsub
175 M .hgsub
176 A sub2/a
176 A sub2/a
177 % qrefresh
177 % qrefresh
178 abort: uncommitted changes in subrepository sub2
178 abort: uncommitted changes in subrepository sub2
179 [255]
179 [255]
180 % update substate when modifying .hgsub w/clean updated subrepo
180 % update substate when modifying .hgsub w/clean updated subrepo
181 M .hgsub
181 M .hgsub
182 % qrefresh
182 % qrefresh
183 path sub
183 path sub
184 source sub
184 source sub
185 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
185 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
186 path sub2
186 path sub2
187 source sub2
187 source sub2
188 revision 1f94c7611cc6b74f5a17b16121a1170d44776845
188 revision 1f94c7611cc6b74f5a17b16121a1170d44776845
189
189
190 $ hg qpop -qa
190 $ hg qpop -qa
191 patch queue now empty
191 patch queue now empty
192 $ EXTRA='hg qnew -m2 2.diff'
192 $ EXTRA='hg qnew -m2 2.diff'
193 $ testrm1 qrefresh
193 $ testrm1 qrefresh
194 adding a
194 adding a
195 % update substate when removing .hgsub w/dirty subrepo
195 % update substate when removing .hgsub w/dirty subrepo
196 M sub3/a
196 M sub3/a
197 R .hgsub
197 R .hgsub
198 % qrefresh
198 % qrefresh
199 % debugsub should be empty
199 % debugsub should be empty
200
200
201 $ hg qpop -qa
201 $ hg qpop -qa
202 patch queue now empty
202 patch queue now empty
203 $ EXTRA='hg qnew -m3 3.diff'
203 $ EXTRA='hg qnew -m3 3.diff'
204 $ testrm2 qrefresh
204 $ testrm2 qrefresh
205 adding a
205 adding a
206 % update substate when removing .hgsub w/clean updated subrepo
206 % update substate when removing .hgsub w/clean updated subrepo
207 R .hgsub
207 R .hgsub
208 % qrefresh
208 % qrefresh
209 % debugsub should be empty
209 % debugsub should be empty
210 $ EXTRA=
210 $ EXTRA=
211
211
212 $ cd ..
212 $ cd ..
213
213
214
214
215 handle subrepos safely on qpush/qpop
215 handle subrepos safely on qpush/qpop
216
216
217 $ mkrepo repo-2499-qpush
217 $ mkrepo repo-2499-qpush
218 $ mksubrepo sub
218 $ mksubrepo sub
219 adding a
219 adding a
220 $ hg -R sub ci -m0sub
220 $ hg -R sub ci -m0sub
221 $ echo sub = sub > .hgsub
221 $ echo sub = sub > .hgsub
222 $ hg add .hgsub
222 $ hg add .hgsub
223 $ hg qnew -m0 0.diff
223 $ hg qnew -m0 0.diff
224 $ hg debugsub
224 $ hg debugsub
225 path sub
225 path sub
226 source sub
226 source sub
227 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
227 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
228
228
229 qpop
229 qpop
230 $ hg qpop
230 $ hg qpop
231 popping 0.diff
231 popping 0.diff
232 patch queue now empty
232 patch queue now empty
233 $ hg status -AS
233 $ hg status -AS
234 $ hg debugsub
234 $ hg debugsub
235
235
236 qpush
236 qpush
237 $ hg qpush
237 $ hg qpush
238 applying 0.diff
238 applying 0.diff
239 now at: 0.diff
239 now at: 0.diff
240 $ hg status -AS
240 $ hg status -AS
241 C .hgsub
241 C .hgsub
242 C .hgsubstate
242 C .hgsubstate
243 C sub/a
243 C sub/a
244 $ hg debugsub
244 $ hg debugsub
245 path sub
245 path sub
246 source sub
246 source sub
247 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
247 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
248
248
249 $ cd ..
249 $ cd ..
250
250
251
251
252 handle subrepos safely on qrecord
252 handle subrepos safely on qrecord
253
253
254 $ mkrepo repo-2499-qrecord
254 $ mkrepo repo-2499-qrecord
255 $ testadd qrecord --config ui.interactive=1 -m0 0.diff <<EOF
255 $ testadd qrecord --config ui.interactive=1 -m0 0.diff <<EOF
256 > y
256 > y
257 > y
257 > y
258 > EOF
258 > EOF
259 adding a
259 adding a
260 % abort when adding .hgsub w/dirty subrepo
260 % abort when adding .hgsub w/dirty subrepo
261 A .hgsub
261 A .hgsub
262 A sub/a
262 A sub/a
263 % qrecord --config ui.interactive=1 -m0 0.diff
263 % qrecord --config ui.interactive=1 -m0 0.diff
264 diff --git a/.hgsub b/.hgsub
264 diff --git a/.hgsub b/.hgsub
265 new file mode 100644
265 new file mode 100644
266 examine changes to '.hgsub'? [Ynesfdaq?]
266 examine changes to '.hgsub'? [Ynesfdaq?]
267 abort: uncommitted changes in subrepository sub
267 abort: uncommitted changes in subrepository sub
268 [255]
268 [255]
269 % update substate when adding .hgsub w/clean updated subrepo
269 % update substate when adding .hgsub w/clean updated subrepo
270 A .hgsub
270 A .hgsub
271 % qrecord --config ui.interactive=1 -m0 0.diff
271 % qrecord --config ui.interactive=1 -m0 0.diff
272 diff --git a/.hgsub b/.hgsub
272 diff --git a/.hgsub b/.hgsub
273 new file mode 100644
273 new file mode 100644
274 examine changes to '.hgsub'? [Ynesfdaq?]
274 examine changes to '.hgsub'? [Ynesfdaq?]
275 path sub
275 path sub
276 source sub
276 source sub
277 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
277 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
278
278
279 $ testmod qrecord --config ui.interactive=1 -m1 1.diff <<EOF
279 $ testmod qrecord --config ui.interactive=1 -m1 1.diff <<EOF
280 > y
280 > y
281 > y
281 > y
282 > EOF
282 > EOF
283 adding a
283 adding a
284 % abort when modifying .hgsub w/dirty subrepo
284 % abort when modifying .hgsub w/dirty subrepo
285 M .hgsub
285 M .hgsub
286 A sub2/a
286 A sub2/a
287 % qrecord --config ui.interactive=1 -m1 1.diff
287 % qrecord --config ui.interactive=1 -m1 1.diff
288 diff --git a/.hgsub b/.hgsub
288 diff --git a/.hgsub b/.hgsub
289 1 hunks, 1 lines changed
289 1 hunks, 1 lines changed
290 examine changes to '.hgsub'? [Ynesfdaq?]
290 examine changes to '.hgsub'? [Ynesfdaq?]
291 @@ -1,1 +1,2 @@
291 @@ -1,1 +1,2 @@
292 sub = sub
292 sub = sub
293 +sub2 = sub2
293 +sub2 = sub2
294 record this change to '.hgsub'? [Ynesfdaq?]
294 record this change to '.hgsub'? [Ynesfdaq?]
295 abort: uncommitted changes in subrepository sub2
295 abort: uncommitted changes in subrepository sub2
296 [255]
296 [255]
297 % update substate when modifying .hgsub w/clean updated subrepo
297 % update substate when modifying .hgsub w/clean updated subrepo
298 M .hgsub
298 M .hgsub
299 % qrecord --config ui.interactive=1 -m1 1.diff
299 % qrecord --config ui.interactive=1 -m1 1.diff
300 diff --git a/.hgsub b/.hgsub
300 diff --git a/.hgsub b/.hgsub
301 1 hunks, 1 lines changed
301 1 hunks, 1 lines changed
302 examine changes to '.hgsub'? [Ynesfdaq?]
302 examine changes to '.hgsub'? [Ynesfdaq?]
303 @@ -1,1 +1,2 @@
303 @@ -1,1 +1,2 @@
304 sub = sub
304 sub = sub
305 +sub2 = sub2
305 +sub2 = sub2
306 record this change to '.hgsub'? [Ynesfdaq?]
306 record this change to '.hgsub'? [Ynesfdaq?]
307 path sub
307 path sub
308 source sub
308 source sub
309 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
309 revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
310 path sub2
310 path sub2
311 source sub2
311 source sub2
312 revision 1f94c7611cc6b74f5a17b16121a1170d44776845
312 revision 1f94c7611cc6b74f5a17b16121a1170d44776845
313
313
314 $ hg qpop -qa
314 $ hg qpop -qa
315 patch queue now empty
315 patch queue now empty
316 $ testrm1 qrecord --config ui.interactive=1 -m2 2.diff <<EOF
316 $ testrm1 qrecord --config ui.interactive=1 -m2 2.diff <<EOF
317 > y
317 > y
318 > y
318 > y
319 > EOF
319 > EOF
320 adding a
320 adding a
321 % update substate when removing .hgsub w/dirty subrepo
321 % update substate when removing .hgsub w/dirty subrepo
322 M sub3/a
322 M sub3/a
323 R .hgsub
323 R .hgsub
324 % qrecord --config ui.interactive=1 -m2 2.diff
324 % qrecord --config ui.interactive=1 -m2 2.diff
325 diff --git a/.hgsub b/.hgsub
325 diff --git a/.hgsub b/.hgsub
326 deleted file mode 100644
326 deleted file mode 100644
327 examine changes to '.hgsub'? [Ynesfdaq?]
327 examine changes to '.hgsub'? [Ynesfdaq?]
328 % debugsub should be empty
328 % debugsub should be empty
329
329
330 $ hg qpop -qa
330 $ hg qpop -qa
331 patch queue now empty
331 patch queue now empty
332 $ testrm2 qrecord --config ui.interactive=1 -m3 3.diff <<EOF
332 $ testrm2 qrecord --config ui.interactive=1 -m3 3.diff <<EOF
333 > y
333 > y
334 > y
334 > y
335 > EOF
335 > EOF
336 adding a
336 adding a
337 % update substate when removing .hgsub w/clean updated subrepo
337 % update substate when removing .hgsub w/clean updated subrepo
338 R .hgsub
338 R .hgsub
339 % qrecord --config ui.interactive=1 -m3 3.diff
339 % qrecord --config ui.interactive=1 -m3 3.diff
340 diff --git a/.hgsub b/.hgsub
340 diff --git a/.hgsub b/.hgsub
341 deleted file mode 100644
341 deleted file mode 100644
342 examine changes to '.hgsub'? [Ynesfdaq?]
342 examine changes to '.hgsub'? [Ynesfdaq?]
343 % debugsub should be empty
343 % debugsub should be empty
344
344
345 $ cd ..
345 $ cd ..
346
346
347
347
348 correctly handle subrepos with patch queues
348 correctly handle subrepos with patch queues
349 $ mkrepo repo-subrepo-with-queue
349 $ mkrepo repo-subrepo-with-queue
350 $ mksubrepo sub
350 $ mksubrepo sub
351 adding a
351 adding a
352 $ hg -R sub qnew sub0.diff
352 $ hg -R sub qnew sub0.diff
353 $ echo sub = sub >> .hgsub
353 $ echo sub = sub >> .hgsub
354 $ hg add .hgsub
354 $ hg add .hgsub
355 $ hg qnew 0.diff
355 $ hg qnew 0.diff
356
356
357 $ cd ..
357 $ cd ..
358
358
359 check whether MQ operations can import updated .hgsubstate correctly
359 check whether MQ operations can import updated .hgsubstate correctly
360 both into 'revision' and 'patch file under .hg/patches':
360 both into 'revision' and 'patch file under .hg/patches':
361
361
362 $ hg init importing-hgsubstate
362 $ hg init importing-hgsubstate
363 $ cd importing-hgsubstate
363 $ cd importing-hgsubstate
364
364
365 $ echo a > a
365 $ echo a > a
366 $ hg commit -u test -d '0 0' -Am '#0 in parent'
366 $ hg commit -u test -d '0 0' -Am '#0 in parent'
367 adding a
367 adding a
368 $ hg init sub
368 $ hg init sub
369 $ echo sa > sub/sa
369 $ echo sa > sub/sa
370 $ hg -R sub commit -u test -d '0 0' -Am '#0 in sub'
370 $ hg -R sub commit -u test -d '0 0' -Am '#0 in sub'
371 adding sa
371 adding sa
372 $ echo 'sub = sub' > .hgsub
372 $ echo 'sub = sub' > .hgsub
373 $ touch .hgsubstate
373 $ touch .hgsubstate
374 $ hg add .hgsub .hgsubstate
374 $ hg add .hgsub .hgsubstate
375
375
376 $ hg qnew -u test -d '0 0' import-at-qnew
376 $ hg qnew -u test -d '0 0' import-at-qnew
377 $ hg -R sub parents --template '{node} sub\n'
377 $ hg -R sub parents --template '{node} sub\n'
378 b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
378 b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
379 $ cat .hgsubstate
379 $ cat .hgsubstate
380 b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
380 b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
381 $ hg diff -c tip
381 $ hg diff -c tip
382 diff -r f499373e340c -r b20ffac88564 .hgsub
382 diff -r f499373e340c -r b20ffac88564 .hgsub
383 --- /dev/null
383 --- /dev/null
384 +++ b/.hgsub
384 +++ b/.hgsub
385 @@ -0,0 +1,1 @@
385 @@ -0,0 +1,1 @@
386 +sub = sub
386 +sub = sub
387 diff -r f499373e340c -r b20ffac88564 .hgsubstate
387 diff -r f499373e340c -r b20ffac88564 .hgsubstate
388 --- /dev/null
388 --- /dev/null
389 +++ b/.hgsubstate
389 +++ b/.hgsubstate
390 @@ -0,0 +1,1 @@
390 @@ -0,0 +1,1 @@
391 +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
391 +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
392 $ cat .hg/patches/import-at-qnew
392 $ cat .hg/patches/import-at-qnew
393 # HG changeset patch
393 # HG changeset patch
394 # Parent f499373e340cdca5d01dee904aeb42dd2a325e71
394 # Parent f499373e340cdca5d01dee904aeb42dd2a325e71
395 # User test
395 # User test
396 # Date 0 0
396 # Date 0 0
397
397
398 diff -r f499373e340c -r b20ffac88564 .hgsub
398 diff -r f499373e340c -r b20ffac88564 .hgsub
399 --- /dev/null
399 --- /dev/null
400 +++ b/.hgsub
400 +++ b/.hgsub
401 @@ -0,0 +1,1 @@
401 @@ -0,0 +1,1 @@
402 +sub = sub
402 +sub = sub
403 diff -r f499373e340c -r b20ffac88564 .hgsubstate
403 diff -r f499373e340c -r b20ffac88564 .hgsubstate
404 --- /dev/null
404 --- /dev/null
405 +++ b/.hgsubstate
405 +++ b/.hgsubstate
406 @@ -0,0 +1,1 @@
406 @@ -0,0 +1,1 @@
407 +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
407 +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
408 $ hg qpop
408 $ hg qpop
409 popping import-at-qnew
409 popping import-at-qnew
410 patch queue now empty
410 patch queue now empty
411 $ hg qpush
411 $ hg qpush
412 applying import-at-qnew
412 applying import-at-qnew
413 now at: import-at-qnew
413 now at: import-at-qnew
414
414
415 $ hg qnew import-at-qrefresh
415 $ hg qnew import-at-qrefresh
416 $ echo sb > sub/sb
416 $ echo sb > sub/sb
417 $ hg -R sub commit -u test -d '0 0' -Am '#1 in sub'
417 $ hg -R sub commit -u test -d '0 0' -Am '#1 in sub'
418 adding sb
418 adding sb
419 $ hg qrefresh -u test -d '0 0'
419 $ hg qrefresh -u test -d '0 0'
420 $ hg -R sub parents --template '{node} sub\n'
420 $ hg -R sub parents --template '{node} sub\n'
421 88ac1bef5ed43b689d1d200b59886b675dec474b sub
421 88ac1bef5ed43b689d1d200b59886b675dec474b sub
422 $ cat .hgsubstate
422 $ cat .hgsubstate
423 88ac1bef5ed43b689d1d200b59886b675dec474b sub
423 88ac1bef5ed43b689d1d200b59886b675dec474b sub
424 $ hg diff -c tip
424 $ hg diff -c tip
425 diff -r 44f846335325 -r b3e8c5fa3aaa .hgsubstate
425 diff -r 44f846335325 -r b3e8c5fa3aaa .hgsubstate
426 --- a/.hgsubstate
426 --- a/.hgsubstate
427 +++ b/.hgsubstate
427 +++ b/.hgsubstate
428 @@ -1,1 +1,1 @@
428 @@ -1,1 +1,1 @@
429 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
429 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
430 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
430 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
431 $ cat .hg/patches/import-at-qrefresh
431 $ cat .hg/patches/import-at-qrefresh
432 # HG changeset patch
432 # HG changeset patch
433 # Date 0 0
433 # Date 0 0
434 # User test
434 # User test
435 # Parent 44f846335325209be6be35dc2c9a4be107278c09
435 # Parent 44f846335325209be6be35dc2c9a4be107278c09
436
436
437 diff -r 44f846335325 .hgsubstate
437 diff -r 44f846335325 .hgsubstate
438 --- a/.hgsubstate
438 --- a/.hgsubstate
439 +++ b/.hgsubstate
439 +++ b/.hgsubstate
440 @@ -1,1 +1,1 @@
440 @@ -1,1 +1,1 @@
441 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
441 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
442 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
442 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
443
443
444 $ hg qrefresh -u test -d '0 0'
444 $ hg qrefresh -u test -d '0 0'
445 $ cat .hgsubstate
445 $ cat .hgsubstate
446 88ac1bef5ed43b689d1d200b59886b675dec474b sub
446 88ac1bef5ed43b689d1d200b59886b675dec474b sub
447 $ hg diff -c tip
447 $ hg diff -c tip
448 diff -r 44f846335325 -r b3e8c5fa3aaa .hgsubstate
448 diff -r 44f846335325 -r b3e8c5fa3aaa .hgsubstate
449 --- a/.hgsubstate
449 --- a/.hgsubstate
450 +++ b/.hgsubstate
450 +++ b/.hgsubstate
451 @@ -1,1 +1,1 @@
451 @@ -1,1 +1,1 @@
452 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
452 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
453 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
453 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
454 $ cat .hg/patches/import-at-qrefresh
454 $ cat .hg/patches/import-at-qrefresh
455 # HG changeset patch
455 # HG changeset patch
456 # Date 0 0
456 # Date 0 0
457 # User test
457 # User test
458 # Parent 44f846335325209be6be35dc2c9a4be107278c09
458 # Parent 44f846335325209be6be35dc2c9a4be107278c09
459
459
460 diff -r 44f846335325 .hgsubstate
460 diff -r 44f846335325 .hgsubstate
461 --- a/.hgsubstate
461 --- a/.hgsubstate
462 +++ b/.hgsubstate
462 +++ b/.hgsubstate
463 @@ -1,1 +1,1 @@
463 @@ -1,1 +1,1 @@
464 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
464 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
465 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
465 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
466
466
467 $ hg update -C tip
467 $ hg update -C tip
468 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
469 $ hg qpop -a
469 $ hg qpop -a
470 popping import-at-qrefresh
470 popping import-at-qrefresh
471 popping import-at-qnew
471 popping import-at-qnew
472 patch queue now empty
472 patch queue now empty
473
473
474 $ hg -R sub update -C 0
474 $ hg -R sub update -C 0
475 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
475 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
476 $ echo 'sub = sub' > .hgsub
476 $ echo 'sub = sub' > .hgsub
477 $ hg commit -Am '#1 in parent'
477 $ hg commit -Am '#1 in parent'
478 adding .hgsub
478 adding .hgsub
479 $ hg -R sub update -C 1
479 $ hg -R sub update -C 1
480 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
480 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
481 $ hg commit -Am '#2 in parent (but be rollbacked soon)'
481 $ hg commit -Am '#2 in parent (but will be rolled-back soon)'
482 $ hg rollback
482 $ hg rollback
483 repository tip rolled back to revision 1 (undo commit)
483 repository tip rolled back to revision 1 (undo commit)
484 working directory now based on revision 1
484 working directory now based on revision 1
485 $ hg status
485 $ hg status
486 M .hgsubstate
486 M .hgsubstate
487 $ hg qnew -u test -d '0 0' checkstate-at-qnew
487 $ hg qnew -u test -d '0 0' checkstate-at-qnew
488 $ hg -R sub parents --template '{node} sub\n'
488 $ hg -R sub parents --template '{node} sub\n'
489 88ac1bef5ed43b689d1d200b59886b675dec474b sub
489 88ac1bef5ed43b689d1d200b59886b675dec474b sub
490 $ cat .hgsubstate
490 $ cat .hgsubstate
491 88ac1bef5ed43b689d1d200b59886b675dec474b sub
491 88ac1bef5ed43b689d1d200b59886b675dec474b sub
492 $ hg diff -c tip
492 $ hg diff -c tip
493 diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
493 diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
494 --- a/.hgsubstate
494 --- a/.hgsubstate
495 +++ b/.hgsubstate
495 +++ b/.hgsubstate
496 @@ -1,1 +1,1 @@
496 @@ -1,1 +1,1 @@
497 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
497 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
498 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
498 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
499 $ cat .hg/patches/checkstate-at-qnew
499 $ cat .hg/patches/checkstate-at-qnew
500 # HG changeset patch
500 # HG changeset patch
501 # Parent 4d91eb2fa1d1b22ec513347b9cd06f6b49d470fa
501 # Parent 4d91eb2fa1d1b22ec513347b9cd06f6b49d470fa
502 # User test
502 # User test
503 # Date 0 0
503 # Date 0 0
504
504
505 diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
505 diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
506 --- a/.hgsubstate
506 --- a/.hgsubstate
507 +++ b/.hgsubstate
507 +++ b/.hgsubstate
508 @@ -1,1 +1,1 @@
508 @@ -1,1 +1,1 @@
509 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
509 -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
510 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
510 +88ac1bef5ed43b689d1d200b59886b675dec474b sub
511
511
512 $ cd ..
512 $ cd ..
513
513
514 $ cd ..
514 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now