# HG changeset patch # User Christian Ebert # Date 1429364366 -7200 # Node ID 4ecbd88cde9a0a5019ebf77d1c1d4398398f4583 # Parent e9edd53770fb77a9787a3e6592a3bf0a29c1bd80 keyword: use wvfs.rmtree to remove kwdemo directory Pass repo.root explicitly as argument to indicate that removal of the temporary repo is intentional in this case. diff -r e9edd53770fb -r 4ecbd88cde9a hgext/keyword.py --- a/hgext/keyword.py Wed Apr 22 15:03:09 2015 -0700 +++ b/hgext/keyword.py Sat Apr 18 15:39:26 2015 +0200 @@ -457,9 +457,7 @@ repo.commit(text=msg) ui.status(_('\n\tkeywords expanded\n')) ui.write(repo.wread(fn)) - for root, dirs, files in os.walk(tmpdir): - for f in files: - util.unlinkpath(repo.vfs.reljoin(root, f)) + repo.wvfs.rmtree(repo.root) @command('kwexpand', commands.walkopts,