Mercurial > hg-stable
changeset 10616:65b178f30eae stable
bundle: fix bundle generation for empty changegroup
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 09 Mar 2010 20:38:23 +0100 |
parents | 30553ac3e355 |
children | da7662ea741f 508fda6b8637 |
files | mercurial/commands.py tests/test-bundle-r tests/test-bundle-r.out |
diffstat | 3 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Mar 09 16:03:57 2010 +0100 +++ b/mercurial/commands.py Tue Mar 09 20:38:23 2010 +0100 @@ -564,6 +564,10 @@ revs, checkout = hg.addbranchrevs(repo, other, branches, revs) o = repo.findoutgoing(other, force=opts.get('force')) + if not o: + ui.status(_("no changes found\n")) + return + if revs: cg = repo.changegroupsubset(o, revs, 'bundle') else:
--- a/tests/test-bundle-r Tue Mar 09 16:03:57 2010 +0100 +++ b/tests/test-bundle-r Tue Mar 09 20:38:23 2010 +0100 @@ -72,6 +72,8 @@ hg -R test bundle --base 2 -r 7 test-bundle-branch2.hg hg -R test bundle --base 2 test-bundle-all.hg hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg +# empty bundle +hg -R test bundle --base 7 --base 8 test-bundle-empty.hg # issue76 msg2163 hg -R test bundle --base 3 -r 3 -r 3 test-bundle-cset-3.hg