Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View Mercurial log/status with less by default

Is there a way to make mercurial use less to show me the logs/diffs/whatever by default? Now mercurial just displays everything when I type 'hg log'. I suppose I can use aliases like 'hg log = less hg log' if I want to. I'm wondering if there're better solutions.

like image 218
liangzan Avatar asked Oct 25 '09 04:10

liangzan


2 Answers

See the pager extension:

Browse command output using an external pager

It's distributed with mercurial, so you just need to activate it in hgrc.

like image 66
tonfa Avatar answered Nov 14 '22 22:11

tonfa


If you are using less on hg log because it shows the results in reverse order, and therefore the most recent versions scroll off the screen, then you can reverse the order using

hg log -r:

I find this command so useful, yet the colon so unintuitive, I have to look it up here every time

like image 20
David Sykes Avatar answered Nov 14 '22 22:11

David Sykes