Mercurial > hg
changeset 10662:e8e56d8377ab
mq: avoid a (potentially expensive) repo.status(unknown=True) call
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sat, 13 Mar 2010 00:08:06 +0100 |
parents | c4859aad1980 |
children | 85e81d9bfb7a |
files | hgext/mq.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Sat Mar 13 00:02:33 2010 +0100 +++ b/hgext/mq.py Sat Mar 13 00:08:06 2010 +0100 @@ -1082,11 +1082,10 @@ 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