subrepo: refactor writestate for clarity
authorMartin Geisler <mg@aragost.com>
Fri, 27 May 2011 11:01:44 +0200
changeset 14443 6fe6defdc924
parent 14442 5b48ad1e7f1a
child 14444 1f997134a9d1
subrepo: refactor writestate for clarity
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Thu May 26 17:15:35 2011 -0500
+++ b/mercurial/subrepo.py	Fri May 27 11:01:44 2011 +0200
@@ -79,9 +79,8 @@
 
 def writestate(repo, state):
     """rewrite .hgsubstate in (outer) repo with these subrepo states"""
-    repo.wwrite('.hgsubstate',
-                ''.join(['%s %s\n' % (state[s][1], s)
-                         for s in sorted(state)]), '')
+    lines = ['%s %s\n' % (state[s][1], s) for s in sorted(state)]
+    repo.wwrite('.hgsubstate', ''.join(lines), '')
 
 def submerge(repo, wctx, mctx, actx, overwrite):
     """delegated from merge.applyupdates: merging of .hgsubstate file