How to make mercurial sort the output of `hg log` by commit date?

Viewed 628

How can I make mercurial order the output of hg log by commit date?

The output seems to be ordered by the date I pull the commits into my repository instead of when they were committed.

1 Answers

You need to use a revset:

$ hg log -r 'sort(all(), date)'

If you want to see the most recent commits first, do:

$ hg log -r 'sort(all(), -date)'

See hg help -v revsets for more details.

Related