hg revert confusion
Emmanuel Mogenet
mgix at mgix.com
Tue Jul 12 19:40:35 UTC 2005
Andrew Thompson wrote:
> George Garvey wrote:
>
>> Introduced a bug in project under hg. The only way I could find to
>> check out old versions was hg clone; followed by hg revert. It appears
>> that hg revert silently changes the working copy with each invocation
>> with a differ rev as option.
>> But: I never could find a way to tell which rev the working copy
>> was, by using hg itself. I just had to know.
>> That's kind of rough. If one finds a working copy, one can tell its
>> tip, but that's about all the state you can know if you don't have a
>> complete history of what commands were run in that dir? (Except for hg
>> status, of course.) Or is there a way to tell what rev it is based on
>> that I can't find?
>
>
> Do these two commands not do what you want?
>
> hg identify
>
> hg update -C <rev>
>
Actually, I have a question about that:
Given that hg is after all a version control tool, if I have a repo
what is the "canonical" way of bringing it back *exactly* to what it was at
a given point in time ?
hg update -C <rev> doesn't do that, as can be verified by:
glint # hg tip
changeset: 678:0cfc5966b2c2f9f78f299c459bd28bd3bbfbb61e
tag: tip
user: Matt Mackall <mpm at selenic.com>
date: Sun Jul 10 18:11:27 2005
summary: Alternate fix for SIGHUP on the other OS
glint # hg update -C 620
glint # hg tip
changeset: 678:0cfc5966b2c2f9f78f299c459bd28bd3bbfbb61e
tag: tip
user: Matt Mackall <mpm at selenic.com>
date: Sun Jul 10 18:11:27 2005
summary: Alternate fix for SIGHUP on the other OS
hg update -C might have reverted the working copy back to version 620,
but my repo still has a tip at 678.
I'd like to re-create the repo *exactly* as it as when the tip was 678.
How do I do that ?
Another way to ask this question : if I have a repo with a tip
at rev 678, how do I branch it off at revision 650 ?
- Emmanuel
More information about the Mercurial
mailing list