Mercurial > hg-stable
changeset 2485:885de96eb542
filterfiles: Search as long as the target is a prefix of current.
filterfiles was failing to find files for directory arguments if
another file existed that started with the directory name and
sorted earlier. For example, a manifest of ('foo.h', 'foo/foo')
would cause filterfiles('foo') to return nothing. This resolves
issue #294.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Fri, 23 Jun 2006 00:11:53 +0200 |
parents | eabcda3ed0dd |
children | 3ea8111ead90 |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Wed Jun 21 22:45:29 2006 -0700 +++ b/mercurial/dirstate.py Fri Jun 23 00:11:53 2006 +0200 @@ -285,8 +285,9 @@ continue while bs < blen: s = b[bs] - if len(s) > len(x) and s.startswith(x) and s[len(x)] == '/': - ret[s] = self.map[s] + if len(s) > len(x) and s.startswith(x): + if s[len(x)] == '/': + ret[s] = self.map[s] else: break bs += 1