##// END OF EJS Templates
bundle2: fix bundle2 pulling all revs on empty pulls...
Durham Goode -
r21259:ab5040cd default
parent child Browse files
Show More
@@ -573,12 +573,13 def _pullbundle2(pullop):
573 573 kwargs['bundlecaps'].add('bundle2=' + urllib.quote(capsblob))
574 574 # pulling changegroup
575 575 pullop.todosteps.remove('changegroup')
576
577 kwargs['common'] = pullop.common
578 kwargs['heads'] = pullop.heads or pullop.rheads
576 579 if not pullop.fetch:
577 580 pullop.repo.ui.status(_("no changes found\n"))
578 581 pullop.cgresult = 0
579 582 else:
580 kwargs['common'] = pullop.common
581 kwargs['heads'] = pullop.heads or pullop.rheads
582 583 if pullop.heads is None and list(pullop.common) == [nullid]:
583 584 pullop.repo.ui.status(_("requesting all changes\n"))
584 585 _pullbundle2extraprepare(pullop, kwargs)
@@ -589,6 +590,8 def _pullbundle2(pullop):
589 590 op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
590 591 except bundle2.UnknownPartError, exc:
591 592 raise util.Abort('missing support for %s' % exc)
593
594 if pullop.fetch:
592 595 assert len(op.records['changegroup']) == 1
593 596 pullop.cgresult = op.records['changegroup'][0]['return']
594 597
@@ -684,7 +687,7 def getbundle(repo, source, heads=None,
684 687 The implementation is at a very early stage and will get massive rework
685 688 when the API of bundle is refined.
686 689 """
687 # build bundle here.
690 # build changegroup bundle here.
688 691 cg = changegroup.getbundle(repo, source, heads=heads,
689 692 common=common, bundlecaps=bundlecaps)
690 693 if bundlecaps is None or 'HG2X' not in bundlecaps:
@@ -697,6 +700,7 def getbundle(repo, source, heads=None,
697 700 blob = urllib.unquote(bcaps[len('bundle2='):])
698 701 b2caps.update(bundle2.decodecaps(blob))
699 702 bundler = bundle2.bundle20(repo.ui, b2caps)
703 if cg:
700 704 part = bundle2.bundlepart('b2x:changegroup', data=cg.getchunks())
701 705 bundler.addpart(part)
702 706 _getbundleextrapart(bundler, repo, source, heads=heads, common=common,
@@ -791,6 +791,12 pull
791 791 added 1 changesets with 1 changes to 1 files (+1 heads)
792 792 (run 'hg heads' to see heads, 'hg merge' to merge)
793 793
794 pull empty
795
796 $ hg -R other pull -r 24b6387c8c8c
797 pulling from $TESTTMP/main (glob)
798 no changes found
799
794 800 push
795 801
796 802 $ hg -R main push other --rev eea13746799a
General Comments 0
You need to be logged in to leave comments. Login now