changeset 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 07cb58b8c843
children ee8af8a4d905
files mercurial/manifest.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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