Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are just switching to Mercurial where I work this week. I'm starting to read material, and was hoping somebody could succinctly answer this question:

What's the difference between Mercurial's "tip" tag and the "default" branch?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

tip can be on a different branch than default.

hg uses the latest revision your "-r somewhat" matches. if somewhat is a branch, it updates to its latest head. if somewhat is a tag it updates to the revision this tag is associated with.

share|improve this answer
add comment

Tip is the most recent changeset in the repository. Default is a branch. Tip is a special Tag (a named changeset) which always refers to the most recently changed Head.

share|improve this answer
5  
So does this mean that tip will move around from one branch to another as people push changesets on different branches? If so, what's the point of it, since you can't rely on it being in any one place? Thanks! –  Jonathan Hartley Nov 22 '10 at 20:40
1  
True, I can't think of any usecases for Tip aside from checking how old my repo is or sharing the id of my tip when talking with other developers. Also as giszmo points out, hg update -r tip is a quick way to get to the newest code regardless of branch. –  Dan R Nov 22 '10 at 21:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.