# HG changeset patch # User Benoit Boissinot # Date 2010-03-12 23:08:06 # Node ID e8e56d8377abf633a0d3603e2bd594d6d921c341 # Parent c4859aad198006d87a2ba64b852ff277948637f8 mq: avoid a (potentially expensive) repo.status(unknown=True) call diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1082,11 +1082,10 @@ class queue(object): self.ui.warn(_('cleaning up working directory...')) node = repo.dirstate.parents()[0] hg.revert(repo, node, None) - unknown = repo.status(unknown=True)[4] # only remove unknown files that we know we touched or # created while patching - for f in unknown: - if f in all_files: + for f in all_files: + if f not in repo.dirstate: util.unlink(repo.wjoin(f)) self.ui.warn(_('done\n')) raise