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


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.


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.


  • How to abandon all Mercurial changes that haven't been committed
  • Is there a tool similar to repo or git-repo for hg/Mercurial?
  • Making a subset of a repository publicly available, whilst keeping history
  • Automatic shelve before pulling in Mercurial (with TortoiseHG)?
  • precommit mercurial hook to stop commits to the wrong branch
  • Difference between a changeset and a patch?
  • Different version of file in Mercurial repo
  • OpenMP for dependent variables
  • Rails 4 order by virtual attribute
  • How to display callstack line numbers when my program is broken in Rust?
  • R Leaflet Legend: specify order instead of alphabetical
  • Spring Web Flow exception handling
  • Gforce min not supported for character in data.table
  • Why not Factory pattern for sorting? [closed]
  • calling a fragment from fragment
  • Entity Framework ObjectContext: Concurrency
  • How can I see a list of all files that are different between two Hg repositories?
  • SQL query to group by maximal sets of a column having inner consecutive distances below a threshold
  • How to get links to open in the native browser in iOS Meteor apps?
  • Can't remove headers after they are sent
  • How can I sort a a table with VBA with given text condition?
  • Is it possible to access block's scope in method?
  • Breeze - Deleted Items nav properties bug
  • Illegal mix of collations for operation for date/time comparison
  • javaw.exe and eclipse startup problems
  • Deserializing XML into class C#
  • Can a Chrome extension content script make an jQuery AJAX request for an html file that is itself a
  • Upload files with Ajax and Jquery
  • Release, debug version and Authorization Google?
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • Rearranging Cells in UITableView Bug & Saving Changes
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • AngularJs get employee from factory
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • Proper way to use connect-multiparty with express.js?
  • Hits per day in Google Big Query
  • need help with bizarre java.net.HttpURLConnection behavior
  • python draw pie shapes with colour filled
  • Does armcc optimizes non-volatile variables with -O0?
  • How to Embed XSL into XML