Mercurial > hg
comparison hgext/keyword.py @ 24905:4ecbd88cde9a
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.
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Sat, 18 Apr 2015 15:39:26 +0200 |
parents | 3e8b06097d00 |
children | fd7287f0b43c |
comparison
equal
deleted
inserted
replaced
24901:e9edd53770fb | 24905:4ecbd88cde9a |
---|---|
455 msg = _('hg keyword configuration and expansion example') | 455 msg = _('hg keyword configuration and expansion example') |
456 ui.note(("hg ci -m '%s'\n" % msg)) | 456 ui.note(("hg ci -m '%s'\n" % msg)) |
457 repo.commit(text=msg) | 457 repo.commit(text=msg) |
458 ui.status(_('\n\tkeywords expanded\n')) | 458 ui.status(_('\n\tkeywords expanded\n')) |
459 ui.write(repo.wread(fn)) | 459 ui.write(repo.wread(fn)) |
460 for root, dirs, files in os.walk(tmpdir): | 460 repo.wvfs.rmtree(repo.root) |
461 for f in files: | |
462 util.unlinkpath(repo.vfs.reljoin(root, f)) | |
463 | 461 |
464 @command('kwexpand', | 462 @command('kwexpand', |
465 commands.walkopts, | 463 commands.walkopts, |
466 _('hg kwexpand [OPTION]... [FILE]...'), | 464 _('hg kwexpand [OPTION]... [FILE]...'), |
467 inferrepo=True) | 465 inferrepo=True) |