Patchwork [3,of,3] patchbomb: use single quotes around command hint

login
register
mail settings
Submitter timeless@gcc2-power8.osuosl.org
Date April 14, 2016, 3:26 p.m.
Message ID <802ba0d4f9b958f412d4.1460647588@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/14620/
State Accepted
Commit 7b188bc23942e1f356532c63e181dd5503dc8661
Headers show

Comments

timeless@gcc2-power8.osuosl.org - April 14, 2016, 3:26 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1460646949 0
#      Thu Apr 14 15:15:49 2016 +0000
# Node ID 802ba0d4f9b958f412d4238d63cd375cd797ffd9
# Parent  2a9f8b12d062bf1927da07c545db3c3b357aac1f
# EXP-Topic patchbomb
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r 802ba0d4f9b9
patchbomb: use single quotes around command hint

Windows command lines use double quotes to quote arguments with spaces.
This change is in a series to unify around using single quotes around
commands, and double quotes around interior arguments.
Pierre-Yves David - April 16, 2016, 11:44 p.m.
This one have been separated from the rest of the herd 
(https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-April/083359.html) 
and did not made it into the RC. Should we take it ons table for 
consistency?

On 04/14/2016 08:26 AM, timeless@gcc2-power8.osuosl.org wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1460646949 0
> #      Thu Apr 14 15:15:49 2016 +0000
> # Node ID 802ba0d4f9b958f412d4238d63cd375cd797ffd9
> # Parent  2a9f8b12d062bf1927da07c545db3c3b357aac1f
> # EXP-Topic patchbomb
> # Available At bb://timeless/mercurial-crew
> #              hg pull bb://timeless/mercurial-crew -r 802ba0d4f9b9
> patchbomb: use single quotes around command hint
>
> Windows command lines use double quotes to quote arguments with spaces.
> This change is in a series to unify around using single quotes around
> commands, and double quotes around interior arguments.
>
> diff -r 2a9f8b12d062 -r 802ba0d4f9b9 hgext/patchbomb.py
> --- a/hgext/patchbomb.py	Thu Apr 14 14:26:37 2016 +0000
> +++ b/hgext/patchbomb.py	Thu Apr 14 15:15:49 2016 +0000
> @@ -572,7 +572,7 @@
>                       msg %= (publicurl, missing[0])
>                   revhint = ' '.join('-r %s' % h
>                                     for h in repo.set('heads(%ld)', missing))
> -                hint = _('use "hg push %s %s"') % (publicurl, revhint)
> +                hint = _("use 'hg push %s %s'") % (publicurl, revhint)
>                   raise error.Abort(msg, hint=hint)
>   
>       # start
> diff -r 2a9f8b12d062 -r 802ba0d4f9b9 tests/test-patchbomb.t
> --- a/tests/test-patchbomb.t	Thu Apr 14 14:26:37 2016 +0000
> +++ b/tests/test-patchbomb.t	Thu Apr 14 15:15:49 2016 +0000
> @@ -2874,7 +2874,7 @@
>     $ echo "publicurl=$TESTTMP/t2" >> $HGRCPATH
>     $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep '^#'
>     abort: public url $TESTTMP/t2 is missing 3b6f1ec9dde9
> -  (use "hg push $TESTTMP/t2 -r 3b6f1ec9dde9")
> +  (use 'hg push $TESTTMP/t2 -r 3b6f1ec9dde9')
>     [1]
>   
>   public missing
> @@ -2897,13 +2897,13 @@
>     $ echo 'publicurl=$TESTTMP/t3' >> $HGRCPATH
>     $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10'
>     abort: public url $TESTTMP/t3 is missing 3b6f1ec9dde9
> -  (use "hg push $TESTTMP/t3 -r 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")
> +  (use 'hg push $TESTTMP/t3 -r ff2c9fa2018b -r 3b6f1ec9dde9')
>     [255]
>   
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Yuya Nishihara - April 17, 2016, 12:54 p.m.
On Sat, 16 Apr 2016 16:44:10 -0700, Pierre-Yves David wrote:
> This one have been separated from the rest of the herd
> (https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-April/083359.html)
> and did not made it into the RC. Should we take it ons table for
> consistency?

That makes sense to me.

Patch

diff -r 2a9f8b12d062 -r 802ba0d4f9b9 hgext/patchbomb.py
--- a/hgext/patchbomb.py	Thu Apr 14 14:26:37 2016 +0000
+++ b/hgext/patchbomb.py	Thu Apr 14 15:15:49 2016 +0000
@@ -572,7 +572,7 @@ 
                     msg %= (publicurl, missing[0])
                 revhint = ' '.join('-r %s' % h
                                   for h in repo.set('heads(%ld)', missing))
-                hint = _('use "hg push %s %s"') % (publicurl, revhint)
+                hint = _("use 'hg push %s %s'") % (publicurl, revhint)
                 raise error.Abort(msg, hint=hint)
 
     # start
diff -r 2a9f8b12d062 -r 802ba0d4f9b9 tests/test-patchbomb.t
--- a/tests/test-patchbomb.t	Thu Apr 14 14:26:37 2016 +0000
+++ b/tests/test-patchbomb.t	Thu Apr 14 15:15:49 2016 +0000
@@ -2874,7 +2874,7 @@ 
   $ echo "publicurl=$TESTTMP/t2" >> $HGRCPATH
   $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep '^#'
   abort: public url $TESTTMP/t2 is missing 3b6f1ec9dde9
-  (use "hg push $TESTTMP/t2 -r 3b6f1ec9dde9")
+  (use 'hg push $TESTTMP/t2 -r 3b6f1ec9dde9')
   [1]
 
 public missing
@@ -2897,13 +2897,13 @@ 
   $ echo 'publicurl=$TESTTMP/t3' >> $HGRCPATH
   $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10'
   abort: public url $TESTTMP/t3 is missing 3b6f1ec9dde9
-  (use "hg push $TESTTMP/t3 -r 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")
+  (use 'hg push $TESTTMP/t3 -r ff2c9fa2018b -r 3b6f1ec9dde9')
   [255]