Patchwork [in,crew] hgweb: fetch tipmost unfiltered rev thru the changelog

login
register
mail settings
Submitter Kevin Bullock
Date Jan. 26, 2013, 2:04 a.m.
Message ID <010d6d3fcfee422f4dd4.1359165886@Slower-Than-Infinity.local>
Download mbox | patch
Permalink /patch/741/
State Accepted
Commit 010d6d3fcfee422f4dd458321c6f540954548d7e
Headers show

Comments

Kevin Bullock - Jan. 26, 2013, 2:04 a.m.
# HG changeset patch
# User Kevin Bullock <kbullock@ringworld.org>
# Date 1359147018 21600
# Branch stable
# Node ID 010d6d3fcfee422f4dd458321c6f540954548d7e
# Parent  1fb9890c55bdb050a7adaceb2aa908040434f6ed
hgweb: fetch tipmost unfiltered rev thru the changelog

This fixes a traceback when tip is filtered (e.g. because it's secret).
See issue3783, for which this is a partial fix.

Patch

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -188,7 +188,7 @@  def changelog(web, req, tmpl, shortlog=F
         if 'rev' in req.form:
             hi = req.form['rev'][0]
         else:
-            hi = len(web.repo) - 1
+            hi = 'tip'
         try:
             ctx = web.repo[hi]
         except error.RepoError: