Show More
@@ -1,347 +1,350 | |||
|
1 | 1 | $ echo "[extensions]" >> $HGRCPATH |
|
2 | 2 | $ echo "mq=" >> $HGRCPATH |
|
3 | 3 | $ echo "record=" >> $HGRCPATH |
|
4 | 4 | $ echo "[diff]" >> $HGRCPATH |
|
5 | 5 | $ echo "nodates=1" >> $HGRCPATH |
|
6 | 6 | |
|
7 | 7 | $ stdin=`pwd`/stdin.tmp |
|
8 | 8 | |
|
9 | 9 | fn to create new repository w/dirty subrepo, and cd into it |
|
10 | 10 | $ mkrepo() { |
|
11 | 11 | > hg init $1 |
|
12 | 12 | > cd $1 |
|
13 | 13 | > hg qinit |
|
14 | 14 | > } |
|
15 | 15 | |
|
16 | 16 | fn to create dirty subrepo |
|
17 | 17 | $ mksubrepo() { |
|
18 | 18 | > hg init $1 |
|
19 | 19 | > cd $1 |
|
20 | 20 | > echo a > a |
|
21 | 21 | > hg add |
|
22 | 22 | > cd .. |
|
23 | 23 | > } |
|
24 | 24 | |
|
25 | 25 | $ testadd() { |
|
26 | 26 | > cat - > "$stdin" |
|
27 | 27 | > mksubrepo sub |
|
28 | 28 | > echo sub = sub >> .hgsub |
|
29 | 29 | > hg add .hgsub |
|
30 | 30 | > echo % abort when adding .hgsub w/dirty subrepo |
|
31 | 31 | > hg status -S |
|
32 | 32 | > echo '%' $* |
|
33 | 33 | > cat "$stdin" | hg $* |
|
34 | 34 | > echo [$?] |
|
35 | 35 | > hg -R sub ci -m0sub |
|
36 | 36 | > echo % update substate when adding .hgsub w/clean updated subrepo |
|
37 | 37 | > hg status -S |
|
38 | 38 | > echo '%' $* |
|
39 | 39 | > cat "$stdin" | hg $* |
|
40 | 40 | > hg debugsub |
|
41 | 41 | > } |
|
42 | 42 | |
|
43 | 43 | $ testmod() { |
|
44 | 44 | > cat - > "$stdin" |
|
45 | 45 | > mksubrepo sub2 |
|
46 | 46 | > echo sub2 = sub2 >> .hgsub |
|
47 | 47 | > echo % abort when modifying .hgsub w/dirty subrepo |
|
48 | 48 | > hg status -S |
|
49 | 49 | > echo '%' $* |
|
50 | 50 | > cat "$stdin" | hg $* |
|
51 | 51 | > echo [$?] |
|
52 | 52 | > hg -R sub2 ci -m0sub2 |
|
53 | 53 | > echo % update substate when modifying .hgsub w/clean updated subrepo |
|
54 | 54 | > hg status -S |
|
55 | 55 | > echo '%' $* |
|
56 | 56 | > cat "$stdin" | hg $* |
|
57 | 57 | > hg debugsub |
|
58 | 58 | > } |
|
59 | 59 | |
|
60 | 60 | $ testrm1() { |
|
61 | 61 | > cat - > "$stdin" |
|
62 | 62 | > mksubrepo sub3 |
|
63 | 63 | > echo sub3 = sub3 >> .hgsub |
|
64 | 64 | > hg ci -Aqmsub3 |
|
65 | 65 | > $EXTRA |
|
66 | 66 | > echo b >> sub3/a |
|
67 | 67 | > hg rm .hgsub |
|
68 | 68 | > echo % update substate when removing .hgsub w/dirty subrepo |
|
69 | 69 | > hg status -S |
|
70 | 70 | > echo '%' $* |
|
71 | 71 | > cat "$stdin" | hg $* |
|
72 | 72 | > echo % debugsub should be empty |
|
73 | 73 | > hg debugsub |
|
74 | 74 | > } |
|
75 | 75 | |
|
76 | 76 | $ testrm2() { |
|
77 | 77 | > cat - > "$stdin" |
|
78 | 78 | > mksubrepo sub4 |
|
79 | 79 | > echo sub4 = sub4 >> .hgsub |
|
80 | 80 | > hg ci -Aqmsub4 |
|
81 | 81 | > $EXTRA |
|
82 | 82 | > hg rm .hgsub |
|
83 | 83 | > echo % update substate when removing .hgsub w/clean updated subrepo |
|
84 | 84 | > hg status -S |
|
85 | 85 | > echo '%' $* |
|
86 | 86 | > cat "$stdin" | hg $* |
|
87 | 87 | > echo % debugsub should be empty |
|
88 | 88 | > hg debugsub |
|
89 | 89 | > } |
|
90 | 90 | |
|
91 | 91 | |
|
92 | 92 | handle subrepos safely on qnew |
|
93 | 93 | |
|
94 | 94 | $ mkrepo repo-2499-qnew |
|
95 | 95 | $ testadd qnew -m0 0.diff |
|
96 | 96 | adding a |
|
97 | 97 | % abort when adding .hgsub w/dirty subrepo |
|
98 | 98 | A .hgsub |
|
99 | 99 | A sub/a |
|
100 | 100 | % qnew -m0 0.diff |
|
101 | 101 | abort: uncommitted changes in subrepository sub |
|
102 | 102 | [255] |
|
103 | 103 | % update substate when adding .hgsub w/clean updated subrepo |
|
104 | 104 | A .hgsub |
|
105 | 105 | % qnew -m0 0.diff |
|
106 | 106 | committing subrepository sub |
|
107 | 107 | path sub |
|
108 | 108 | source sub |
|
109 | 109 | revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
|
110 | 110 | |
|
111 | 111 | $ testmod qnew -m1 1.diff |
|
112 | 112 | adding a |
|
113 | 113 | % abort when modifying .hgsub w/dirty subrepo |
|
114 | 114 | M .hgsub |
|
115 | 115 | A sub2/a |
|
116 | 116 | % qnew -m1 1.diff |
|
117 | 117 | abort: uncommitted changes in subrepository sub2 |
|
118 | 118 | [255] |
|
119 | 119 | % update substate when modifying .hgsub w/clean updated subrepo |
|
120 | 120 | M .hgsub |
|
121 | 121 | % qnew -m1 1.diff |
|
122 | 122 | committing subrepository sub2 |
|
123 | 123 | path sub |
|
124 | 124 | source sub |
|
125 | 125 | revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
|
126 | 126 | path sub2 |
|
127 | 127 | source sub2 |
|
128 | 128 | revision 1f94c7611cc6b74f5a17b16121a1170d44776845 |
|
129 | 129 | |
|
130 | 130 | $ hg qpop -qa |
|
131 | 131 | patch queue now empty |
|
132 | 132 | $ testrm1 qnew -m2 2.diff |
|
133 | 133 | adding a |
|
134 | 134 | % update substate when removing .hgsub w/dirty subrepo |
|
135 | 135 | M sub3/a |
|
136 | 136 | R .hgsub |
|
137 | 137 | % qnew -m2 2.diff |
|
138 | 138 | % debugsub should be empty |
|
139 | 139 | |
|
140 | 140 | $ hg qpop -qa |
|
141 | 141 | patch queue now empty |
|
142 | 142 | $ testrm2 qnew -m3 3.diff |
|
143 | 143 | adding a |
|
144 | 144 | % update substate when removing .hgsub w/clean updated subrepo |
|
145 | 145 | R .hgsub |
|
146 | 146 | % qnew -m3 3.diff |
|
147 | 147 | % debugsub should be empty |
|
148 | 148 | |
|
149 | 149 | $ cd .. |
|
150 | 150 | |
|
151 | 151 | |
|
152 | 152 | handle subrepos safely on qrefresh |
|
153 | 153 | |
|
154 | 154 | $ mkrepo repo-2499-qrefresh |
|
155 | 155 | $ hg qnew -m0 0.diff |
|
156 | 156 | $ testadd qrefresh |
|
157 | 157 | adding a |
|
158 | 158 | % abort when adding .hgsub w/dirty subrepo |
|
159 | 159 | A .hgsub |
|
160 | 160 | A sub/a |
|
161 | 161 | % qrefresh |
|
162 | 162 | abort: uncommitted changes in subrepository sub |
|
163 | 163 | [255] |
|
164 | 164 | % update substate when adding .hgsub w/clean updated subrepo |
|
165 | 165 | A .hgsub |
|
166 | 166 | % qrefresh |
|
167 | 167 | committing subrepository sub |
|
168 | 168 | path sub |
|
169 | 169 | source sub |
|
170 | 170 | revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
|
171 | 171 | |
|
172 | 172 | $ hg qnew -m1 1.diff |
|
173 | 173 | $ testmod qrefresh |
|
174 | 174 | adding a |
|
175 | 175 | % abort when modifying .hgsub w/dirty subrepo |
|
176 | 176 | M .hgsub |
|
177 | 177 | A sub2/a |
|
178 | 178 | % qrefresh |
|
179 | 179 | abort: uncommitted changes in subrepository sub2 |
|
180 | 180 | [255] |
|
181 | 181 | % update substate when modifying .hgsub w/clean updated subrepo |
|
182 | 182 | M .hgsub |
|
183 | 183 | % qrefresh |
|
184 | 184 | committing subrepository sub2 |
|
185 | 185 | path sub |
|
186 | 186 | source sub |
|
187 | 187 | revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
|
188 | 188 | path sub2 |
|
189 | 189 | source sub2 |
|
190 | 190 | revision 1f94c7611cc6b74f5a17b16121a1170d44776845 |
|
191 | 191 | |
|
192 | 192 | $ hg qpop -qa |
|
193 | 193 | patch queue now empty |
|
194 |
$ EXTRA='hg qnew -m2 2.diff' |
|
|
194 | $ EXTRA='hg qnew -m2 2.diff' | |
|
195 | $ testrm1 qrefresh | |
|
195 | 196 | adding a |
|
196 | 197 | % update substate when removing .hgsub w/dirty subrepo |
|
197 | 198 | M sub3/a |
|
198 | 199 | R .hgsub |
|
199 | 200 | % qrefresh |
|
200 | 201 | % debugsub should be empty |
|
201 | 202 | |
|
202 | 203 | $ hg qpop -qa |
|
203 | 204 | patch queue now empty |
|
204 |
$ EXTRA='hg qnew -m3 3.diff' |
|
|
205 | $ EXTRA='hg qnew -m3 3.diff' | |
|
206 | $ testrm2 qrefresh | |
|
205 | 207 | adding a |
|
206 | 208 | % update substate when removing .hgsub w/clean updated subrepo |
|
207 | 209 | R .hgsub |
|
208 | 210 | % qrefresh |
|
209 | 211 | % debugsub should be empty |
|
212 | $ EXTRA= | |
|
210 | 213 | |
|
211 | 214 | $ cd .. |
|
212 | 215 | |
|
213 | 216 | |
|
214 | 217 | handle subrepos safely on qpush/qpop |
|
215 | 218 | |
|
216 | 219 | $ mkrepo repo-2499-qpush |
|
217 | 220 | $ mksubrepo sub |
|
218 | 221 | adding a |
|
219 | 222 | $ hg -R sub ci -m0sub |
|
220 | 223 | $ echo sub = sub > .hgsub |
|
221 | 224 | $ hg add .hgsub |
|
222 | 225 | $ hg qnew -m0 0.diff |
|
223 | 226 | committing subrepository sub |
|
224 | 227 | $ hg debugsub |
|
225 | 228 | path sub |
|
226 | 229 | source sub |
|
227 | 230 | revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
|
228 | 231 | |
|
229 | 232 | qpop |
|
230 | 233 | $ hg qpop |
|
231 | 234 | popping 0.diff |
|
232 | 235 | patch queue now empty |
|
233 | 236 | $ hg status -AS |
|
234 | 237 | $ hg debugsub |
|
235 | 238 | |
|
236 | 239 | qpush |
|
237 | 240 | $ hg qpush |
|
238 | 241 | applying 0.diff |
|
239 | 242 | now at: 0.diff |
|
240 | 243 | $ hg status -AS |
|
241 | 244 | C .hgsub |
|
242 | 245 | C .hgsubstate |
|
243 | 246 | C sub/a |
|
244 | 247 | $ hg debugsub |
|
245 | 248 | path sub |
|
246 | 249 | source sub |
|
247 | 250 | revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
|
248 | 251 | |
|
249 | 252 | $ cd .. |
|
250 | 253 | |
|
251 | 254 | |
|
252 | 255 | handle subrepos safely on qrecord |
|
253 | 256 | |
|
254 | 257 | $ mkrepo repo-2499-qrecord |
|
255 | 258 | $ testadd qrecord --config ui.interactive=1 -m0 0.diff <<EOF |
|
256 | 259 | > y |
|
257 | 260 | > y |
|
258 | 261 | > EOF |
|
259 | 262 | adding a |
|
260 | 263 | % abort when adding .hgsub w/dirty subrepo |
|
261 | 264 | A .hgsub |
|
262 | 265 | A sub/a |
|
263 | 266 | % qrecord --config ui.interactive=1 -m0 0.diff |
|
264 | 267 | diff --git a/.hgsub b/.hgsub |
|
265 | 268 | new file mode 100644 |
|
266 | 269 | examine changes to '.hgsub'? [Ynsfdaq?] |
|
267 | 270 | abort: uncommitted changes in subrepository sub |
|
268 | 271 | [255] |
|
269 | 272 | % update substate when adding .hgsub w/clean updated subrepo |
|
270 | 273 | A .hgsub |
|
271 | 274 | % qrecord --config ui.interactive=1 -m0 0.diff |
|
272 | 275 | diff --git a/.hgsub b/.hgsub |
|
273 | 276 | new file mode 100644 |
|
274 | 277 | examine changes to '.hgsub'? [Ynsfdaq?] |
|
275 | 278 | committing subrepository sub |
|
276 | 279 | path sub |
|
277 | 280 | source sub |
|
278 | 281 | revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
|
279 | 282 | |
|
280 | 283 | $ testmod qrecord --config ui.interactive=1 -m1 1.diff <<EOF |
|
281 | 284 | > y |
|
282 | 285 | > y |
|
283 | 286 | > EOF |
|
284 | 287 | adding a |
|
285 | 288 | % abort when modifying .hgsub w/dirty subrepo |
|
286 | 289 | M .hgsub |
|
287 | 290 | A sub2/a |
|
288 | 291 | % qrecord --config ui.interactive=1 -m1 1.diff |
|
289 | 292 | diff --git a/.hgsub b/.hgsub |
|
290 | 293 | 1 hunks, 1 lines changed |
|
291 | 294 | examine changes to '.hgsub'? [Ynsfdaq?] |
|
292 | 295 | @@ -1,1 +1,2 @@ |
|
293 | 296 | sub = sub |
|
294 | 297 | +sub2 = sub2 |
|
295 | 298 | record this change to '.hgsub'? [Ynsfdaq?] |
|
296 | 299 | abort: uncommitted changes in subrepository sub2 |
|
297 | 300 | [255] |
|
298 | 301 | % update substate when modifying .hgsub w/clean updated subrepo |
|
299 | 302 | M .hgsub |
|
300 | 303 | % qrecord --config ui.interactive=1 -m1 1.diff |
|
301 | 304 | diff --git a/.hgsub b/.hgsub |
|
302 | 305 | 1 hunks, 1 lines changed |
|
303 | 306 | examine changes to '.hgsub'? [Ynsfdaq?] |
|
304 | 307 | @@ -1,1 +1,2 @@ |
|
305 | 308 | sub = sub |
|
306 | 309 | +sub2 = sub2 |
|
307 | 310 | record this change to '.hgsub'? [Ynsfdaq?] |
|
308 | 311 | committing subrepository sub2 |
|
309 | 312 | path sub |
|
310 | 313 | source sub |
|
311 | 314 | revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
|
312 | 315 | path sub2 |
|
313 | 316 | source sub2 |
|
314 | 317 | revision 1f94c7611cc6b74f5a17b16121a1170d44776845 |
|
315 | 318 | |
|
316 | 319 | $ hg qpop -qa |
|
317 | 320 | patch queue now empty |
|
318 |
$ |
|
|
321 | $ testrm1 qrecord --config ui.interactive=1 -m2 2.diff <<EOF | |
|
319 | 322 | > y |
|
320 | 323 | > y |
|
321 | 324 | > EOF |
|
322 | 325 | adding a |
|
323 | 326 | % update substate when removing .hgsub w/dirty subrepo |
|
324 | 327 | M sub3/a |
|
325 | 328 | R .hgsub |
|
326 | 329 | % qrecord --config ui.interactive=1 -m2 2.diff |
|
327 | 330 | diff --git a/.hgsub b/.hgsub |
|
328 | 331 | deleted file mode 100644 |
|
329 | 332 | examine changes to '.hgsub'? [Ynsfdaq?] |
|
330 | 333 | % debugsub should be empty |
|
331 | 334 | |
|
332 | 335 | $ hg qpop -qa |
|
333 | 336 | patch queue now empty |
|
334 |
$ |
|
|
337 | $ testrm2 qrecord --config ui.interactive=1 -m3 3.diff <<EOF | |
|
335 | 338 | > y |
|
336 | 339 | > y |
|
337 | 340 | > EOF |
|
338 | 341 | adding a |
|
339 | 342 | % update substate when removing .hgsub w/clean updated subrepo |
|
340 | 343 | R .hgsub |
|
341 | 344 | % qrecord --config ui.interactive=1 -m3 3.diff |
|
342 | 345 | diff --git a/.hgsub b/.hgsub |
|
343 | 346 | deleted file mode 100644 |
|
344 | 347 | examine changes to '.hgsub'? [Ynsfdaq?] |
|
345 | 348 | % debugsub should be empty |
|
346 | 349 | |
|
347 | 350 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now