Patchwork [1,of,7] graft: use double quotes for arguments

login
register
mail settings
Submitter timeless@mozdev.org
Date April 4, 2016, 9:31 a.m.
Message ID <e98a5f3fac5f0fd72fbf.1459762287@waste.org>
Download mbox | patch
Permalink /patch/14335/
State Accepted
Headers show

Comments

timeless@mozdev.org - April 4, 2016, 9:31 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1452591024 0
#      Tue Jan 12 09:30:24 2016 +0000
# Node ID e98a5f3fac5f0fd72fbf38bc410a55a97790fa31
# Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
graft: use double quotes for arguments
via Mercurial-devel - April 4, 2016, 3:48 p.m.
On Mon, Apr 4, 2016 at 2:31 AM, timeless <timeless@mozdev.org> wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1452591024 0
> #      Tue Jan 12 09:30:24 2016 +0000
> # Node ID e98a5f3fac5f0fd72fbf38bc410a55a97790fa31
> # Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
> graft: use double quotes for arguments

Where's the motivation for this? Was there some discussion elsewhere?
Is this one of few outliers (so this is for consistency)?

>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -4026,7 +4026,7 @@
>
>        - show revisions sorted by date::
>
> -          hg log -r 'sort(all(), date)'
> +          hg log -r "sort(all(), date)"
>
>      See :hg:`help revisions` and :hg:`help revsets` for more about
>      specifying revisions.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Matt Harbison - April 6, 2016, 2:51 a.m.
On Mon, 04 Apr 2016 11:48:50 -0400, Martin von Zweigbergk via  
Mercurial-devel <mercurial-devel@mercurial-scm.org> wrote:

> On Mon, Apr 4, 2016 at 2:31 AM, timeless <timeless@mozdev.org> wrote:
>> # HG changeset patch
>> # User timeless <timeless@mozdev.org>
>> # Date 1452591024 0
>> #      Tue Jan 12 09:30:24 2016 +0000
>> # Node ID e98a5f3fac5f0fd72fbf38bc410a55a97790fa31
>> # Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
>> graft: use double quotes for arguments
>
> Where's the motivation for this? Was there some discussion elsewhere?
> Is this one of few outliers (so this is for consistency)?

You can't use single quotes in cmd.exe.  See be7ef03d7fb6.  I didn't  
methodically look for other problems at the time.

>>
>> diff --git a/mercurial/commands.py b/mercurial/commands.py
>> --- a/mercurial/commands.py
>> +++ b/mercurial/commands.py
>> @@ -4026,7 +4026,7 @@
>>
>>        - show revisions sorted by date::
>>
>> -          hg log -r 'sort(all(), date)'
>> +          hg log -r "sort(all(), date)"
>>
>>      See :hg:`help revisions` and :hg:`help revsets` for more about
>>      specifying revisions.
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel@mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Martijn Pieters - April 6, 2016, 2:41 p.m.
On 6 April 2016 at 03:51, Matt Harbison <mharbison72@gmail.com> wrote:
> You can't use single quotes in cmd.exe.  See be7ef03d7fb6.  I didn't
> methodically look for other problems at the time.

Should this perhaps be added to the styleguide / code check test then?
timeless - April 6, 2016, 2:47 p.m.
[PATCH 6 of 7] docchecker: try to reject single quotes
On Apr 6, 2016 10:42 AM, "Martijn Pieters" <mj@zopatista.com> wrote:

> On 6 April 2016 at 03:51, Matt Harbison <mharbison72@gmail.com> wrote:
> > You can't use single quotes in cmd.exe.  See be7ef03d7fb6.  I didn't
> > methodically look for other problems at the time.
>
> Should this perhaps be added to the styleguide / code check test then?
>
> --
> Martijn Pieters
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
Martijn Pieters - April 6, 2016, 3:34 p.m.
On 6 April 2016 at 15:47, timeless <timeless@gmail.com> wrote:
> [PATCH 6 of 7] docchecker: try to reject single quotes


Ah, my bad.
via Mercurial-devel - April 6, 2016, 6:03 p.m.
On Tue, Apr 5, 2016 at 7:51 PM, Matt Harbison <mharbison72@gmail.com> wrote:
> On Mon, 04 Apr 2016 11:48:50 -0400, Martin von Zweigbergk via
> Mercurial-devel <mercurial-devel@mercurial-scm.org> wrote:
>
>> On Mon, Apr 4, 2016 at 2:31 AM, timeless <timeless@mozdev.org> wrote:
>>>
>>> # HG changeset patch
>>> # User timeless <timeless@mozdev.org>
>>> # Date 1452591024 0
>>> #      Tue Jan 12 09:30:24 2016 +0000
>>> # Node ID e98a5f3fac5f0fd72fbf38bc410a55a97790fa31
>>> # Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
>>> graft: use double quotes for arguments
>>
>>
>> Where's the motivation for this? Was there some discussion elsewhere?
>> Is this one of few outliers (so this is for consistency)?
>
>
> You can't use single quotes in cmd.exe.  See be7ef03d7fb6.  I didn't
> methodically look for other problems at the time.

Thanks. I'll add that to the commit message in flight of the first 3
and queued them, thanks. I would appreciate if the commit messages
included a bit about the "why" in the future.

>
>
>>>
>>> diff --git a/mercurial/commands.py b/mercurial/commands.py
>>> --- a/mercurial/commands.py
>>> +++ b/mercurial/commands.py
>>> @@ -4026,7 +4026,7 @@
>>>
>>>        - show revisions sorted by date::
>>>
>>> -          hg log -r 'sort(all(), date)'
>>> +          hg log -r "sort(all(), date)"
>>>
>>>      See :hg:`help revisions` and :hg:`help revsets` for more about
>>>      specifying revisions.
>>> _______________________________________________
>>> Mercurial-devel mailing list
>>> Mercurial-devel@mercurial-scm.org
>>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>>
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel@mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4026,7 +4026,7 @@ 
 
       - show revisions sorted by date::
 
-          hg log -r 'sort(all(), date)'
+          hg log -r "sort(all(), date)"
 
     See :hg:`help revisions` and :hg:`help revsets` for more about
     specifying revisions.