[PATCH] log: flag topo-sorted set as such

Yuya Nishihara yuya at tcha.org
Wed May 15 23:24:35 UTC 2019


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1557962120 -32400
#      Thu May 16 08:15:20 2019 +0900
# Node ID 77eb2f52d411836a9f7cadd7b3c7d095945cadcc
# Parent  52c3d16d4c62567e4858ddc8c082443a1f7a2f78
log: flag topo-sorted set as such

This isn't required right now, but revs.istopo() should return True.

diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -750,7 +750,7 @@ def getrevs(repo, pats, opts):
             if not revs.istopo():
                 revs = dagop.toposort(revs, repo.changelog.parentrevs)
                 # TODO: try to iterate the set lazily
-                revs = revset.baseset(list(revs))
+                revs = revset.baseset(list(revs), istopo=True)
         elif not (revs.isdescending() or revs.istopo()):
             revs.sort(reverse=True)
     if expr:


More information about the Mercurial-devel mailing list