| 1 |
$ cat <<EOF >> $HGRCPATH |
| 2 |
> [ui] |
| 3 |
> commitsubrepos = Yes |
| 4 |
> [extensions] |
| 5 |
> mq = |
| 6 |
> record = |
| 7 |
> [diff] |
| 8 |
> nodates = 1 |
| 9 |
> EOF |
| 10 |
|
| 11 |
$ stdin=`pwd`/stdin.tmp |
| 12 |
|
| 13 |
fn to create new repository w/dirty subrepo, and cd into it |
| 14 |
$ mkrepo() { |
| 15 |
> hg init $1 |
| 16 |
> cd $1 |
| 17 |
> hg qinit |
| 18 |
> } |
| 19 |
|
| 20 |
fn to create dirty subrepo |
| 21 |
$ mksubrepo() { |
| 22 |
> hg init $1 |
| 23 |
> cd $1 |
| 24 |
> echo a > a |
| 25 |
> hg add |
| 26 |
> cd .. |
| 27 |
> } |
| 28 |
|
| 29 |
$ testadd() { |
| 30 |
> cat - > "$stdin" |
| 31 |
> mksubrepo sub |
| 32 |
> echo sub = sub >> .hgsub |
| 33 |
> hg add .hgsub |
| 34 |
> echo % abort when adding .hgsub w/dirty subrepo |
| 35 |
> hg status -S |
| 36 |
> echo '%' $* |
| 37 |
> cat "$stdin" | hg $* |
| 38 |
> echo [$?] |
| 39 |
> hg -R sub ci -m0sub |
| 40 |
> echo % update substate when adding .hgsub w/clean updated subrepo |
| 41 |
> hg status -S |
| 42 |
> echo '%' $* |
| 43 |
> cat "$stdin" | hg $* |
| 44 |
> hg debugsub |
| 45 |
> } |
| 46 |
|
| 47 |
$ testmod() { |
| 48 |
> cat - > "$stdin" |
| 49 |
> mksubrepo sub2 |
| 50 |
> echo sub2 = sub2 >> .hgsub |
| 51 |
> echo % abort when modifying .hgsub w/dirty subrepo |
| 52 |
> hg status -S |
| 53 |
> echo '%' $* |
| 54 |
> cat "$stdin" | hg $* |
| 55 |
> echo [$?] |
| 56 |
> hg -R sub2 ci -m0sub2 |
| 57 |
> echo % update substate when modifying .hgsub w/clean updated subrepo |
| 58 |
> hg status -S |
| 59 |
> echo '%' $* |
| 60 |
> cat "$stdin" | hg $* |
| 61 |
> hg debugsub |
| 62 |
> } |
| 63 |
|
| 64 |
$ testrm1() { |
| 65 |
> cat - > "$stdin" |
| 66 |
> mksubrepo sub3 |
| 67 |
> echo sub3 = sub3 >> .hgsub |
| 68 |
> hg ci -Aqmsub3 |
| 69 |
> $EXTRA |
| 70 |
> echo b >> sub3/a |
| 71 |
> hg rm .hgsub |
| 72 |
> echo % update substate when removing .hgsub w/dirty subrepo |
| 73 |
> hg status -S |
| 74 |
> echo '%' $* |
| 75 |
> cat "$stdin" | hg $* |
| 76 |
> echo % debugsub should be empty |
| 77 |
> hg debugsub |
| 78 |
> } |
| 79 |
|
| 80 |
$ testrm2() { |
| 81 |
> cat - > "$stdin" |
| 82 |
> mksubrepo sub4 |
| 83 |
> echo sub4 = sub4 >> .hgsub |
| 84 |
> hg ci -Aqmsub4 |
| 85 |
> $EXTRA |
| 86 |
> hg rm .hgsub |
| 87 |
> echo % update substate when removing .hgsub w/clean updated subrepo |
| 88 |
> hg status -S |
| 89 |
> echo '%' $* |
| 90 |
> cat "$stdin" | hg $* |
| 91 |
> echo % debugsub should be empty |
| 92 |
> hg debugsub |
| 93 |
> } |
| 94 |
|
| 95 |
|
| 96 |
handle subrepos safely on qnew |
| 97 |
|
| 98 |
$ mkrepo repo-2499-qnew |
| 99 |
$ testadd qnew -X path:no-effect -m0 0.diff |
| 100 |
adding a |
| 101 |
% abort when adding .hgsub w/dirty subrepo |
| 102 |
A .hgsub |
| 103 |
A sub/a |
| 104 |
% qnew -X path:no-effect -m0 0.diff |
| 105 |
abort: uncommitted changes in subrepository "sub" |
| 106 |
[255] |
| 107 |
% update substate when adding .hgsub w/clean updated subrepo |
| 108 |
A .hgsub |
| 109 |
A sub/a |
| 110 |
% qnew -X path:no-effect -m0 0.diff |
| 111 |
path sub |
| 112 |
source sub |
| 113 |
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
| 114 |
|
| 115 |
$ testmod qnew --cwd .. -R repo-2499-qnew -X path:no-effect -m1 1.diff |
| 116 |
adding a |
| 117 |
% abort when modifying .hgsub w/dirty subrepo |
| 118 |
M .hgsub |
| 119 |
A sub2/a |
| 120 |
% qnew --cwd .. -R repo-2499-qnew -X path:no-effect -m1 1.diff |
| 121 |
abort: uncommitted changes in subrepository "sub2" |
| 122 |
[255] |
| 123 |
% update substate when modifying .hgsub w/clean updated subrepo |
| 124 |
M .hgsub |
| 125 |
A sub2/a |
| 126 |
% qnew --cwd .. -R repo-2499-qnew -X path:no-effect -m1 1.diff |
| 127 |
path sub |
| 128 |
source sub |
| 129 |
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
| 130 |
path sub2 |
| 131 |
source sub2 |
| 132 |
revision 1f94c7611cc6b74f5a17b16121a1170d44776845 |
| 133 |
|
| 134 |
$ hg qpop -qa |
| 135 |
patch queue now empty |
| 136 |
$ testrm1 qnew -m2 2.diff |
| 137 |
adding a |
| 138 |
% update substate when removing .hgsub w/dirty subrepo |
| 139 |
M sub3/a |
| 140 |
R .hgsub |
| 141 |
% qnew -m2 2.diff |
| 142 |
% debugsub should be empty |
| 143 |
|
| 144 |
$ hg qpop -qa |
| 145 |
patch queue now empty |
| 146 |
$ testrm2 qnew -m3 3.diff |
| 147 |
adding a |
| 148 |
% update substate when removing .hgsub w/clean updated subrepo |
| 149 |
R .hgsub |
| 150 |
% qnew -m3 3.diff |
| 151 |
% debugsub should be empty |
| 152 |
|
| 153 |
$ cd .. |
| 154 |
|
| 155 |
|
| 156 |
handle subrepos safely on qrefresh |
| 157 |
|
| 158 |
$ mkrepo repo-2499-qrefresh |
| 159 |
$ hg qnew -m0 0.diff |
| 160 |
$ testadd qrefresh |
| 161 |
adding a |
| 162 |
% abort when adding .hgsub w/dirty subrepo |
| 163 |
A .hgsub |
| 164 |
A sub/a |
| 165 |
% qrefresh |
| 166 |
abort: uncommitted changes in subrepository "sub" |
| 167 |
[255] |
| 168 |
% update substate when adding .hgsub w/clean updated subrepo |
| 169 |
A .hgsub |
| 170 |
A sub/a |
| 171 |
% qrefresh |
| 172 |
path sub |
| 173 |
source sub |
| 174 |
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
| 175 |
|
| 176 |
$ hg qnew -m1 1.diff |
| 177 |
$ testmod qrefresh |
| 178 |
adding a |
| 179 |
% abort when modifying .hgsub w/dirty subrepo |
| 180 |
M .hgsub |
| 181 |
A sub2/a |
| 182 |
% qrefresh |
| 183 |
abort: uncommitted changes in subrepository "sub2" |
| 184 |
[255] |
| 185 |
% update substate when modifying .hgsub w/clean updated subrepo |
| 186 |
M .hgsub |
| 187 |
A sub2/a |
| 188 |
% qrefresh |
| 189 |
path sub |
| 190 |
source sub |
| 191 |
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
| 192 |
path sub2 |
| 193 |
source sub2 |
| 194 |
revision 1f94c7611cc6b74f5a17b16121a1170d44776845 |
| 195 |
|
| 196 |
$ hg qpop -qa |
| 197 |
patch queue now empty |
| 198 |
$ EXTRA='hg qnew -m2 2.diff' |
| 199 |
$ testrm1 qrefresh |
| 200 |
adding a |
| 201 |
% update substate when removing .hgsub w/dirty subrepo |
| 202 |
M sub3/a |
| 203 |
R .hgsub |
| 204 |
% qrefresh |
| 205 |
% debugsub should be empty |
| 206 |
|
| 207 |
$ hg qpop -qa |
| 208 |
patch queue now empty |
| 209 |
$ EXTRA='hg qnew -m3 3.diff' |
| 210 |
$ testrm2 qrefresh |
| 211 |
adding a |
| 212 |
% update substate when removing .hgsub w/clean updated subrepo |
| 213 |
R .hgsub |
| 214 |
% qrefresh |
| 215 |
% debugsub should be empty |
| 216 |
$ EXTRA= |
| 217 |
|
| 218 |
$ cd .. |
| 219 |
|
| 220 |
|
| 221 |
handle subrepos safely on qpush/qpop |
| 222 |
(and we cannot qpop / qpush with a modified subrepo) |
| 223 |
|
| 224 |
$ mkrepo repo-2499-qpush |
| 225 |
$ mksubrepo sub |
| 226 |
adding a |
| 227 |
$ hg -R sub ci -m0sub |
| 228 |
$ echo sub = sub > .hgsub |
| 229 |
$ hg add .hgsub |
| 230 |
$ hg commit -m0 |
| 231 |
$ hg debugsub |
| 232 |
path sub |
| 233 |
source sub |
| 234 |
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
| 235 |
$ echo foo > ./sub/a |
| 236 |
$ hg -R sub commit -m foo |
| 237 |
$ hg commit -m1 |
| 238 |
$ hg qimport -r "0:tip" |
| 239 |
$ hg -R sub id --id |
| 240 |
aa037b301eba |
| 241 |
|
| 242 |
qpop |
| 243 |
$ hg -R sub update 0000 |
| 244 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 245 |
$ hg qpop |
| 246 |
abort: local changed subrepos found, qrefresh first |
| 247 |
[255] |
| 248 |
$ hg revert sub |
| 249 |
reverting subrepo sub |
| 250 |
adding sub/a |
| 251 |
$ hg qpop |
| 252 |
popping 1 |
| 253 |
now at: 0 |
| 254 |
$ hg status -AS |
| 255 |
C .hgsub |
| 256 |
C .hgsubstate |
| 257 |
C sub/a |
| 258 |
$ hg -R sub id --id |
| 259 |
b2fdb12cd82b |
| 260 |
|
| 261 |
qpush |
| 262 |
$ hg -R sub update 0000 |
| 263 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 264 |
$ hg qpush |
| 265 |
abort: local changed subrepos found, qrefresh first |
| 266 |
[255] |
| 267 |
$ hg revert sub |
| 268 |
reverting subrepo sub |
| 269 |
adding sub/a |
| 270 |
$ hg qpush |
| 271 |
applying 1 |
| 272 |
subrepository sub diverged (local revision: b2fdb12cd82b, remote revision: aa037b301eba) |
| 273 |
you can (m)erge, keep (l)ocal or keep (r)emote. |
| 274 |
what do you want to do? m |
| 275 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 276 |
now at: 1 |
| 277 |
$ hg status -AS |
| 278 |
C .hgsub |
| 279 |
C .hgsubstate |
| 280 |
C sub/a |
| 281 |
$ hg -R sub id --id |
| 282 |
aa037b301eba |
| 283 |
|
| 284 |
$ cd .. |
| 285 |
|
| 286 |
|
| 287 |
handle subrepos safely on qrecord |
| 288 |
|
| 289 |
$ mkrepo repo-2499-qrecord |
| 290 |
$ testadd qrecord --config ui.interactive=1 -m0 0.diff <<EOF |
| 291 |
> y |
| 292 |
> y |
| 293 |
> EOF |
| 294 |
adding a |
| 295 |
% abort when adding .hgsub w/dirty subrepo |
| 296 |
A .hgsub |
| 297 |
A sub/a |
| 298 |
% qrecord --config ui.interactive=1 -m0 0.diff |
| 299 |
abort: uncommitted changes in subrepository "sub" |
| 300 |
[255] |
| 301 |
% update substate when adding .hgsub w/clean updated subrepo |
| 302 |
A .hgsub |
| 303 |
A sub/a |
| 304 |
% qrecord --config ui.interactive=1 -m0 0.diff |
| 305 |
diff --git a/.hgsub b/.hgsub |
| 306 |
new file mode 100644 |
| 307 |
examine changes to '.hgsub'? |
| 308 |
(enter ? for help) [Ynesfdaq?] y |
| 309 |
|
| 310 |
@@ -0,0 +1,1 @@ |
| 311 |
+sub = sub |
| 312 |
record this change to '.hgsub'? |
| 313 |
(enter ? for help) [Ynesfdaq?] y |
| 314 |
|
| 315 |
warning: subrepo spec file '.hgsub' not found |
| 316 |
warning: subrepo spec file '.hgsub' not found |
| 317 |
path sub |
| 318 |
source sub |
| 319 |
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
| 320 |
$ testmod qrecord --config ui.interactive=1 -m1 1.diff <<EOF |
| 321 |
> y |
| 322 |
> y |
| 323 |
> EOF |
| 324 |
adding a |
| 325 |
% abort when modifying .hgsub w/dirty subrepo |
| 326 |
M .hgsub |
| 327 |
A sub2/a |
| 328 |
% qrecord --config ui.interactive=1 -m1 1.diff |
| 329 |
abort: uncommitted changes in subrepository "sub2" |
| 330 |
[255] |
| 331 |
% update substate when modifying .hgsub w/clean updated subrepo |
| 332 |
M .hgsub |
| 333 |
A sub2/a |
| 334 |
% qrecord --config ui.interactive=1 -m1 1.diff |
| 335 |
diff --git a/.hgsub b/.hgsub |
| 336 |
1 hunks, 1 lines changed |
| 337 |
examine changes to '.hgsub'? |
| 338 |
(enter ? for help) [Ynesfdaq?] y |
| 339 |
|
| 340 |
@@ -1,1 +1,2 @@ |
| 341 |
sub = sub |
| 342 |
+sub2 = sub2 |
| 343 |
record this change to '.hgsub'? |
| 344 |
(enter ? for help) [Ynesfdaq?] y |
| 345 |
|
| 346 |
path sub |
| 347 |
source sub |
| 348 |
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31 |
| 349 |
path sub2 |
| 350 |
source sub2 |
| 351 |
revision 1f94c7611cc6b74f5a17b16121a1170d44776845 |
| 352 |
|
| 353 |
$ hg qpop -qa |
| 354 |
patch queue now empty |
| 355 |
$ testrm1 qrecord --config ui.interactive=1 -m2 2.diff <<EOF |
| 356 |
> y |
| 357 |
> y |
| 358 |
> EOF |
| 359 |
adding a |
| 360 |
% update substate when removing .hgsub w/dirty subrepo |
| 361 |
M sub3/a |
| 362 |
R .hgsub |
| 363 |
% qrecord --config ui.interactive=1 -m2 2.diff |
| 364 |
diff --git a/.hgsub b/.hgsub |
| 365 |
deleted file mode 100644 |
| 366 |
examine changes to '.hgsub'? |
| 367 |
(enter ? for help) [Ynesfdaq?] y |
| 368 |
|
| 369 |
% debugsub should be empty |
| 370 |
|
| 371 |
$ hg qpop -qa |
| 372 |
patch queue now empty |
| 373 |
$ testrm2 qrecord --config ui.interactive=1 -m3 3.diff <<EOF |
| 374 |
> y |
| 375 |
> y |
| 376 |
> EOF |
| 377 |
adding a |
| 378 |
% update substate when removing .hgsub w/clean updated subrepo |
| 379 |
R .hgsub |
| 380 |
% qrecord --config ui.interactive=1 -m3 3.diff |
| 381 |
diff --git a/.hgsub b/.hgsub |
| 382 |
deleted file mode 100644 |
| 383 |
examine changes to '.hgsub'? |
| 384 |
(enter ? for help) [Ynesfdaq?] y |
| 385 |
|
| 386 |
% debugsub should be empty |
| 387 |
|
| 388 |
$ cd .. |
| 389 |
|
| 390 |
|
| 391 |
correctly handle subrepos with patch queues |
| 392 |
$ mkrepo repo-subrepo-with-queue |
| 393 |
$ mksubrepo sub |
| 394 |
adding a |
| 395 |
$ hg -R sub qnew sub0.diff |
| 396 |
$ echo sub = sub >> .hgsub |
| 397 |
$ hg add .hgsub |
| 398 |
$ hg qnew 0.diff |
| 399 |
|
| 400 |
$ cd .. |
| 401 |
|
| 402 |
check whether MQ operations can import updated .hgsubstate correctly |
| 403 |
both into 'revision' and 'patch file under .hg/patches': |
| 404 |
|
| 405 |
$ hg init importing-hgsubstate |
| 406 |
$ cd importing-hgsubstate |
| 407 |
|
| 408 |
$ echo a > a |
| 409 |
$ hg commit -u test -d '0 0' -Am '#0 in parent' |
| 410 |
adding a |
| 411 |
$ hg init sub |
| 412 |
$ echo sa > sub/sa |
| 413 |
$ hg -R sub commit -u test -d '0 0' -Am '#0 in sub' |
| 414 |
adding sa |
| 415 |
$ echo 'sub = sub' > .hgsub |
| 416 |
$ touch .hgsubstate |
| 417 |
$ hg add .hgsub .hgsubstate |
| 418 |
|
| 419 |
$ hg qnew -u test -d '0 0' import-at-qnew |
| 420 |
$ hg -R sub parents --template '{node} sub\n' |
| 421 |
b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 422 |
$ cat .hgsubstate |
| 423 |
b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 424 |
$ hg diff -c tip |
| 425 |
diff -r f499373e340c -r f69e96d86e75 .hgsub |
| 426 |
--- /dev/null |
| 427 |
+++ b/.hgsub |
| 428 |
@@ -0,0 +1,1 @@ |
| 429 |
+sub = sub |
| 430 |
diff -r f499373e340c -r f69e96d86e75 .hgsubstate |
| 431 |
--- /dev/null |
| 432 |
+++ b/.hgsubstate |
| 433 |
@@ -0,0 +1,1 @@ |
| 434 |
+b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 435 |
$ cat .hg/patches/import-at-qnew |
| 436 |
# HG changeset patch |
| 437 |
# User test |
| 438 |
# Date 0 0 |
| 439 |
# Parent f499373e340cdca5d01dee904aeb42dd2a325e71 |
| 440 |
|
| 441 |
diff -r f499373e340c -r f69e96d86e75 .hgsub |
| 442 |
--- /dev/null |
| 443 |
+++ b/.hgsub |
| 444 |
@@ -0,0 +1,1 @@ |
| 445 |
+sub = sub |
| 446 |
diff -r f499373e340c -r f69e96d86e75 .hgsubstate |
| 447 |
--- /dev/null |
| 448 |
+++ b/.hgsubstate |
| 449 |
@@ -0,0 +1,1 @@ |
| 450 |
+b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 451 |
$ hg parents --template '{node}\n' |
| 452 |
f69e96d86e75a6d4fd88285dc9697acb23951041 |
| 453 |
$ hg parents --template '{files}\n' |
| 454 |
.hgsub .hgsubstate |
| 455 |
|
| 456 |
check also whether qnew not including ".hgsubstate" explicitly causes |
| 457 |
as same result (in node hash) as one including it. |
| 458 |
|
| 459 |
$ hg qpop -a -q |
| 460 |
patch queue now empty |
| 461 |
$ hg qdelete import-at-qnew |
| 462 |
$ echo 'sub = sub' > .hgsub |
| 463 |
$ hg add .hgsub |
| 464 |
$ rm -f .hgsubstate |
| 465 |
$ hg qnew -u test -d '0 0' import-at-qnew |
| 466 |
$ hg parents --template '{node}\n' |
| 467 |
f69e96d86e75a6d4fd88285dc9697acb23951041 |
| 468 |
$ hg parents --template '{files}\n' |
| 469 |
.hgsub .hgsubstate |
| 470 |
|
| 471 |
check whether qrefresh imports updated .hgsubstate correctly |
| 472 |
|
| 473 |
$ hg qpop |
| 474 |
popping import-at-qnew |
| 475 |
patch queue now empty |
| 476 |
$ hg qpush |
| 477 |
applying import-at-qnew |
| 478 |
now at: import-at-qnew |
| 479 |
$ hg parents --template '{files}\n' |
| 480 |
.hgsub .hgsubstate |
| 481 |
|
| 482 |
$ hg qnew import-at-qrefresh |
| 483 |
$ echo sb > sub/sb |
| 484 |
$ hg -R sub commit -u test -d '0 0' -Am '#1 in sub' |
| 485 |
adding sb |
| 486 |
$ hg qrefresh -u test -d '0 0' |
| 487 |
$ hg -R sub parents --template '{node} sub\n' |
| 488 |
88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 489 |
$ cat .hgsubstate |
| 490 |
88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 491 |
$ hg diff -c tip |
| 492 |
diff -r 05b056bb9c8c -r d987bec230f4 .hgsubstate |
| 493 |
--- a/.hgsubstate |
| 494 |
+++ b/.hgsubstate |
| 495 |
@@ -1,1 +1,1 @@ |
| 496 |
-b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 497 |
+88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 498 |
$ cat .hg/patches/import-at-qrefresh |
| 499 |
# HG changeset patch |
| 500 |
# User test |
| 501 |
# Date 0 0 |
| 502 |
# Parent 05b056bb9c8c05ff15258b84fd42ab3527271033 |
| 503 |
|
| 504 |
diff -r 05b056bb9c8c .hgsubstate |
| 505 |
--- a/.hgsubstate |
| 506 |
+++ b/.hgsubstate |
| 507 |
@@ -1,1 +1,1 @@ |
| 508 |
-b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 509 |
+88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 510 |
$ hg parents --template '{files}\n' |
| 511 |
.hgsubstate |
| 512 |
|
| 513 |
$ hg qrefresh -u test -d '0 0' |
| 514 |
$ cat .hgsubstate |
| 515 |
88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 516 |
$ hg diff -c tip |
| 517 |
diff -r 05b056bb9c8c -r d987bec230f4 .hgsubstate |
| 518 |
--- a/.hgsubstate |
| 519 |
+++ b/.hgsubstate |
| 520 |
@@ -1,1 +1,1 @@ |
| 521 |
-b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 522 |
+88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 523 |
$ cat .hg/patches/import-at-qrefresh |
| 524 |
# HG changeset patch |
| 525 |
# User test |
| 526 |
# Date 0 0 |
| 527 |
# Parent 05b056bb9c8c05ff15258b84fd42ab3527271033 |
| 528 |
|
| 529 |
diff -r 05b056bb9c8c .hgsubstate |
| 530 |
--- a/.hgsubstate |
| 531 |
+++ b/.hgsubstate |
| 532 |
@@ -1,1 +1,1 @@ |
| 533 |
-b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 534 |
+88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 535 |
$ hg parents --template '{files}\n' |
| 536 |
.hgsubstate |
| 537 |
|
| 538 |
$ hg update -C tip |
| 539 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 540 |
$ hg qpop -a |
| 541 |
popping import-at-qrefresh |
| 542 |
popping import-at-qnew |
| 543 |
patch queue now empty |
| 544 |
|
| 545 |
$ hg -R sub update -C 0 |
| 546 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 547 |
$ echo 'sub = sub' > .hgsub |
| 548 |
$ hg commit -Am '#1 in parent' |
| 549 |
adding .hgsub |
| 550 |
$ hg -R sub update -C 1 |
| 551 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 552 |
$ hg commit -Am '#2 in parent (but will be rolled back soon)' |
| 553 |
$ hg rollback |
| 554 |
repository tip rolled back to revision 1 (undo commit) |
| 555 |
working directory now based on revision 1 |
| 556 |
$ hg status |
| 557 |
M .hgsubstate |
| 558 |
$ hg qnew -u test -d '0 0' checkstate-at-qnew |
| 559 |
$ hg -R sub parents --template '{node} sub\n' |
| 560 |
88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 561 |
$ cat .hgsubstate |
| 562 |
88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 563 |
$ hg diff -c tip |
| 564 |
diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate |
| 565 |
--- a/.hgsubstate |
| 566 |
+++ b/.hgsubstate |
| 567 |
@@ -1,1 +1,1 @@ |
| 568 |
-b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 569 |
+88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 570 |
$ cat .hg/patches/checkstate-at-qnew |
| 571 |
# HG changeset patch |
| 572 |
# User test |
| 573 |
# Date 0 0 |
| 574 |
# Parent 4d91eb2fa1d1b22ec513347b9cd06f6b49d470fa |
| 575 |
|
| 576 |
diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate |
| 577 |
--- a/.hgsubstate |
| 578 |
+++ b/.hgsubstate |
| 579 |
@@ -1,1 +1,1 @@ |
| 580 |
-b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
| 581 |
+88ac1bef5ed43b689d1d200b59886b675dec474b sub |
| 582 |
$ hg parents --template '{files}\n' |
| 583 |
.hgsubstate |
| 584 |
|
| 585 |
check whether qrefresh not including ".hgsubstate" explicitly causes |
| 586 |
as same result (in node hash) as one including it. |
| 587 |
|
| 588 |
$ hg update -C -q 0 |
| 589 |
$ hg qpop -a -q |
| 590 |
patch queue now empty |
| 591 |
$ hg qnew -u test -d '0 0' add-hgsub-at-qrefresh |
| 592 |
$ echo 'sub = sub' > .hgsub |
| 593 |
$ echo > .hgsubstate |
| 594 |
$ hg add .hgsub .hgsubstate |
| 595 |
$ hg qrefresh -u test -d '0 0' |
| 596 |
$ hg parents --template '{node}\n' |
| 597 |
7c48c35501aae6770ed9c2517014628615821a8e |
| 598 |
$ hg parents --template '{files}\n' |
| 599 |
.hgsub .hgsubstate |
| 600 |
|
| 601 |
$ hg qpop -a -q |
| 602 |
patch queue now empty |
| 603 |
$ hg qdelete add-hgsub-at-qrefresh |
| 604 |
$ hg qnew -u test -d '0 0' add-hgsub-at-qrefresh |
| 605 |
$ echo 'sub = sub' > .hgsub |
| 606 |
$ hg add .hgsub |
| 607 |
$ rm -f .hgsubstate |
| 608 |
$ hg qrefresh -u test -d '0 0' |
| 609 |
$ hg parents --template '{node}\n' |
| 610 |
7c48c35501aae6770ed9c2517014628615821a8e |
| 611 |
$ hg parents --template '{files}\n' |
| 612 |
.hgsub .hgsubstate |
| 613 |
|
| 614 |
$ cd .. |
| 615 |
|
| 616 |
$ cd .. |