changeset 28907:66e647312d30

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
author timeless <timeless@mozdev.org>
date Thu, 14 Apr 2016 14:26:37 +0000
parents ac1bb8ca6d39
children 7a772deffa12
files hgext/patchbomb.py tests/test-patchbomb.t
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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]
+