--- a/hgext/keyword.py Sat Jul 26 14:54:36 2014 -0700
+++ b/hgext/keyword.py Sat Aug 02 09:44:11 2014 +0100
@@ -87,7 +87,7 @@
from mercurial import scmutil, pathutil
from mercurial.hgweb import webcommands
from mercurial.i18n import _
-import os, re, shutil, tempfile
+import os, re, tempfile
cmdtable = {}
command = cmdutil.command(cmdtable)
@@ -450,7 +450,12 @@
repo.commit(text=msg)
ui.status(_('\n\tkeywords expanded\n'))
ui.write(repo.wread(fn))
- shutil.rmtree(tmpdir, ignore_errors=True)
+ for root, dirs, files in os.walk(tmpdir, topdown=False):
+ for f in files:
+ util.unlink(os.path.join(root, f))
+ for d in dirs:
+ os.rmdir(os.path.join(root, d))
+ os.rmdir(tmpdir)
@command('kwexpand',
commands.walkopts,