diff mercurial/localrepo.py @ 13200:6f011cf52f9a

avoid .split() in for loops and use tuples instead split can be more readable for longer lists like the list in dirstate.invalidate. As dirstate.invalidate is used in wlock() and therefoe used heavily, I think it's worth avoiding a split there too.
author David Soria Parra <dsp@php.net>
date Thu, 02 Dec 2010 03:43:06 +0100
parents 84cec5895d01
children 61c9bc3da402
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Dec 06 16:56:06 2010 +0100
+++ b/mercurial/localrepo.py	Thu Dec 02 03:43:06 2010 +0100
@@ -733,7 +733,7 @@
         self._branchcachetip = None
 
     def invalidate(self):
-        for a in "changelog manifest".split():
+        for a in ("changelog", "manifest"):
             if a in self.__dict__:
                 delattr(self, a)
         self.invalidatecaches()