Hg update should prefer heads without bookmarks

cowwoc cowwoc at bbs.darktech.org
Fri May 29 18:31:20 UTC 2015


On 29/05/2015 1:29 PM, Matt Mackall [via Mercurial] wrote:
> On Wed, 2015-05-27 at 11:14 -0700, cowwoc wrote:
> > Hi,
> >
> > Following up on this old discussion:
> > http://www.kevinberridge.com/2012/05/hg-bookmarks-made-me-sad.html
> >
> > Is there a way to configure a Mercurial repository so that 
> client-side "hg
> > clone <repo>" and "hg pull -u" resolve to the latest changeset on the
> > "default" branch not containing a bookmark?
>
> You could create a post-clone hook. But you should probably investigate
> using the @ bookmark if you're using any bookmarks. It plays the same
> role for bookmarks as default does for branches.

This works great. Me so happy! :)

I guess all that's left is to improve the documentation. If you Google 
"Mercurial bookmarks" there is virtually no mention that @ is the 
bookmark-equivalent of the "default" branch. The only mention I found is 
buried at the bottom of https://mercurial.selenic.com/wiki/Bookmarks, 
and this was only added yesterday.

Based on the first result page returned by Google, I suggest:

  * Adding a discussion of bookmarks to http://hgbook.red-bean.com/
    (they don't seem to be mentioned at all)
  * Featuring this information more prominently on
    https://mercurial.selenic.com/wiki/Bookmarks
  * Mentioning this on https://mercurial.selenic.com/wiki/Branch section
    2 alongside the "default branch" definition.
  * Updating
    http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/
    section bookmarks
  * Updating
    http://www.kevinberridge.com/2012/05/hg-bookmarks-made-me-sad.html
    section "Hg up should prefer heads without bookmarks" because it is
    no longer true
  * Updating
    http://draketo.de/light/english/mercurial/complete-branching-strategy#fn:bookmarks
    because it is no longer true

For my part, I've posted a self-answered question on Stackoverflow: 
http://stackoverflow.com/q/30536648/14731

Hopefully this will help others.

Thanks,
Gili




--
View this message in context: http://mercurial.808500.n3.nabble.com/Hg-update-should-prefer-heads-without-bookmarks-tp4023171p4023329.html
Sent from the General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20150529/6c9c5d54/attachment-0002.html>


More information about the Mercurial mailing list