[PATCH] remove unused spath instance variable from localrepo and statichttprepo

Andrey Somov py4fun at gmail.com
Sat Sep 19 14:33:02 CDT 2009


> Andrey Somov <py4fun at gmail.com> writes:
> 
>> # HG changeset patch
>> # User Andrey Somov <py4fun at gmail.com>
>> # Date 1253023759 -7200
>> # Node ID 15435d7481d4af7b40013fbc9838b7b66bfcede3
>> # Parent  57d682d7d2da8af2cc7e22168075b7c246ff85e2
>> remove unused spath instance variable from localrepo and statichttprepo
> 
> I don't know if this is a good idea -- perhaps this instance variable is
> used by a subclass introduced in a third-party extension?
> 
> 

No problem.

It leads me to another question: is there a way to detect whether the 
code is unused ?
For instance I have found an 'if' statement with a complex expression. I 
think a part of the condition is never met. Of course removing this 
check will not significantly improve performance but it is more 
difficult to read the code.
(As far as I understand tests do not provide any guarantee.)



More information about the Mercurial-devel mailing list