Order of commits from hg log?

Giovanni Gherdovich g.gherdovich at gmail.com
Mon Jun 23 17:26:46 UTC 2014


Hi Peter,

On Mon, Jun 23, 2014 at 5:04 PM, Peter Hull <peterhull90 at gmail.com> wrote:
>
> I noticed something odd when trying to get a change log for a subset
> of my repository (which contains merge commits)
> I was typing
> hg log -M -r x:y --style changelog
> and I noticed that -r x:y and -r y:x both gave the same order of
> commits (tip last) whereas without the -r flag it was tip first (as
> expected)

As I understand it, the order in which changesets are shown
is unspecified. And there are many possible: by time, revnumber,
topological.
This allows the revset matching engine to perform query
optimizations, lazy evaluation and all sorts of things.

If you want to enforce an order, you need to use
the sort(set, key) revset function.

cheers,
GGhh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140623/61e25431/attachment-0002.html>


More information about the Mercurial mailing list