phase: remove a 'for x in "foo bar".split()' idiom in phasecache.replace
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 15 Jun 2015 16:06:17 -0700
changeset 25614 6c48f012d37e
parent 25613 a13c18c14ade
child 25615 dc707fb35550
phase: remove a 'for x in "foo bar".split()' idiom in phasecache.replace I find this idiom fairly horrible.
mercurial/phases.py
--- a/mercurial/phases.py	Mon Jun 15 16:06:24 2015 -0700
+++ b/mercurial/phases.py	Mon Jun 15 16:06:17 2015 -0700
@@ -172,7 +172,7 @@
 
     def replace(self, phcache):
         """replace all values in 'self' with content of phcache"""
-        for a in 'phaseroots dirty opener _phaserevs _phasesets'.split():
+        for a in ('phaseroots', 'dirty', 'opener', '_phaserevs', '_phasesets'):
             setattr(self, a, getattr(phcache, a))
 
     def _getphaserevsnative(self, repo):