[PATCH] clone: update to @ bookmark if it exists
Thomas Arendsen Hein
thomas at intevation.de
Mon Oct 15 08:39:21 CDT 2012
* 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").
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Neuer Graben 17, 49074 Osnabrueck - AG Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
More information about the Mercurial-devel