manifest: fix _search() corner-case
authorPatrick Mezard <pmezard@gmail.com>
Tue, 25 Nov 2008 22:23:17 +0100
changeset 7405 f1944e74e83c
parent 7404 07cb58b8c843
child 7406 ee8af8a4d905
manifest: fix _search() corner-case It failed when searching the empty string in the null revision.
mercurial/manifest.py
--- 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