Mercurial > hg-stable
changeset 31373:91874c247d61
manifest: add __next__ methods for Python 3
Python 3 renamed .next() in the iterator protocol to __next__().
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 12 Mar 2017 00:43:20 -0500 |
parents | d0014d2d7645 |
children | 28e3471a21ef |
files | mercurial/manifest.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: