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

login
register
mail settings
Submitter Augie Fackler
Date July 25, 2013, 12:35 a.m.
Message ID <fa621aa9fcbf08d19ee8.1374712532@augie-macbookair>
Download mbox | patch
Permalink /patch/1955/
State Superseded, archived
Headers show

Comments

Augie Fackler - July 25, 2013, 12:35 a.m.
# HG changeset patch
# User Augie Fackler <raf@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.

Patch

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))