diff mercurial/manifest.py @ 7405:f1944e74e83c

manifest: fix _search() corner-case It failed when searching the empty string in the null revision.
author Patrick Mezard <pmezard@gmail.com>
date Tue, 25 Nov 2008 22:23:17 +0100
parents 6db4a2ccef3a
children 08cabecfa8a8
line wrap: on
line diff
--- a/mercurial/manifest.py	Mon Nov 24 17:16:39 2008 -0800
+++ b/mercurial/manifest.py	Tue Nov 25 22:23:17 2008 +0100
@@ -63,6 +63,8 @@
             while i < lenm and m[i] != c:
                 i += 1
             return i
+        if not s:
+            return (lo, lo)
         lenm = len(m)
         if not hi:
             hi = lenm