odd hg log behavior?

Brendan Cully brendan at kublai.com
Fri Nov 2 00:01:59 CDT 2007


On Thursday, 01 November 2007 at 21:42, j w wrote:
> I'm going through the 'hello' example in hgbook.pdf
> I cloned the repo, now looking at 'hg log', and got this odd behavior
> 
> C:\hello>hg log -r 5:0
> abort: unknown revision '5'!                                     // as expected
> 
> C:\hello>hg log -r 8:0
> changeset:   1:82e55d328c8c                                // huh?
> user:        mpm at selenic.com
> date:        Fri Aug 26 01:21:28 2005 -0700
> summary:     Create a makefile
> 
> changeset:   0:0a04b987be5a
> user:        mpm at selenic.com
> date:        Fri Aug 26 01:20:50 2005 -0700
> summary:     Create a standard "hello, world" program
> 
> 
> Why does specifying 8:0 behave like that?
> I tested this on Windows with 0.9.5, and FreeBSD with 0.9.4, both
> behave the same in this respect.

Because it is a unique prefix of a changeset hash. You could also use
82, 82e, 82e5...

If you add another change that happens to have a hash that starts with
8, this will stop working.



More information about the Mercurial mailing list