Patchwork hgweb: replace next(revs) to revs.next() to fix compatibility with Python 2.5-

login
register
mail settings
Submitter Alexander Plavin
Date July 25, 2013, 12:46 p.m.
Message ID <669e01814c89a0deb1f9.1374756386@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/1958/
State Accepted
Commit 81318ca090a2d5e66942b60ed28b33450bfc881a
Headers show

Comments

Alexander Plavin - July 25, 2013, 12:46 p.m.
# HG changeset patch
# User Alexander Plavin <me@aplavin.ru>
# Date 1374751661 -14400
#      Thu Jul 25 15:27:41 2013 +0400
# Branch stable
# Node ID 669e01814c89a0deb1f9d8ad48c1483e363c9a68
# Parent  3ac1735a2265a1f0d0f5ea47a5e428e09c8b581d
hgweb: replace next(revs) to revs.next() to fix compatibility with Python 2.5-

Patch

diff -r 3ac1735a2265 -r 669e01814c89 mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py	Thu Jul 25 02:44:27 2013 -0500
+++ b/mercurial/hgweb/webcommands.py	Thu Jul 25 15:27:41 2013 +0400
@@ -204,7 +204,7 @@ 
         if pos != -1:
             revs = web.repo.changelog.revs(pos, 0)
         if latestonly:
-            revs = (next(revs),)
+            revs = (revs.next(),)
         curcount = 0
         for i in revs:
             ctx = web.repo[i]