diff -r f3058dd05281 -r 0935ff767285 mercurial/dirstate.py --- a/mercurial/dirstate.py Fri Dec 31 17:09:38 2010 -0600 +++ b/mercurial/dirstate.py Wed Jan 05 15:56:03 2011 +0100 @@ -505,7 +505,7 @@ i, j = 0, 0 while i < len(files) and j < len(subrepos): subpath = subrepos[j] + "/" - if not files[i].startswith(subpath): + if files[i] < subpath: i += 1 continue while files and files[i].startswith(subpath):