[PATCH stable? v2] hgweb: have graphlog show revcount revs with filtered changes (issue3977)

Augie Fackler raf at durin42.com
Wed Jul 24 19:40:21 CDT 2013


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1374712814 14400
#      Wed Jul 24 20:40:14 2013 -0400
# Branch stable
# Node ID 938074a25cb0db01c1a31af5f80556750774649b
# Parent  10a0ae668fe62418b89fc58da26b0f40172266b2
hgweb: have graphlog show revcount revs with filtered changes (issue3977)

Without this change, specifying revcount= on a /graph page on hgweb
didn't correctly handle filtered revisions.

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -888,7 +888,12 @@
 
     tree = []
     if start < end:
-        revs = list(web.repo.changelog.revs(end - 1, start))
+        revs = []
+        while len(revs) < revcount and start >= 0:
+            revs[-1:-1] = list(web.repo.changelog.revs(end - 1, start))
+            end = start
+            start -= revcount
+        revs = revs[:revcount]
         dag = graphmod.dagwalker(web.repo, revs)
         tree = list(graphmod.colored(dag, web.repo))
 


More information about the Mercurial-devel mailing list