[PATCH 2 of 4] clone to master bookmark if available

Sean Farley sean at mcs.anl.gov
Sun Nov 6 14:35:00 CST 2011


>
> The precedent in Mercurial of course is "default": default path and
> default branch. It's obviously a bit problematic to have both a default
> branch and a default bookmark since they're both in the lookup
> namespace, so perhaps a simple variant of that is needed. We could
> perhaps have a notion of the default bookmark on the default branch, ie
> default/default'.
>

I agree that I like the "default" naming scheme better (and it keeps it
more in line with the current mercurial names).


> Also, I think that there are some other loose ends with bookmarks that
> need to be tied up before we get too far thinking about this.
>
> For instance, Alice clones Bob's bookmark B. Alice and Bob both commit
> and advance B. Now when Alice pulls, she gets a warning that her B
> bookmark is 'divergent'. Now Alice has an extra head but only one
> bookmark (her own). This works fine if she now has only two heads on her
> branch: merge picks the right one, then B points to the merge and push
> pushes it.
>
> But if her current branch already had several heads, 'hg merge' won't
> have a default choice, nor will 'hg merge B' do anything useful. She may
> end up merging with the wrong head and then push will refuse to move B
> on the server. And if B is actually your 'master' concept, things are
> now a bit messy.
>
> ..which all suggests we need to figure out a nice way to track multiple
> bookmarks of the same name first. Git does this with a "namespace"
> notion, which is one possibility.


I would like this. Correct me if I'm wrong, but I believe this would be
similar to what I was asking about in another thread with the whole "by
default don't offer heads (either by 'hg heads' or 'hg merge') that aren't
on the same bookmark."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20111106/1795b8fc/attachment.html>


More information about the Mercurial-devel mailing list