##// END OF EJS Templates
purge: avoid full walks when directories aren't purged...
Siddharth Agarwal -
r22265:fe22d86a default
parent child Browse files
Show More
@@ -95,9 +95,10 b' def purge(ui, repo, *dirs, **opts):'
95 else:
95 else:
96 ui.write('%s%s' % (name, eol))
96 ui.write('%s%s' % (name, eol))
97
97
98 directories = []
99 match = scmutil.match(repo[None], dirs, opts)
98 match = scmutil.match(repo[None], dirs, opts)
100 match.explicitdir = match.traversedir = directories.append
99 if removedirs:
100 directories = []
101 match.explicitdir = match.traversedir = directories.append
101 status = repo.status(match=match, ignored=opts['all'], unknown=True)
102 status = repo.status(match=match, ignored=opts['all'], unknown=True)
102
103
103 if removefiles:
104 if removefiles:
General Comments 0
You need to be logged in to leave comments. Login now