Differences between revisions 3 and 4
Revision 3 as of 2010-02-10 03:01:26
Size: 1543
Editor: CgLinden
Comment:
Revision 4 as of 2010-02-10 03:03:19
Size: 1564
Editor: CgLinden
Comment:
Deletions are marked like this. Additions are marked like this.
Line 18: Line 18:
----
CategoryHowTo

Mercurial repositories always contain the complete past history, including all the past branching and merging. The revision history is seldom linear:

https://wiki.secondlife.com/w/images/f/f5/Hg-dag-0.png Image:hg-dag-0.png

Considering the complexity of the revision history, it is a good idea to tag important revisions, for example any revision that was used for a release or some well defined milestone.

Examining the revision history needs to take the nature of the history into account. Unfortunately, the default behavior of "hg log" is not very helpful. It essentially reflects the order in which revisions got appended to the change log file. Fortunately, there are some options to "hg log" which will make examining the revision history easier.

For example, if you wanted to see all changes since v1.0, you'd use:

https://wiki.secondlife.com/w/images/e/e2/Hg-dag-1-since.png Image:hg-dag-1-since.png

A couple of notes:

  • --follow makes it group changes along the branch line, so the changelog output makes more sense. Also, if you have multiple heads, you would only see the ancestors of the specified revision instead of everything except the ancestors of the pruned revision
  • --removed is necessary, since for some reason hg thinks that commits that just remove files are not worth listing.
  • --prune is the important one, it will remove all revisions that are ancestors of the specified one, thereby leaving only those that contribute to tip since the specified one.


CategoryHowTo

ChangesSince (last edited 2010-02-10 03:16:26 by CgLinden)