[bug] incorrect hg log output

Idan Kamara idankk86 at gmail.com
Thu Aug 2 01:55:26 CDT 2012


On Thu, Aug 2, 2012 at 9:39 AM, Alexander Drozdov <al.drozdov at gmail.com> wrote:
>
> Hello!
>
> rev.e410be860393 introduced a bug in revision lookup if revision is
> specified by full 40-digit hex hash.

Thanks for the report. Please submit this to the bug tracker (and cc Bryan):

http://bz.selenic.com/

>
> changeset:   16745:e410be860393
> user:        Bryan O'Sullivan <bryano at fb.com>
> date:        Sat May 12 10:55:08 2012 +0200
> files:       mercurial/parsers.c mercurial/revlog.py
> description:
> revlog: speed up prefix matching against nodes
>
> Example:
> 1. Create mercurial repository with commands:
> hg init
> touch a && hg add a && hg commit -m 'a'
> touch b && hg add b && hg commit -m 'b'
> touch c && hg add c && hg commit -m 'c'
> touch d && hg add d && hg commit -m 'd'
> hg up 1
> touch e && hg add e && hg commit -m 'e'
> touch f && hg add f && hg commit -m 'f'
>
> 2. Update to the latest revision:
> hg up 5
>
> 3. Get revision 2 full hash:
> export FULLREV=`hg log --template "{node}\n" -r 3`
>
> 4. Now test these two commands output. Results should be the same
>    (empty set) but the second command returns revision 3:
> hg log -q -r "3 and ancestor(3,.)"
> hg log -q -r "$FULLREV and ancestor($FULLREV,.)"
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list