Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.2, 1.9.3, and 2.0

chunks: cStringIO.StringIO accepts a string in its constructor

This creates a read-only StringIO instance, and is more efficient than
writing the string into the buffer.

Changeset d81235b13f08

Parent aa36eb998bc1

by Steve Borho

Changes to one file · Browse files at d81235b13f08 Showing diff from parent aa36eb998bc1 Diff from another changeset...

 
566
567
568
569
570
571
572
 
573
574
575
 
566
567
568
 
 
 
 
569
570
571
572
@@ -566,10 +566,7 @@
  elif type(self._ctx.rev()) is str:   chunks = self._ctx._files[filename]   else: - buf = cStringIO.StringIO() - buf.write(fd.diff) - buf.seek(0) - chunks = record.parsepatch(buf) + chunks = record.parsepatch(cStringIO.StringIO(fd.diff))     utext = []   for chunk in chunks[1:]: