Bookmarks: don't push local bookmark heads by default?

Augie Fackler raf at durin42.com
Mon Jun 4 08:46:37 CDT 2012


On Jun 2, 2012, at 4:16 PM, Matt Mackall wrote:

> Right now when we push, we push all heads. But we don't automatically
> propagate bookmarks so that users can keep a local namespace.
> 
> In some cases, this is fine. If Alice creates a new head on a branch and
> puts a bookmark on it, push will refuse to push it without -f and she
> can then push just the head she wants.
> 
> But if Alice instead creates a bookmark and makes several commits on the
> tip of default, then pushes, the remote server will now have Alice's
> bookmarked commits on default and people will automatically update to
> those commits. Which means it's not making it very easy for Alice to
> make a "local branch". 
> 
> (Closely related is case 3 here:
> http://mercurial.markmail.org/thread/73jkexbdfuuuzv3e )
> 
> One possibility is that when an outgoing head has a bookmark that's
> local-only, we treat the commits as local-only as well and refrain from
> pushing it. This lets Alice make a private bookmark branch without
> needing to worry about it getting pushed by accident.
> 
> Upsides:
> 
> - no more need for manually specifying heads to push
> - no misguided push -f catastrophes
> 
> Downsides:
> 
> - significant change that might surprise people (though not ruled out
> insofar as the current behavior could be considered buggy)
> - might quietly prevent some who has a local bookmark on their named
> branch head today for some reason from pushing (more worrisome)

This strikes me as the only potential downside, and I can't come up with a need this would actually solve. I use a 'queued' bookmark for my queued hgsubversion patches, but I always push with '-r queued' because I have "secret" changes (unfinished patch series) on that repository.

This sounds like an improvement to me, especially with the way I use bookmarks.


> - bookmarks only mark one end of a line of development, so if Alice
> makes a "real" commit followed by two bookmarked ones, the real one will
> be hidden from push
> - some overlap with secret phases functionality
> 
> Another alternative, pushing "local" bookmarks always, is probably off
> the table as it means anyone who is depending on having a private
> namespace today gets a nasty surprise on upgrade.
> 
> Thoughts?
> 
> -- 
> Mathematics is the supreme nostalgia of our time.
> 
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list