Patchwork [2,of,5] strip: use trailing space for strings

login
register
mail settings
Submitter timeless@mozdev.org
Date Oct. 15, 2015, 8:45 p.m.
Message ID <cbd2561e9c3f502c4482.1444941913@waste.org>
Download mbox | patch
Permalink /patch/11115/
State Deferred
Headers show

Comments

timeless@mozdev.org - Oct. 15, 2015, 8:45 p.m.
# HG changeset patch
# User timeless@mozdev.org
# Date 1444849392 14400
#      Wed Oct 14 15:03:12 2015 -0400
# Node ID cbd2561e9c3f502c4482b4f047cf7d6621252e9e
# Parent  85a8a9690f6c7af40f4d01ac1790f13410862541
strip: use trailing space for strings
Matt Mackall - Oct. 19, 2015, 9:58 p.m.
On Thu, 2015-10-15 at 15:45 -0500, timeless@mozdev.org wrote:
> # HG changeset patch
> # User timeless@mozdev.org
> # Date 1444849392 14400
> #      Wed Oct 14 15:03:12 2015 -0400
> # Node ID cbd2561e9c3f502c4482b4f047cf7d6621252e9e
> # Parent  85a8a9690f6c7af40f4d01ac1790f13410862541
> strip: use trailing space for strings

Is there a rationale for this one?

> diff --git a/hgext/strip.py b/hgext/strip.py
> --- a/hgext/strip.py
> +++ b/hgext/strip.py
> @@ -85,8 +85,8 @@
>            ('n', '', None, _('ignored  (DEPRECATED)')),
>            ('k', 'keep', None, _("do not modify working directory
> during "
>                                  "strip")),
> -          ('B', 'bookmark', '', _("remove revs only reachable from
> given"
> -                                  " bookmark"))],
> +          ('B', 'bookmark', '', _("remove revs only reachable from
> given "
> +                                  "bookmark"))],
>            _('hg strip [-k] [-f] [-n] [-B bookmark] [-r] REV...'))
>  def stripcmd(ui, repo, *revs, **opts):
>      """strip changesets and all their descendants from the
> repository
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
timeless - Oct. 20, 2015, 12:27 a.m.
Matt wrote:
>> strip: use trailing space for strings
>
> Is there a rationale for this one?

Mostly consistency.

It /sort/ of helps me while roaming through strings.
There are some rare cases where the next line is in fact being
appended w/o a space.
It's a lot easier to reason by looking at the major string and *know*
(especially when using grep where the next line isn't visible) that
the next line is in fact just more words and not some odd append.

Patch

diff --git a/hgext/strip.py b/hgext/strip.py
--- a/hgext/strip.py
+++ b/hgext/strip.py
@@ -85,8 +85,8 @@ 
           ('n', '', None, _('ignored  (DEPRECATED)')),
           ('k', 'keep', None, _("do not modify working directory during "
                                 "strip")),
-          ('B', 'bookmark', '', _("remove revs only reachable from given"
-                                  " bookmark"))],
+          ('B', 'bookmark', '', _("remove revs only reachable from given "
+                                  "bookmark"))],
           _('hg strip [-k] [-f] [-n] [-B bookmark] [-r] REV...'))
 def stripcmd(ui, repo, *revs, **opts):
     """strip changesets and all their descendants from the repository