Patchwork bookmarks: fix correct command in help text

login
register
mail settings
Submitter hokorobi.hokorobi at gmail.com
Date Dec. 15, 2012, 1:15 p.m.
Message ID <2a0abf67303de557d180.1355577303@hokorobi-PC>
Download mbox | patch
Permalink /patch/119/
State Not Applicable
Headers show

Comments

hokorobi.hokorobi at gmail.com - Dec. 15, 2012, 1:15 p.m.
# HG changeset patch
# User hokorobi <hokorobi.hokorobi at gmail.com>
# Date 1355570183 -32400
# Branch stable
# Node ID 2a0abf67303de557d180992b7c962a3205f73c45
# Parent  ebc0fa067c07808b77f060e285d0c9d8d25c6750
bookmarks: fix correct command in help text
Kevin Bullock - Dec. 15, 2012, 4:45 p.m.
On 15 Dec 2012, at 7:15 AM, hokorobi.hokorobi at gmail.com wrote:

> # HG changeset patch
> # User hokorobi <hokorobi.hokorobi at gmail.com>
> # Date 1355570183 -32400
> # Branch stable
> # Node ID 2a0abf67303de557d180992b7c962a3205f73c45
> # Parent  ebc0fa067c07808b77f060e285d0c9d8d25c6750
> bookmarks: fix correct command in help text
> 
> diff -r ebc0fa067c07 -r 2a0abf67303d mercurial/commands.py
> --- a/mercurial/commands.py	Thu Dec 06 13:21:27 2012 -0600
> +++ b/mercurial/commands.py	Sat Dec 15 20:16:23 2012 +0900
> @@ -770,7 +770,7 @@
>     possible to use :hg:`merge NAME` to merge from a given bookmark, and
>     :hg:`update NAME` to update to a given bookmark.
> 
> -    You can use :hg:`bookmark NAME` to set a bookmark on the working
> +    You can use :hg:`bookmarks NAME` to set a bookmark on the working

`hg bookmark NAME` will work just as well as `hg bookmarks NAME`, because of how hg's command parsing works, and it's more natural in English to write the former ('bookmark' is a verb, meaning "set a bookmark called NAME").

pacem in terris / ??? / ?????? / ????????? / ??
Kevin R. Bullock

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121215/c19d08db/attachment.html>
Yuya Nishihara - Dec. 16, 2012, 6:01 a.m.
On Sat, 15 Dec 2012 10:45:51 -0600, Kevin Bullock wrote:
> On 15 Dec 2012, at 7:15 AM, hokorobi.hokorobi at gmail.com wrote:
> > # HG changeset patch
> > # User hokorobi <hokorobi.hokorobi at gmail.com>
> > # Date 1355570183 -32400
> > # Branch stable
> > # Node ID 2a0abf67303de557d180992b7c962a3205f73c45
> > # Parent  ebc0fa067c07808b77f060e285d0c9d8d25c6750
> > bookmarks: fix correct command in help text
> > 
> > diff -r ebc0fa067c07 -r 2a0abf67303d mercurial/commands.py
> > --- a/mercurial/commands.py	Thu Dec 06 13:21:27 2012 -0600
> > +++ b/mercurial/commands.py	Sat Dec 15 20:16:23 2012 +0900
> > @@ -770,7 +770,7 @@
> >     possible to use :hg:`merge NAME` to merge from a given bookmark, and
> >     :hg:`update NAME` to update to a given bookmark.
> > 
> > -    You can use :hg:`bookmark NAME` to set a bookmark on the working
> > +    You can use :hg:`bookmarks NAME` to set a bookmark on the working
> 
> `hg bookmark NAME` will work just as well as `hg bookmarks NAME`, because of how hg's command parsing works, and it's more natural in English to write the former ('bookmark' is a verb, meaning "set a bookmark called NAME").

It isn't true if ui.strict = True.
If we prefer 'bookmark' over 'bookmarks', IMHO, we shoud provide it as
an alternative command name, i.e. 'bookmarks|bookmark'.

Regards,
Kevin Bullock - Dec. 17, 2012, 4:01 a.m.
On 16 Dec 2012, at 12:01 AM, Yuya Nishihara wrote:

