tags:

views:

45

answers:

1

In Mercurial, what is the command to say

1) make all my files as of two months ago (say, April 16, 6:03pm) (Revision 328 as seen from the hg log)
2) or, make my files back to the most current repository version?

+3  A: 

hg update --rev 328 will make you current working copy look like it did at revision 328.

So long as you don't check in anything hg update -r tip will take to back to most current revision.

If you do make changes you'll now have to deal with two branches. The old current head and the head you just created when you checked in at the old revision.

caspin
it seems that "hg update -r -1" works the same as "tip" (because -1 means last or "most recent")? And is the only way to see what version you have by using "hg parents"? thanks.
動靜能量
The working copy revision can be queried by 'hg id'.
Rudi