[PATCH 2 of 3 V3] exchange: add hooks before and after bookmark pull

Ryan McElroy rm at fb.com
Fri Dec 12 15:25:49 CST 2014


I have an idea that might please everyone. Check it out!

First, go back to having sharing bookmarks be optional. Second enable it by default for new shared repositories, but don't turn it on for already-shared repositories. This way, a user upgrading won't suddenly be sharing their bookmarks when they weren't before, but new shares will get the expected behavior of sharing bookmarks. I think that makes the default in a way to satisfy Pierre-Yves, but makes sure we don't break the situation Matt outlined.

What do y'all think about this as a solution that solves the main concerns?

Thanks,

~Ryan

> -----Original Message-----
> From: Pierre-Yves David [mailto:pierre-yves.david at ens-lyon.org]
> Sent: Monday, December 8, 2014 3:47 PM
> To: Matt Mackall; Ryan McElroy
> Cc: mercurial-devel at selenic.com
> Subject: Re: [PATCH 2 of 3 V3] exchange: add hooks before and after
> bookmark pull
> 
> 
> 
> On 12/04/2014 04:23 PM, Matt Mackall wrote:
> > I'm also not sold on sharing bookmarks by default.
> 
> I see: `hg share xxx` as parallel with `hg clone xxx` and we changed `hg
> clone` and `hg pull` to take all bookmarks by default.
> 
> (side note: `hg share xxx` does bring bookmark along as hg clone do, I
> see this as bug that could be easily fixed)
> 
> > My concern is that people might for instance want to do / be already doing
> something like:
> >
> > /home/user/pub-repo <- has the public bookmarks, shared with hgweb
> > /home/user/prv-repo <- shared copy with private bookmarks and secret
> > csets
> >
> > ..and be sad when their private bookmarks get out. I don't think I've
> > seen anyone make a counterargument to that yet.
> 
> Bookmark on secret changesets should not get out of the repo. So it
> should be fine.
> 
> I think it is very disturbing to see changesets created/moving around
> without the associated bookmarks. I think we have more current users of
> share that give up on bookmarks (or get bitten) for this reason than
> users that rely on the current behavior.
> 
> Bookmarks have been a core concept for years, but yet they struggle to
> get widespread confidence because they broke expectations in a lot of
> ways, feeling like a 1.5 class citizen (yes, I know, evolve is part of
> that). I feel like we need to push them more as a first class concept.
> 
> We already did some heavy backward compat breakage when we moved to
> exchange all bookmark by default on clone and pulls. I see this as a
> similar move (breaking less people) adding more consistency.
> 
> Maybe a middle ground is to have good "local" namespace in a remote
> bookmark worlds ?
> 
> --
> Pierre-Yves David


More information about the Mercurial-devel mailing list