py3: define __next__ in patch.py
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 20 Nov 2017 23:13:09 -0800
changeset 35191 a1d2fc32bb99
parent 35190 bd8875b6473c
child 35192 d8d06a930d60
py3: define __next__ in patch.py This needed to appease Python 3's iterator protocol. This is crasher #5 in Python 3. Differential Revision: https://phab.mercurial-scm.org/D1480
mercurial/patch.py
--- a/mercurial/patch.py	Mon Nov 20 23:02:32 2017 -0800
+++ b/mercurial/patch.py	Mon Nov 20 23:13:09 2017 -0800
@@ -149,6 +149,8 @@
                 raise StopIteration
             return l
 
+        __next__ = next
+
     inheader = False
     cur = []