Working with Mercurial’s Bookmark Feature Essay

Working with Mercurial's Bookmark Feature


Bookmarks - Mercurial


Working together with Mercurial's save feature.


1 .

2 .






Dealing with bookmarks

Shifting bookmarks

Example usage

Dealing with remote databases

See also

1 . Overview

Bookmarks will be references to commits which can be automatically up to date when new commits are created. If you work hg save feature, the feature take a note of refers to the current changeset. As you may work and commit alterations the bookmark will progress with every make you do. The bookmark will always point to the latest revision in your line of job.

Bookmarks can be utilized as an alternative to NamedBranches for traffic monitoring multiple lines of advancement. Systems like Mercurial, CVS, and Agitation, destabilization store their particular branch info as a everlasting part of every single commit. This is certainly useful for long term auditing of longlived branches, as it is advisable to possible to spot which part a commit was released on. Git, by contrast, features " branches" that are not kept in history, which can be useful for working with numerous unsuccsefflull feature twigs, but makes future auditing impossible. Mercurial's bookmark feature is similar to Git's branching plan, but may also be used in conjunction with Mercurial's traditional named branches.

2 . Working with social bookmarks

Bookmarks could be active or inactive. Just a single bookmark can be effective at any given time, and only a save that points to the current revising can be active. Mercurial only tracks and updates the currently lively bookmark (if there is any). This is a lot like Git's method of branching and can be used to repeat the traditional Git branching work flow.

When a bookmark is created it truly is active by default, but an sedentary bookmark could be created by simply passing the --inactive (or -i) flag. The at present active save can be inactivated by doing hg take a note of --inactive. A given bookmark can be activated by simply updating to that particular bookmark (e. g. hg update --rev feature improvements to the modification pointed to by feature and stimulates the characteristic bookmark while well). Note that updating into a revision that has a bookmark without using the save name will never activate the bookmark (e. g. in case the feature bookmark points to revising #20 therefore you do



Bookmarks - Mercurial

hg update --rev 20 the feature bookmark will not be activated). Since active bookmarks are automatically up-to-date when investing in the changeset they are pointing to, they may be especially helpful to keep track of several heads. They will therefore be used for trying out new features or perhaps pulling alterations that have but to be analyzed. Bookmarks may be used to access the commit each time a usual search is allowed (wherever a command requires -r version, revision can be quite a bookmark name), therefore you may merge boost bookmarks by way of a names. In case the new features don't work out, advancement can be re-started from a classic changeset. Notice however that while bookmarks could be deleted applying hg take a note of -delete characteristic, this simply removes the bookmark characteristic, not all of the changes it take into account. The unnecessary changes will stay in the database. The book marked head could be stripped (using hg strip, supplied with the mq extension).

3. Transferring bookmarks

Bookmarking are trapped in an untracked file known as. hg/bookmarks. They can be not part of committed adjustments but they may be transferred among repositories using the pushkey process.

When you identical copy a database, all remote control bookmarks will be transferred. Even so only bookmarks that are present on both the local plus the remote databases are up-to-date on force. This is completed keep your local bookmarks neighborhood until you manually submit them. Since Mercurial installment payments on your 3, almost all remote social bookmarks are updated on pull. Prior to that, only social bookmarks present on both the regional and distant repositories had been updated about pull. If there is a divergence between distributed remote and native bookmarks, Mercurial will indicate...