Show More
@@ -1035,7 +1035,6 class queue(object): | |||||
1035 | self.checkpatchname(patchfn) |
|
1035 | self.checkpatchname(patchfn) | |
1036 | inclsubs = checksubstate(repo) |
|
1036 | inclsubs = checksubstate(repo) | |
1037 | if inclsubs: |
|
1037 | if inclsubs: | |
1038 | inclsubs.append('.hgsubstate') |
|
|||
1039 | substatestate = repo.dirstate['.hgsubstate'] |
|
1038 | substatestate = repo.dirstate['.hgsubstate'] | |
1040 | if opts.get('include') or opts.get('exclude') or pats: |
|
1039 | if opts.get('include') or opts.get('exclude') or pats: | |
1041 | match = scmutil.match(repo[None], pats, opts) |
|
1040 | match = scmutil.match(repo[None], pats, opts) | |
@@ -1045,14 +1044,14 class queue(object): | |||||
1045 | raise util.Abort('%s: %s' % (f, msg)) |
|
1044 | raise util.Abort('%s: %s' % (f, msg)) | |
1046 | match.bad = badfn |
|
1045 | match.bad = badfn | |
1047 | changes = repo.status(match=match) |
|
1046 | changes = repo.status(match=match) | |
1048 | m, a, r, d = changes[:4] |
|
|||
1049 | else: |
|
1047 | else: | |
1050 | changes = self.checklocalchanges(repo, force=True) |
|
1048 | changes = self.checklocalchanges(repo, force=True) | |
1051 | m, a, r, d = changes |
|
1049 | commitfiles = list(inclsubs) | |
1052 | match = scmutil.matchfiles(repo, m + a + r + inclsubs) |
|
1050 | for files in changes[:3]: | |
|
1051 | commitfiles.extend([f for f in files if f != '.hgsubstate']) | |||
|
1052 | match = scmutil.matchfiles(repo, commitfiles) | |||
1053 | if len(repo[None].parents()) > 1: |
|
1053 | if len(repo[None].parents()) > 1: | |
1054 | raise util.Abort(_('cannot manage merge changesets')) |
|
1054 | raise util.Abort(_('cannot manage merge changesets')) | |
1055 | commitfiles = m + a + r |
|
|||
1056 | self.checktoppatch(repo) |
|
1055 | self.checktoppatch(repo) | |
1057 | insert = self.fullseriesend() |
|
1056 | insert = self.fullseriesend() | |
1058 | wlock = repo.wlock() |
|
1057 | wlock = repo.wlock() | |
@@ -1492,7 +1491,6 class queue(object): | |||||
1492 |
|
1491 | |||
1493 | inclsubs = checksubstate(repo, hex(patchparent)) |
|
1492 | inclsubs = checksubstate(repo, hex(patchparent)) | |
1494 | if inclsubs: |
|
1493 | if inclsubs: | |
1495 | inclsubs.append('.hgsubstate') |
|
|||
1496 | substatestate = repo.dirstate['.hgsubstate'] |
|
1494 | substatestate = repo.dirstate['.hgsubstate'] | |
1497 |
|
1495 | |||
1498 | ph = patchheader(self.join(patchfn), self.plainmode) |
|
1496 | ph = patchheader(self.join(patchfn), self.plainmode) | |
@@ -1579,7 +1577,7 class queue(object): | |||||
1579 |
|
1577 | |||
1580 | files = set(inclsubs) |
|
1578 | files = set(inclsubs) | |
1581 | for x in refreshchanges: |
|
1579 | for x in refreshchanges: | |
1582 | files.update(x) |
|
1580 | files.update([f for f in x if f != '.hgsubstate']) | |
1583 | match = scmutil.matchfiles(repo, files) |
|
1581 | match = scmutil.matchfiles(repo, files) | |
1584 |
|
1582 | |||
1585 | bmlist = repo[top].bookmarks() |
|
1583 | bmlist = repo[top].bookmarks() |
@@ -407,12 +407,12 both into 'revision' and 'patch file und | |||||
407 | $ cat .hgsubstate |
|
407 | $ cat .hgsubstate | |
408 | b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
|
408 | b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub | |
409 | $ hg diff -c tip |
|
409 | $ hg diff -c tip | |
410 |
diff -r f499373e340c -r |
|
410 | diff -r f499373e340c -r f69e96d86e75 .hgsub | |
411 | --- /dev/null |
|
411 | --- /dev/null | |
412 | +++ b/.hgsub |
|
412 | +++ b/.hgsub | |
413 | @@ -0,0 +1,1 @@ |
|
413 | @@ -0,0 +1,1 @@ | |
414 | +sub = sub |
|
414 | +sub = sub | |
415 |
diff -r f499373e340c -r |
|
415 | diff -r f499373e340c -r f69e96d86e75 .hgsubstate | |
416 | --- /dev/null |
|
416 | --- /dev/null | |
417 | +++ b/.hgsubstate |
|
417 | +++ b/.hgsubstate | |
418 | @@ -0,0 +1,1 @@ |
|
418 | @@ -0,0 +1,1 @@ | |
@@ -423,16 +423,34 both into 'revision' and 'patch file und | |||||
423 | # User test |
|
423 | # User test | |
424 | # Date 0 0 |
|
424 | # Date 0 0 | |
425 |
|
425 | |||
426 |
diff -r f499373e340c -r |
|
426 | diff -r f499373e340c -r f69e96d86e75 .hgsub | |
427 | --- /dev/null |
|
427 | --- /dev/null | |
428 | +++ b/.hgsub |
|
428 | +++ b/.hgsub | |
429 | @@ -0,0 +1,1 @@ |
|
429 | @@ -0,0 +1,1 @@ | |
430 | +sub = sub |
|
430 | +sub = sub | |
431 |
diff -r f499373e340c -r |
|
431 | diff -r f499373e340c -r f69e96d86e75 .hgsubstate | |
432 | --- /dev/null |
|
432 | --- /dev/null | |
433 | +++ b/.hgsubstate |
|
433 | +++ b/.hgsubstate | |
434 | @@ -0,0 +1,1 @@ |
|
434 | @@ -0,0 +1,1 @@ | |
435 | +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
|
435 | +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub | |
|
436 | $ hg parents --template '{node}\n' | |||
|
437 | f69e96d86e75a6d4fd88285dc9697acb23951041 | |||
|
438 | ||||
|
439 | check also whether qnew not including ".hgsubstate" explicitly causes | |||
|
440 | as same result (in node hash) as one including it. | |||
|
441 | ||||
|
442 | $ hg qpop -a -q | |||
|
443 | patch queue now empty | |||
|
444 | $ hg qdelete import-at-qnew | |||
|
445 | $ echo 'sub = sub' > .hgsub | |||
|
446 | $ hg add .hgsub | |||
|
447 | $ rm -f .hgsubstate | |||
|
448 | $ hg qnew -u test -d '0 0' import-at-qnew | |||
|
449 | $ hg parents --template '{node}\n' | |||
|
450 | f69e96d86e75a6d4fd88285dc9697acb23951041 | |||
|
451 | ||||
|
452 | check whether qrefresh imports updated .hgsubstate correctly | |||
|
453 | ||||
436 | $ hg qpop |
|
454 | $ hg qpop | |
437 | popping import-at-qnew |
|
455 | popping import-at-qnew | |
438 | patch queue now empty |
|
456 | patch queue now empty | |
@@ -537,6 +555,31 both into 'revision' and 'patch file und | |||||
537 | -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub |
|
555 | -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub | |
538 | +88ac1bef5ed43b689d1d200b59886b675dec474b sub |
|
556 | +88ac1bef5ed43b689d1d200b59886b675dec474b sub | |
539 |
|
557 | |||
|
558 | check whether qrefresh not including ".hgsubstate" explicitly causes | |||
|
559 | as same result (in node hash) as one including it. | |||
|
560 | ||||
|
561 | $ hg update -C -q 0 | |||
|
562 | $ hg qpop -a -q | |||
|
563 | patch queue now empty | |||
|
564 | $ hg qnew -u test -d '0 0' add-hgsub-at-qrefresh | |||
|
565 | $ echo 'sub = sub' > .hgsub | |||
|
566 | $ echo > .hgsubstate | |||
|
567 | $ hg add .hgsub .hgsubstate | |||
|
568 | $ hg qrefresh -u test -d '0 0' | |||
|
569 | $ hg parents --template '{node}\n' | |||
|
570 | 7c48c35501aae6770ed9c2517014628615821a8e | |||
|
571 | ||||
|
572 | $ hg qpop -a -q | |||
|
573 | patch queue now empty | |||
|
574 | $ hg qdelete add-hgsub-at-qrefresh | |||
|
575 | $ hg qnew -u test -d '0 0' add-hgsub-at-qrefresh | |||
|
576 | $ echo 'sub = sub' > .hgsub | |||
|
577 | $ hg add .hgsub | |||
|
578 | $ rm -f .hgsubstate | |||
|
579 | $ hg qrefresh -u test -d '0 0' | |||
|
580 | $ hg parents --template '{node}\n' | |||
|
581 | 7c48c35501aae6770ed9c2517014628615821a8e | |||
|
582 | ||||
540 | $ cd .. |
|
583 | $ cd .. | |
541 |
|
584 | |||
542 | $ cd .. |
|
585 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now