mercurial/manifest.py
changeset 9420 d0db168136dc
parent 9416 eecbaac5ca88
child 10263 25e572394f5c
--- a/mercurial/manifest.py	Thu Sep 03 21:40:45 2009 +0200
+++ b/mercurial/manifest.py	Fri Sep 04 10:47:55 2009 +0200
@@ -132,9 +132,9 @@
             # if this is changed to support newlines in filenames,
             # be sure to check the templates/ dir again (especially *-raw.tmpl)
             hex, flags = revlog.hex, map.flags
-            text = ["%s\000%s%s\n" % (f, hex(map[f]), flags(f))
-                    for f in files]
-            arraytext = array.array('c', "".join(text))
+            text = ''.join("%s\000%s%s\n" % (f, hex(map[f]), flags(f))
+                           for f in files)
+            arraytext = array.array('c', text)
             cachedelta = None
         else:
             added, removed = changed
@@ -190,9 +190,9 @@
             if p1 != self.tip():
                 cachedelta = None
             arraytext = addlist
+            text = buffer(arraytext)
 
-        n = self.addrevision(buffer(arraytext), transaction, link,
-                             p1, p2, cachedelta)
+        n = self.addrevision(text, transaction, link, p1, p2, cachedelta)
         self._mancache = (n, map, arraytext)
 
         return n