diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -570,7 +570,7 @@ def email(ui, repo, *revs, **opts): 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 --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t --- a/tests/test-patchbomb.t +++ b/tests/test-patchbomb.t @@ -2899,3 +2899,11 @@ node missing at public 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] +