> On Sat, 15 Dec 2012 10:45:51 -0600, Kevin Bullock wrote:
>> On 15 Dec 2012, at 7:15 AM, hokorobi.hokorobi at gmail.com wrote:
>>> # HG changeset patch
>>> # User hokorobi <hokorobi.hokorobi at gmail.com>
>>> # Date 1355570183 -32400
>>> # Branch stable
>>> # Node ID 2a0abf67303de557d180992b7c962a3205f73c45
>>> # Parent  ebc0fa067c07808b77f060e285d0c9d8d25c6750
>>> bookmarks: fix correct command in help text
>>> 
>>> diff -r ebc0fa067c07 -r 2a0abf67303d mercurial/commands.py
>>> --- a/mercurial/commands.py	Thu Dec 06 13:21:27 2012 -0600
>>> +++ b/mercurial/commands.py	Sat Dec 15 20:16:23 2012 +0900
>>> @@ -770,7 +770,7 @@
>>>    possible to use :hg:`merge NAME` to merge from a given bookmark, and
>>>    :hg:`update NAME` to update to a given bookmark.
>>> 
>>> -    You can use :hg:`bookmark NAME` to set a bookmark on the working
>>> +    You can use :hg:`bookmarks NAME` to set a bookmark on the working
>> 
>> `hg bookmark NAME` will work just as well as `hg bookmarks NAME`, because of how hg's command parsing works, and it's more natural in English to write the former ('bookmark' is a verb, meaning "set a bookmark called NAME").
> 
> It isn't true if ui.strict = True.
> If we prefer 'bookmark' over 'bookmarks', IMHO, we shoud provide it as
> an alternative command name, i.e. 'bookmarks|bookmark'.

Huh, all the years I've been using Mercurial, I never knew about that setting. I think you're right, 'hg bookmark' should be valid even with ui.strict on. I've pushed a fix to crew, thanks.

pacem in terris / ??? / ?????? / ????????? / ??
Kevin R. Bullock
Yuya Nishihara - Dec. 17, 2012, 2:49 p.m.
On Sun, 16 Dec 2012 22:01:33 -0600, Kevin Bullock wrote:
> On 16 Dec 2012, at 12:01 AM, Yuya Nishihara wrote:
> 
> > On Sat, 15 Dec 2012 10:45:51 -0600, Kevin Bullock wrote:
> >> On 15 Dec 2012, at 7:15 AM, hokorobi.hokorobi at gmail.com wrote:
> >>> # HG changeset patch
> >>> # User hokorobi <hokorobi.hokorobi at gmail.com>
> >>> # Date 1355570183 -32400
> >>> # Branch stable
> >>> # Node ID 2a0abf67303de557d180992b7c962a3205f73c45
> >>> # Parent  ebc0fa067c07808b77f060e285d0c9d8d25c6750
> >>> bookmarks: fix correct command in help text
> >>> 
> >>> diff -r ebc0fa067c07 -r 2a0abf67303d mercurial/commands.py
> >>> --- a/mercurial/commands.py	Thu Dec 06 13:21:27 2012 -0600
> >>> +++ b/mercurial/commands.py	Sat Dec 15 20:16:23 2012 +0900
> >>> @@ -770,7 +770,7 @@
> >>>    possible to use :hg:`merge NAME` to merge from a given bookmark, and
> >>>    :hg:`update NAME` to update to a given bookmark.
> >>> 
> >>> -    You can use :hg:`bookmark NAME` to set a bookmark on the working
> >>> +    You can use :hg:`bookmarks NAME` to set a bookmark on the working
> >> 
> >> `hg bookmark NAME` will work just as well as `hg bookmarks NAME`, because of how hg's command parsing works, and it's more natural in English to write the former ('bookmark' is a verb, meaning "set a bookmark called NAME").
> > 
> > It isn't true if ui.strict = True.
> > If we prefer 'bookmark' over 'bookmarks', IMHO, we shoud provide it as
> > an alternative command name, i.e. 'bookmarks|bookmark'.
> 
> Huh, all the years I've been using Mercurial, I never knew about that setting. I think you're right, 'hg bookmark' should be valid even with ui.strict on. I've pushed a fix to crew, thanks.

63c3a1921a67 says ui.strict is for future-proof, e.g. somebody can implement
'bookmarksomething' command.

I agree 'bookmark' is more natural. Thanks.

Patch

diff -r ebc0fa067c07 -r 2a0abf67303d mercurial/commands.py
--- a/mercurial/commands.py	Thu Dec 06 13:21:27 2012 -0600
+++ b/mercurial/commands.py	Sat Dec 15 20:16:23 2012 +0900
@@ -770,7 +770,7 @@ 
     possible to use :hg:`merge NAME` to merge from a given bookmark, and
     :hg:`update NAME` to update to a given bookmark.
 
-    You can use :hg:`bookmark NAME` to set a bookmark on the working
+    You can use :hg:`bookmarks NAME` to set a bookmark on the working
     directory's parent revision with the given name. If you specify
     a revision using -r REV (where REV may be an existing bookmark),
     the bookmark is assigned to that revision.
@@ -885,7 +885,7 @@ 
     """set or show the current branch name
 
     .. note::
-       Branch names are permanent and global. Use :hg:`bookmark` to create a
+       Branch names are permanent and global. Use :hg:`bookmarks` to create a
        light-weight bookmark instead. See :hg:`help glossary` for more
        information about named branches and bookmarks.