changeset 14443:6fe6defdc924

subrepo: refactor writestate for clarity
author Martin Geisler <mg@aragost.com>
date Fri, 27 May 2011 11:01:44 +0200
parents 5b48ad1e7f1a
children 1f997134a9d1
files mercurial/subrepo.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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