use repo.wjoin(f) instead of os.path.join(repo.root, f)

Martin Geisler mg at daimi.au.dk
Fri Jan 2 15:54:42 CST 2009


Patrick Mézard <pmezard at gmail.com> writes:

> Martin Geisler a écrit :
>> # HG changeset patch
>> # User Martin Geisler <mg at daimi.au.dk>
>> # Date 1230927140 -3600
>> # Node ID 892189cad48101a3f40272c5427d66da2cf177c3
>> # Parent  4949729ee9ee5f1e22d1212c557bed3ecc6ff5d3
>> use repo.wjoin(f) instead of os.path.join(repo.root, f)
>> 
>> diff --git a/hgext/extdiff.py b/hgext/extdiff.py
>> --- a/hgext/extdiff.py
>> +++ b/hgext/extdiff.py
>> @@ -105,8 +105,7 @@
>>              fp.write(chunk)
>>          fp.close()
>>  
>> -        fns_and_mtime.append((dest, os.path.join(repo_root, fn),
>> -            os.path.getmtime(dest)))
>> +        fns_and_mtime.append((dest, repo.wjoin(fn), os.path.getmtime(dest)))
>
> Sorry for being picky but as a side-effect can you get rid of
> 'repo_root' here ? It's used only once right after it's definition.

Sure, I should have spotted that! I've resent the patch.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090102/3a8688cb/attachment.pgp 


More information about the Mercurial-devel mailing list