[issue3256] log command - max() with branches

Jim bugs at mercurial.selenic.com
Wed Feb 8 22:05:57 UTC 2012


New submission from Jim <mercurial at jimnun.co.uk>:

I would expect the following command to give me the tip most revision on the
branch named Apples but it gives nothing.

hg log -r max(all()) -b Apples

I can use 

hg log -b Apples -l 1
or 
hg log -b Apples -l 1 -r all()

but max() fails to work in the first example.


How best to achieve getting the tip most revision?


Also what order are revisions returned in?

hg log -r branch(Apples) -l 1 
and 
hg log -b Apples -l 1

return the min and max.

It seems you can construct queries using the branch() rather than -b so what
is preferred?

Also rather than -l max()/min()/last()/first() could be used, what preferred
in that case?

Either way you seems to get unexpected results with these examples

----------
messages: 19014
nosy: cubiq4
priority: bug
status: unread
title: log command - max() with branches

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3256>
____________________________________________________



More information about the Mercurial-devel mailing list