Show More
@@ -577,11 +577,13 b' def changegroupsubset(repo, roots, heads' | |||||
577 | cl = repo.changelog |
|
577 | cl = repo.changelog | |
578 | if not roots: |
|
578 | if not roots: | |
579 | roots = [nullid] |
|
579 | roots = [nullid] | |
580 | # TODO: remove call to nodesbetween. |
|
|||
581 | csets, roots, heads = cl.nodesbetween(roots, heads) |
|
|||
582 | discbases = [] |
|
580 | discbases = [] | |
583 | for n in roots: |
|
581 | for n in roots: | |
584 | discbases.extend([p for p in cl.parents(n) if p != nullid]) |
|
582 | discbases.extend([p for p in cl.parents(n) if p != nullid]) | |
|
583 | # TODO: remove call to nodesbetween. | |||
|
584 | csets, roots, heads = cl.nodesbetween(roots, heads) | |||
|
585 | included = set(csets) | |||
|
586 | discbases = [n for n in discbases if n not in included] | |||
585 | outgoing = discovery.outgoing(cl, discbases, heads) |
|
587 | outgoing = discovery.outgoing(cl, discbases, heads) | |
586 | bundler = packermap[version][0](repo) |
|
588 | bundler = packermap[version][0](repo) | |
587 | return getsubset(repo, outgoing, bundler, source, version=version) |
|
589 | return getsubset(repo, outgoing, bundler, source, version=version) |
@@ -280,17 +280,14 b' Check that the right ancestors is used w' | |||||
280 | f2.txt: remote created -> g |
|
280 | f2.txt: remote created -> g | |
281 | getting f2.txt |
|
281 | getting f2.txt | |
282 | updating: f2.txt 2/2 files (100.00%) |
|
282 | updating: f2.txt 2/2 files (100.00%) | |
283 |
|
|
283 | 2 changesets found | |
284 | list of changesets: |
|
284 | list of changesets: | |
285 | 4c9fbe56a16f30c0d5dcc40ec1a97bbe3325209c |
|
|||
286 | e31216eec445e44352c5f01588856059466a24c9 |
|
285 | e31216eec445e44352c5f01588856059466a24c9 | |
287 | 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 |
|
286 | 2f2496ddf49d69b5ef23ad8cf9fb2e0e4faf0ac2 | |
288 |
bundling: 1/ |
|
287 | bundling: 1/2 changesets (50.00%) | |
289 |
bundling: 2/ |
|
288 | bundling: 2/2 changesets (100.00%) | |
290 |
bundling: |
|
289 | bundling: 1/2 manifests (50.00%) | |
291 |
bundling: |
|
290 | bundling: 2/2 manifests (100.00%) | |
292 | bundling: 2/3 manifests (66.67%) |
|
|||
293 | bundling: 3/3 manifests (100.00%) |
|
|||
294 | bundling: f1.txt 1/1 files (100.00%) |
|
291 | bundling: f1.txt 1/1 files (100.00%) | |
295 | saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) |
|
292 | saved backup bundle to $TESTTMP/issue4041/.hg/strip-backup/e31216eec445-15f7a814-backup.hg (glob) | |
296 | 3 changesets found |
|
293 | 3 changesets found |
@@ -690,3 +690,143 b" Verify bundles don't get overwritten:" | |||||
690 | $ ls .hg/strip-backup |
|
690 | $ ls .hg/strip-backup | |
691 | 3903775176ed-54390173-backup.hg |
|
691 | 3903775176ed-54390173-backup.hg | |
692 | 3903775176ed-e68910bd-backup.hg |
|
692 | 3903775176ed-e68910bd-backup.hg | |
|
693 | $ cd .. | |||
|
694 | ||||
|
695 | Test that we only bundle the stripped changesets (issue4736) | |||
|
696 | ------------------------------------------------------------ | |||
|
697 | ||||
|
698 | initialisation (previous repo is empty anyway) | |||
|
699 | ||||
|
700 | $ hg init issue4736 | |||
|
701 | $ cd issue4736 | |||
|
702 | $ echo a > a | |||
|
703 | $ hg add a | |||
|
704 | $ hg commit -m commitA | |||
|
705 | $ echo b > b | |||
|
706 | $ hg add b | |||
|
707 | $ hg commit -m commitB | |||
|
708 | $ echo c > c | |||
|
709 | $ hg add c | |||
|
710 | $ hg commit -m commitC | |||
|
711 | $ hg up 'desc(commitB)' | |||
|
712 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
713 | $ echo d > d | |||
|
714 | $ hg add d | |||
|
715 | $ hg commit -m commitD | |||
|
716 | created new head | |||
|
717 | $ hg up 'desc(commitC)' | |||
|
718 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
719 | $ hg merge 'desc(commitD)' | |||
|
720 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
721 | (branch merge, don't forget to commit) | |||
|
722 | $ hg ci -m 'mergeCD' | |||
|
723 | $ hg log -G | |||
|
724 | @ changeset: 4:d8db9d137221 | |||
|
725 | |\ tag: tip | |||
|
726 | | | parent: 2:5c51d8d6557d | |||
|
727 | | | parent: 3:6625a5168474 | |||
|
728 | | | user: test | |||
|
729 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
730 | | | summary: mergeCD | |||
|
731 | | | | |||
|
732 | | o changeset: 3:6625a5168474 | |||
|
733 | | | parent: 1:eca11cf91c71 | |||
|
734 | | | user: test | |||
|
735 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
736 | | | summary: commitD | |||
|
737 | | | | |||
|
738 | o | changeset: 2:5c51d8d6557d | |||
|
739 | |/ user: test | |||
|
740 | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
741 | | summary: commitC | |||
|
742 | | | |||
|
743 | o changeset: 1:eca11cf91c71 | |||
|
744 | | user: test | |||
|
745 | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
746 | | summary: commitB | |||
|
747 | | | |||
|
748 | o changeset: 0:105141ef12d0 | |||
|
749 | user: test | |||
|
750 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
751 | summary: commitA | |||
|
752 | ||||
|
753 | ||||
|
754 | Check bundle behavior: | |||
|
755 | ||||
|
756 | $ hg bundle -r 'desc(mergeCD)' --base 'desc(commitC)' ../issue4736.hg | |||
|
757 | 2 changesets found | |||
|
758 | $ hg log -r 'bundle()' -R ../issue4736.hg | |||
|
759 | changeset: 3:6625a5168474 | |||
|
760 | parent: 1:eca11cf91c71 | |||
|
761 | user: test | |||
|
762 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
763 | summary: commitD | |||
|
764 | ||||
|
765 | changeset: 4:d8db9d137221 | |||
|
766 | tag: tip | |||
|
767 | parent: 2:5c51d8d6557d | |||
|
768 | parent: 3:6625a5168474 | |||
|
769 | user: test | |||
|
770 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
771 | summary: mergeCD | |||
|
772 | ||||
|
773 | ||||
|
774 | check strip behavior | |||
|
775 | ||||
|
776 | $ hg --config extensions.strip= strip 'desc(commitD)' --debug | |||
|
777 | resolving manifests | |||
|
778 | branchmerge: False, force: True, partial: False | |||
|
779 | ancestor: d8db9d137221+, local: d8db9d137221+, remote: eca11cf91c71 | |||
|
780 | c: other deleted -> r | |||
|
781 | removing c | |||
|
782 | d: other deleted -> r | |||
|
783 | removing d | |||
|
784 | updating: d 2/2 files (100.00%) | |||
|
785 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
786 | 2 changesets found | |||
|
787 | list of changesets: | |||
|
788 | 6625a516847449b6f0fa3737b9ba56e9f0f3032c | |||
|
789 | d8db9d1372214336d2b5570f20ee468d2c72fa8b | |||
|
790 | bundling: 1/2 changesets (50.00%) | |||
|
791 | bundling: 2/2 changesets (100.00%) | |||
|
792 | bundling: 1/2 manifests (50.00%) | |||
|
793 | bundling: 2/2 manifests (100.00%) | |||
|
794 | bundling: d 1/1 files (100.00%) | |||
|
795 | saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/6625a5168474-345bb43d-backup.hg (glob) | |||
|
796 | invalid branchheads cache (served): tip differs | |||
|
797 | truncating cache/rbc-revs-v1 to 24 | |||
|
798 | $ hg log -G | |||
|
799 | o changeset: 2:5c51d8d6557d | |||
|
800 | | tag: tip | |||
|
801 | | user: test | |||
|
802 | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
803 | | summary: commitC | |||
|
804 | | | |||
|
805 | @ changeset: 1:eca11cf91c71 | |||
|
806 | | user: test | |||
|
807 | | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
808 | | summary: commitB | |||
|
809 | | | |||
|
810 | o changeset: 0:105141ef12d0 | |||
|
811 | user: test | |||
|
812 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
813 | summary: commitA | |||
|
814 | ||||
|
815 | ||||
|
816 | strip backup content | |||
|
817 | ||||
|
818 | $ hg log -r 'bundle()' -R .hg/strip-backup/6625a5168474-*-backup.hg | |||
|
819 | changeset: 3:6625a5168474 | |||
|
820 | parent: 1:eca11cf91c71 | |||
|
821 | user: test | |||
|
822 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
823 | summary: commitD | |||
|
824 | ||||
|
825 | changeset: 4:d8db9d137221 | |||
|
826 | tag: tip | |||
|
827 | parent: 2:5c51d8d6557d | |||
|
828 | parent: 3:6625a5168474 | |||
|
829 | user: test | |||
|
830 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
831 | summary: mergeCD | |||
|
832 |
General Comments 0
You need to be logged in to leave comments.
Login now