Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.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 | 6c375e07d673 |
children | 0935ff767285 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon Dec 06 16:56:06 2010 +0100 +++ b/mercurial/dirstate.py Thu Dec 02 03:43:06 2010 +0100 @@ -230,7 +230,8 @@ self._pl = p def invalidate(self): - for a in "_map _copymap _foldmap _branch _pl _dirs _ignore".split(): + for a in ("_map", "_copymap", "_foldmap", "_branch", "_pl", "_dirs", + "_ignore"): if a in self.__dict__: delattr(self, a) self._dirty = False