manifest: add __next__ methods for Python 3
authorAugie Fackler <augie@google.com>
Sun, 12 Mar 2017 00:43:20 -0500
changeset 31364 91874c247d61
parent 31363 d0014d2d7645
child 31365 28e3471a21ef
manifest: add __next__ methods for Python 3 Python 3 renamed .next() in the iterator protocol to __next__().
mercurial/manifest.py
--- a/mercurial/manifest.py	Sun Mar 12 00:51:00 2017 -0500
+++ b/mercurial/manifest.py	Sun Mar 12 00:43:20 2017 -0500
@@ -123,6 +123,8 @@
         zeropos = data.find('\x00', pos)
         return data[pos:zeropos]
 
+    __next__ = next
+
 class lazymanifestiterentries(object):
     def __init__(self, lm):
         self.lm = lm
@@ -146,6 +148,8 @@
         self.pos += 1
         return (data[pos:zeropos], hashval, flags)
 
+    __next__ = next
+
 def unhexlify(data, extra, pos, length):
     s = data[pos:pos + length].decode('hex')
     if extra: