mercurial/patch.py
changeset 35311 12ce62c72c24
parent 35310 10cce12fdcd3
child 35328 4937db58b663
--- a/mercurial/patch.py	Fri Dec 08 16:47:18 2017 +0900
+++ b/mercurial/patch.py	Fri Dec 08 16:54:59 2017 +0900
@@ -2575,6 +2575,9 @@
         token = '+'
         s2 = s2[1:]
         s1 = s1[1:]
+    else:
+        raise error.ProgrammingError("Case not expected, operation = %s" %
+                                     operation)
 
     s = difflib.ndiff(re.split(br'(\W)', s2), re.split(br'(\W)', s1))
     for part in s: