Mercurial > hg
diff tests/test-bundle2.t @ 21259:ab5040cd5749
bundle2: fix bundle2 pulling all revs on empty pulls
When bundle2 was enabled, if hg pull had no commits to pull, it would print
'no changes found' and then download the entire repository from the server. This
was caused by heads and common being set to None, which gets treated as
heads=cl.heads() and common=[nullid], which means download the entire repo.
Pulling bundles without a changegroup is a valid use case (like if we're just
updating bookmarks), so this modifes the bundle code to allow not adding
changegroups.
author | Durham Goode <durham@fb.com> |
---|---|
date | Wed, 07 May 2014 17:24:19 -0700 |
parents | bcfd44abad93 |
children | b4f0e15d1dab |
line wrap: on
line diff
--- a/tests/test-bundle2.t Wed May 07 19:26:15 2014 -0700 +++ b/tests/test-bundle2.t Wed May 07 17:24:19 2014 -0700 @@ -791,6 +791,12 @@ added 1 changesets with 1 changes to 1 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) +pull empty + + $ hg -R other pull -r 24b6387c8c8c + pulling from $TESTTMP/main (glob) + no changes found + push $ hg -R main push other --rev eea13746799a