bookmarks and branches again: files

Kevin Bullock kbullock+mercurial at ringworld.org
Wed Jul 13 15:03:52 UTC 2016


> On Jul 13, 2016, at 08:30, Uwe Brauer <oub at mat.ucm.es> wrote:
> 
> However I have also to maintain matlab mode for emacs, which dwells in
> sourceforge and in github. These are under git control and I use the hg
> plugin to access them. So far I have not used any branching but if I
> would, I should use bookmarks.
> 
> Bookmarks however frighten me for the reason that on can accidentally
> delete them. So my question were mostly academic I wanted to see the
> dangers of bookmarks and how to encounter them.

Unlike Git, when you delete a bookmark, the commit doesn't go anywhere. This is true even in local clones of Git repos via hg-git.

Mercurial will not stop you from deleting a bookmark—even if there is no other label on that commit—because deleting the bookmark is not dangerous. Nonetheless it strikes me that there's no "accidental" way to delete a bookmark: you have to type `hg bookmark -d MARK`.

But yes, bookmarks are deliberately ephemeral labels. That's why we have the more traditional named branches that are a permanent part of repo history.

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




More information about the Mercurial mailing list