From patchwork Thu Apr 14 15:26:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,3] patchbomb: fix public-is-missing hint From: timeless@gcc2-power8.osuosl.org X-Patchwork-Id: 14618 Message-Id: <2a9f8b12d062bf1927da.1460647587@gcc2-power8.osuosl.org> To: mercurial-devel@mercurial-scm.org Date: Thu, 14 Apr 2016 15:26:27 +0000 # HG changeset patch # User timeless # Date 1460643997 0 # Thu Apr 14 14:26:37 2016 +0000 # Node ID 2a9f8b12d062bf1927da07c545db3c3b357aac1f # Parent d6cc7d6123d276bf5651509ff724cbd2bed06df3 # EXP-Topic patchbomb # Available At bb://timeless/mercurial-crew # hg pull bb://timeless/mercurial-crew -r 2a9f8b12d062 patchbomb: fix public-is-missing hint Without this, there is no space between a hash and the -r preceding the next line in the use hg push hint diff -r d6cc7d6123d2 -r 2a9f8b12d062 hgext/patchbomb.py --- a/hgext/patchbomb.py Thu Apr 14 14:36:52 2016 +0000 +++ b/hgext/patchbomb.py Thu Apr 14 14:26:37 2016 +0000 @@ -570,7 +570,7 @@ else: msg = _('public url %s is missing %s') msg %= (publicurl, missing[0]) - revhint = ''.join('-r %s' % h + revhint = ' '.join('-r %s' % h for h in repo.set('heads(%ld)', missing)) hint = _('use "hg push %s %s"') % (publicurl, revhint) raise error.Abort(msg, hint=hint) diff -r d6cc7d6123d2 -r 2a9f8b12d062 tests/test-patchbomb.t --- a/tests/test-patchbomb.t Thu Apr 14 14:36:52 2016 +0000 +++ b/tests/test-patchbomb.t Thu Apr 14 14:26:37 2016 +0000 @@ -2899,3 +2899,11 @@ abort: public url $TESTTMP/t3 is missing 3b6f1ec9dde9 (use "hg push $TESTTMP/t3 -r 3b6f1ec9dde9") [255] + +multiple heads are missing at public + + $ hg email --date '1980-1-1 0:1' -t foo -s test -r '2+10' + abort: public "$TESTTMP/t3" is missing ff2c9fa2018b and 1 others + (use "hg push $TESTTMP/t3 -r ff2c9fa2018b -r 3b6f1ec9dde9") + [255] +