[PATCH] clone: update to @ bookmark if it exists

David M. Carr david at carrclan.us
Mon Oct 15 10:34:36 CDT 2012


On Mon, Oct 15, 2012 at 10:56 AM, Sean Farley
<sean.michael.farley at gmail.com> wrote:
> On Mon, Oct 15, 2012 at 9:10 AM, David M. Carr <david at carrclan.us> wrote:
>> On Mon, Oct 15, 2012 at 9:39 AM, Thomas Arendsen Hein
>> <thomas at intevation.de> wrote:
>>> * David M. Carr <david at carrclan.us> [20121015 14:29]:
>>>> On Fri, Oct 12, 2012 at 4:08 PM, Matt Mackall <mpm at selenic.com> wrote:
>>>> > On Tue, 2012-08-28 at 10:51 -0500, Kevin Bullock wrote:
>>>> >> # HG changeset patch
>>>> >> # User Kevin Bullock <kbullock at ringworld.org>
>>>> >> # Date 1332366819 18000
>>>> >> # Node ID 579afc1a4378a55f64f6fd185f3de40da5bfbb4a
>>>> >> # Parent  99a2a4ae35e2180b7f825ef2677c36d538eac4ba
>>>> >> clone: update to @ bookmark if it exists
>>>> >
>>>> > Queued, thanks. Lots of people seem to be choosing bookmark-based
>>>> > workflows, having a default bookmark seems unavoidable.
>>>
>>> At first I thought "Good news", but I guess when cloning the crew
>>> repository the user would expect the crew bookmark to be checked
>>> out. Or should the bookmark "crew" be replaced by "@"? If you pull
>>> from crew you will get "@@crew" (or "@crew", see below).
>>>
>>> And the stable repositories (hg-stable, crew-stable) could have the
>>> @ bookmark to the tip of the stable branch while being identical to
>>> the default repos otherwise.
>>>
>>>> If the @ bookmark is divergent when pulling from remote "foo", do we
>>>> want the divergent bookmark stored as "@foo" or "@@foo"?  The code
>>>> currently appears to be using "@@foo".  I think that the double @ sign
>>>> looks sort of weird and would have expected the other behavior.
>>>>
>>>> I suppose the argument in favor of the double @ sign in this case is
>>>> that it's more consistent.  Whatever the bookmark name is, you append
>>>> an @ sign to express that it's a divergent bookmark, and then include
>>>> an identifier to distinguish which remote it refers to.  Reading
>>>> "@foo" with that mindset would tell you that it's a divergent ""
>>>> (empty string) bookmark for the remote "foo", which isn't accurate.
>>>>
>>>> That being said, I don't think most users will think it through like
>>>> that.  They'll see the double @ sign and assume it's a bug without
>>>> further thought.  I think that "@foo" is a perfectly fine way to
>>>> represent the concept of "the default bookmark at the remote foo".
>>>
>>> Whatever we do, @@foo should be accepted by update/--rev for the
>>> consistency arguments you mentioned above.
>>>
>>> Providing a shorter form that is easier to the eyes might not be
>>> easier for the brain (really nothing at foo?) or when talking about it
>>> ("Sorry, I did not understand what you said which bookmark @foo you
>>> meant, I just heard @foo").
>>
>> For talking about it, I don't think either is particularly good.  For
>> comparison, let's try out some sentences, in this case using
>> "feature-foo" as a normal bookmark name and "upstream" as a remote
>> name:
>> - Normal Bookmark: When you pull from upstream, feature foo will
>> diverge.  To resolve that, merge with feature foo at upstream.
>> - @ with @@ behavior: When you pull from upstream, at will diverge.
>> To resolve that, merge with at at upstream.
>> - @ with @ behavior: When you pull from upstream, at will diverge.  To
>> resolve that, merge with at upstream.
>>
>> They both sound pretty nonsensical to me.  If our goal is to have it
>> make sense in conversation, I think we'd be better off calling the
>> default bookmark "default-bookmark" instead of "@".  I'm not
>> suggesting "default" so that we at least have some difference between
>> the name of the default branch and the default bookmark.  With
>> "default-bookmark", I these sentences might go:
>>
>> When you pull from upstream, [the] default bookmark will diverge.  To
>> resolve that, merge default bookmark at upstream.
>
> After playing with the '@' bookmark for the last week or so, it does
> seem a little off in name. I like David's suggestion about
> default-bookmark but since 'default' is already taken, could we:
>
> 1) call the default bookmark 'main'?
>
> or
>
> 2) put in special code for having the name 'default' be used as the
> default bookmark?
>
> I think (2) has already been discussed but can't find the reference
> thread off the top of my head.

I think this is the thread where (2) was discussed before.  In that
conversation, the proposed patch used the name "master".

http://markmail.org/message/ibuagzemunq4kdlz#query:+page:1+mid:5kn5joi7t5q2euvr+state:results

-- 
David M. Carr
david at carrclan.us


More information about the Mercurial-devel mailing list