Bookmarks, a.k.a. local branches in MercurialEclipse

Had I known yesterday that I would have another feature to blog about, I’d have skipped the previous post and put it all together in this…

Screenshot of Bookmark dialog, create tab

Anyway, a new feature is now available in the current development version of MercurialEclipse, the Mercurial team plug-in for Eclipse: So called bookmarks.

The functionality is provided by the bookmarks extension, distributed together with Mercurial versions that are newer than 24.10.2008. So what are bookmarks? Have you heard of the complaint that Mercurial can’t do deleteable named branches within one clone? Don’t you want to clone to create a branch? Then the bookmark extension could be the solution for you. But keep in mind that bookmarks do not propagate to remote repositories. They are only available on your machine.

Bookmarks are pointers to specific heads. As with git local branches, they move with each commit and always point at the head. Update: There’s a nice introduction available at the blog of the extension’s author if you want to read more about the extension.

The dialog tab in the screenshot above allows you to create such bookmarks. If nothing is selected, it just sets the new bookmark to the tip revision. If you select a revision – I trust, you get it…

Contrary to named branches, bookmarks are local only and therefore aren’t under source control. This means, you can modify them as much as you like. Below you see our interface for renaming or deleting bookmarks.

Screenshot of Bookmark dialog, modify tab

Working with bookmarks is like using branches. On the command line you can use it wherever a revision needs to be specified. So we’ve extended our “Update to different changeset dialog…” to include bookmarks. The new tab looks like this:

Screenshot of UpdateToChangeset dialog, bookmark tab

Okay, that’s it for now. The next post about this follows when new features are available.

VN:F [1.9.17_1161]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Verwandte Artikel:

  1. Upcoming improvements of the Mercurial Bookmarks extension
  2. Rebase and subversion support in MercurialEclipse
  3. GSoC students wanted!

Comments (2)

dspNovember 19th, 2008 at 02:06

Wow. Man that’s great. Thanks for pushing the extension by providing a graphical interface. Great!

VA:F [1.9.17_1161]
Rating: 0.0/5 (0 votes cast)
VA:F [1.9.17_1161]
Rating: 0 (from 0 votes)
Bastian DoetschNovember 19th, 2008 at 08:03

You’re welcome. After I had understood the concept, I realized that this might become one of the most used Mercurial extensions, as all people always seem to complain about a lack of local branches. So it obviously needed a GUI :).

VN:F [1.9.17_1161]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)