##// END OF EJS Templates
revert: don't let repo.status walk the whole working dir...
Alexis S. L. Carvalho -
r6106:cb2f7652 default
parent child Browse files
Show More
@@ -2211,9 +2211,12 b' def revert(ui, repo, *pats, **opts):'
2211 wlock = repo.wlock()
2211 wlock = repo.wlock()
2212 try:
2212 try:
2213 # walk dirstate.
2213 # walk dirstate.
2214 files = []
2214 for src, abs, rel, exact in cmdutil.walk(repo, pats, opts,
2215 for src, abs, rel, exact in cmdutil.walk(repo, pats, opts,
2215 badmatch=mf.has_key):
2216 badmatch=mf.has_key):
2216 names[abs] = (rel, exact)
2217 names[abs] = (rel, exact)
2218 if src != 'b':
2219 files.append(abs)
2217
2220
2218 # walk target manifest.
2221 # walk target manifest.
2219
2222
@@ -2232,7 +2235,7 b' def revert(ui, repo, *pats, **opts):'
2232 continue
2235 continue
2233 names[abs] = (rel, exact)
2236 names[abs] = (rel, exact)
2234
2237
2235 changes = repo.status(match=names.has_key)[:4]
2238 changes = repo.status(files=files, match=names.has_key)[:4]
2236 modified, added, removed, deleted = map(dict.fromkeys, changes)
2239 modified, added, removed, deleted = map(dict.fromkeys, changes)
2237
2240
2238 # if f is a rename, also revert the source
2241 # if f is a rename, also revert the source
General Comments 0
You need to be logged in to leave comments. Login now