Automatically create `@' bookmark on hg init

Kevin Bullock kbullock+mercurial at ringworld.org
Mon Apr 22 16:47:32 UTC 2013


On Apr 22, 2013, at 12:25 AM, Yawar Amin wrote:

> Hi,
> 
> I've been thinking about better unifying Mercurial's bookmarks with the more well-known named branches and one obstacle I see is that when we first create a bookmark and start committing on it, that head takes the `default' (or whatever) named branch forward along with it so it's difficult to figure out where we started off from. My suggestion: create the `@' bookmark with every new repo created with `hg init'. This way you always have the `@' to come back to when you want to start another topic bookmark separate from others. And if you never use bookmarks, the `@' bookmark just moves along with your `default' branch's original head and doesn't affect anything.
> 
> In effect, we cement `@' as the equivalent to git's `master'.
> 
> I don't see that this would require any changes to Mercurial storage/transfer protocols or would affect existing users.

It would introduce bookmarks into the formerly simple cases, so I think it's a non-starter. But I have some thoughts on a similar approach (independent of the '@' bookmark) that you might be interested in: <http://mercurial.selenic.com/wiki/BookmarksPlan#Introducing_Bookmarks_Into_Your_Workflow>

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock




More information about the Mercurial mailing list