diff mercurial/patch.py @ 35202:a1d2fc32bb99

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
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 20 Nov 2017 23:13:09 -0800
parents 1706eae096e2
children 6ba79cf34f5e
line wrap: on
line diff
--- 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 = []