Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 4225:281f9f8f1bd4
Fix confusing message from hg revert (issue332)
% mkdir sub1
% touch sub1/file1
% hg add sub1/
adding sub1/file1
% hg rev sub1
sub1: No such file in rev e4c586763258
forgetting sub1/file1
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 16 Mar 2007 00:22:52 -0300 |
parents | 3be4785f8994 |
children | 24c22a3f2ef8 |
comparison
equal
deleted
inserted
replaced
4218:2216535f07d7 | 4225:281f9f8f1bd4 |
---|---|
2164 if src == 'b': | 2164 if src == 'b': |
2165 target_only[abs] = True | 2165 target_only[abs] = True |
2166 | 2166 |
2167 # walk target manifest. | 2167 # walk target manifest. |
2168 | 2168 |
2169 def badmatch(path): | |
2170 if path in names: | |
2171 return True | |
2172 path_ = path + '/' | |
2173 for f in names: | |
2174 if f.startswith(path_): | |
2175 return True | |
2176 return False | |
2177 | |
2169 for src, abs, rel, exact in cmdutil.walk(repo, pats, opts, node=node, | 2178 for src, abs, rel, exact in cmdutil.walk(repo, pats, opts, node=node, |
2170 badmatch=names.has_key): | 2179 badmatch=badmatch): |
2171 if abs in names: continue | 2180 if abs in names or src == 'b': |
2181 continue | |
2172 names[abs] = (rel, exact) | 2182 names[abs] = (rel, exact) |
2173 target_only[abs] = True | 2183 target_only[abs] = True |
2174 | 2184 |
2175 changes = repo.status(match=names.has_key, wlock=wlock)[:5] | 2185 changes = repo.status(match=names.has_key, wlock=wlock)[:5] |
2176 modified, added, removed, deleted, unknown = map(dict.fromkeys, changes) | 2186 modified, added, removed, deleted, unknown = map(dict.fromkeys, changes) |