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

Augie Fackler raf at durin42.com
Wed Jul 24 19:35:32 CDT 2013


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1374712495 14400
#      Wed Jul 24 20:34:55 2013 -0400
# Branch stable
# Node ID fa621aa9fcbf08d19ee83d60ac695275bcb75ffc
# 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,11 @@
 
     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
         dag = graphmod.dagwalker(web.repo, revs)
         tree = list(graphmod.colored(dag, web.repo))
 


More information about the Mercurial-devel mailing list