# HG changeset patch # User Thomas Arendsen Hein # Date 1160985211 -7200 # Node ID 1ae738bacf743a127fdb8750cb80ad1d79a8a9ee # Parent 4e0c08f019b8ee5ccb9a2359e64a550e121f16da Fixed page overlap for file revision links in hgweb. This is another step to fix issue189, but currently the file revision numbers are read as changeset revision numbers, so the link will point to the wrong revision. diff -r 4e0c08f019b8 -r 1ae738bacf74 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Mon Oct 16 09:23:26 2006 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Mon Oct 16 09:53:31 2006 +0200 @@ -310,12 +310,12 @@ fl = fctx.filelog() count = fl.count() pagelen = self.maxshortchanges + pos = fctx.filerev() + start = max(0, pos - pagelen + 1) + end = min(count, start + pagelen) + pos = end - 1 def entries(**map): - pos = fctx.filerev() - start = max(0, pos - pagelen + 1) - end = min(count, start + pagelen) - pos = end - 1 l = [] parity = (count - 1) & 1 @@ -338,7 +338,7 @@ for e in l: yield e - nav = revnavgen(fctx.filerev(), self.maxshortchanges, count) + nav = revnavgen(pos, pagelen, count) yield self.t("filelog", file=f, node=hex(fctx.node()), nav=nav, entries=entries)