[PATCH RESEND] keyword: use wvfs.rmtree to remove kwdemo directory

Christian Ebert blacktrash at gmx.net
Sat May 2 02:34:47 CDT 2015


* Pierre-Yves David on Friday, May 01, 2015 at 16:56:28 -0700
> On 05/01/2015 04:21 PM, Christian Ebert wrote:
>> # HG changeset patch
>> # User Christian Ebert <blacktrash at gmx.net>
>> # Date 1429364366 -7200
>> #      Sat Apr 18 15:39:26 2015 +0200
>> # Node ID 7d7445e0ea622532c20a8a8fa5a00e582fe96c38
>> # Parent  2ee10789d66b9ca500a7bfb1b3e031e04cdc4fb7
>> keyword: use wvfs.rmtree to remove kwdemo directory
>> 
>> diff --git a/hgext/keyword.py b/hgext/keyword.py
>> --- a/hgext/keyword.py
>> +++ b/hgext/keyword.py
>> @@ -457,9 +457,7 @@ def demo(ui, repo, *args, **opts):
>>     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()
> 
> rmtree with no argument?

Yes, the entire self repo/tmpdir, like in subrepo.py.

At least that what happens, and it should.

-- 
Auftreten Tarzan und Martha -
ich hatte Sankt Pauli unterschätzt.

_MICHAEL WEBER: MARTHA_ --->> http://www.blacktrash.org/baustellen/#martha


More information about the Mercurial-devel mailing list