##// END OF EJS Templates
merge with stable
Matt Mackall -
r13036:77aa74fe merge default
parent child Browse files
Show More
@@ -1310,12 +1310,18 b' class queue(object):'
1310 # local dirstate. in this case, we want them to only
1310 # local dirstate. in this case, we want them to only
1311 # show up in the added section
1311 # show up in the added section
1312 for x in m:
1312 for x in m:
1313 if x == '.hgsub' or x == '.hgsubstate':
1314 self.ui.warn(_('warning: not refreshing %s\n') % x)
1315 continue
1313 if x not in aa:
1316 if x not in aa:
1314 mm.add(x)
1317 mm.add(x)
1315 # we might end up with files added by the local dirstate that
1318 # we might end up with files added by the local dirstate that
1316 # were deleted by the patch. In this case, they should only
1319 # were deleted by the patch. In this case, they should only
1317 # show up in the changed section.
1320 # show up in the changed section.
1318 for x in a:
1321 for x in a:
1322 if x == '.hgsub' or x == '.hgsubstate':
1323 self.ui.warn(_('warning: not adding %s\n') % x)
1324 continue
1319 if x in dd:
1325 if x in dd:
1320 dd.remove(x)
1326 dd.remove(x)
1321 mm.add(x)
1327 mm.add(x)
@@ -1325,6 +1331,9 b' class queue(object):'
1325 # are not in the add or change column of the patch
1331 # are not in the add or change column of the patch
1326 forget = []
1332 forget = []
1327 for x in d + r:
1333 for x in d + r:
1334 if x == '.hgsub' or x == '.hgsubstate':
1335 self.ui.warn(_('warning: not removing %s\n') % x)
1336 continue
1328 if x in aa:
1337 if x in aa:
1329 aa.remove(x)
1338 aa.remove(x)
1330 forget.append(x)
1339 forget.append(x)
@@ -487,3 +487,76 b' Issue1441 with git patches:'
487
487
488 $ cd ..
488 $ cd ..
489
489
490
491 Issue2499: refuse to add .hgsub{,state} to a patch
492
493 $ hg init repo-2499
494 $ cd repo-2499
495 $ hg qinit
496 $ hg qnew -m 0 0.diff
497 $ echo a > a
498 $ hg init sub
499 $ cd sub
500 $ echo b > b
501 $ hg ci -Am 0sub
502 adding b
503 $ cd ..
504
505 test when adding
506 $ echo sub = sub > .hgsub
507 $ echo `hg id -i --debug sub` sub > .hgsubstate
508 $ hg add
509 adding .hgsub
510 adding .hgsubstate
511 adding a
512 $ hg qrefresh
513 warning: not adding .hgsub
514 warning: not adding .hgsubstate
515 $ hg qfinish -a
516 $ hg status
517 A .hgsub
518 A .hgsubstate
519 $ hg forget .hgsubstate
520 $ rm .hgsubstate
521
522 add subrepo with a real commit
523 $ hg ci -m 1
524 committing subrepository sub
525 $ hg qnew -m 2 2.diff
526
527 test when modifying
528 $ echo sub2 = sub2 >> .hgsub
529 $ hg qrefresh
530 warning: not refreshing .hgsub
531 $ echo 0000000000000000000000000000000000000000 sub2 >> .hgsubstate
532 $ hg qrefresh
533 warning: not refreshing .hgsub
534 warning: not refreshing .hgsubstate
535 $ hg revert --no-backup .hgsub .hgsubstate
536
537 test when removing
538 $ hg rm .hgsub
539 $ hg rm .hgsubstate
540 $ hg qrefresh
541 warning: not removing .hgsub
542 warning: not removing .hgsubstate
543 $ hg status
544 R .hgsub
545 R .hgsubstate
546 $ hg revert --no-backup .hgsub .hgsubstate
547
548 test when deleting
549 $ rm .hgsub .hgsubstate
550 $ hg qrefresh
551 warning: not removing .hgsub
552 warning: not removing .hgsubstate
553 refresh interrupted while patch was popped! (revert --all, qpush to recover)
554 abort: No such file or directory: $TESTTMP/repo-2499/.hgsub
555 [255]
556 $ hg status
557 ! .hgsub
558 ! .hgsubstate
559 $ hg cat -r1 .hgsub > .hgsub
560 $ hg revert --no-backup .hgsubstate
561
562 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now