# HG changeset patch # User Pierre-Yves David <pierre-yves.da...@octobus.net> # Date 1493927076 -7200 # Thu May 04 21:44:36 2017 +0200 # Node ID f2da8236b1566e14cce6e83169000b9376429433 # Parent 8f1a2b848b52ea7bf3fe2404e3b62924c7aae93f # EXP-Topic bundle.cleanup # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ # hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r f2da8236b156 bundle: check lack of revs to bundle before generating the changegroup
We already have the information so we can check it earlier. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1367,11 +1367,13 @@ def bundle(ui, repo, fname, dest=None, * onlyheads=heads, force=opts.get('force'), portable=True) - cg = changegroup.getchangegroup(repo, 'bundle', outgoing, version=cgversion) - if not cg: + + if not outgoing.missing: scmutil.nochangesfound(ui, repo, not base and outgoing.excluded) return 1 + cg = changegroup.getchangegroup(repo, 'bundle', outgoing, version=cgversion) + if cgversion == '01': #bundle1 if bcompression is None: bcompression = 'UN' _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel