Mercurial > hg
changeset 18503:7f769d3a8ad2 stable
hgweb: fix navigation label (issue3792)
Latest refactoring (6da1e979340a) was buggy and used a variable from
another loop. Tests are run on repo too small to cache that.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 30 Jan 2013 17:32:17 +0100 |
parents | 68eecbaf1bd3 |
children | d1d5fdcc2d46 |
files | mercurial/hgweb/webutil.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Tue Jan 29 20:03:51 2013 +0100 +++ b/mercurial/hgweb/webutil.py Wed Jan 30 17:32:17 2013 +0100 @@ -91,9 +91,9 @@ if rev not in self._revlog: continue if pos < rev < limit: - navafter.append(("+%d" % f, self.hex(rev))) + navafter.append(("+%d" % abs(rev - pos), self.hex(rev))) if 0 < rev < pos: - navbefore.append(("-%d" % f, self.hex(rev))) + navbefore.append(("-%d" % abs(rev - pos), self.hex(rev))) navafter.append(("tip", "tip"))