2

When I use hg log -l 5 I get the last 5 changesets. When I use hg log -l 5 -u goldberg, I get my last 5 changesets. But when I use hg log -r 'user(goldberg)' -l 5, I get my first 5 changesets. If I want to do any complex search, I'm stuck with -r, which always gives me the first changesets when I limit with -l.

Is there a way to get -r to provide a last-to-first set so that I can use it with -l/--limit to get the latest relevant changes?

This question is pertinent but doesn't get at the difference between these cases

Community
  • 1
  • 1
Joshua Goldberg
  • 5,059
  • 2
  • 34
  • 39

1 Answers1

4

You don't even need -l when using revsets:

hg log -r 'limit(reverse(user(goldberg)), 5)'

(This works on 2.0 at least, I don't know about older versions.)

Cat Plus Plus
  • 125,936
  • 27
  • 200
  • 224