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

David M. Carr david at carrclan.us
Mon Oct 15 07:29:10 CDT 2012

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.
> --
> Mathematics is the supreme nostalgia of our time.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

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".

David M. Carr
david at carrclan.us

More information about the Mercurial-devel mailing list