Changeset 1591 in tailor


Ignore:
Timestamp:
06/01/08 03:36:32 (5 years ago)
Author:
lele@…
Hash name:
20080601013632-97f81-5095b92dcb121ce2ad1ce10b2d63947cde9f7289
Message:

No need to skip verbosity from (future) darcs pull --xml-output
I sent a refiniment patch to the darcs developers that removes bogus
verbosity when --xml-output is specified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/repository/darcs/source.py

    r1590 r1591  
    376376            return self._parseDarcsPull(output) 
    377377        else: 
    378             # Skip initial verbosity, as well as the one at end 
    379378            from cStringIO import StringIO 
    380379 
    381             output.readline() # Would pull from "/home/lele/wip/darcs-2.0"... 
    382             output.readline() # Would pull the following changes: 
    383             xml = StringIO(''.join(output.readlines()[:-2])) 
    384             xml.seek(0) 
     380            # My initial implementation of --xml-output on darcs pull 
     381            # wasn't perfect, as it was printing useless verbosity before 
     382            # and after the actual xml. Around 2.0.0+275 I removed that... 
     383 
     384            line = output.readline() # Would pull from "/home/lele/wip/darcs-2.0"... 
     385            if line.startswith('Would pull from '): 
     386                # Skip the first two lines and drop the last two as well 
     387                output.readline() # Would pull the following changes: 
     388                xml = StringIO(''.join(output.readlines()[:-2])) 
     389                xml.seek(0) 
     390            else: 
     391                output.seek(0) 
     392                xml = output 
     393 
    385394            badchars = self.repository.replace_badchars 
    386395 
Note: See TracChangeset for help on using the changeset viewer.