mercurial/bundle2.py
changeset 24794 21f2e8f48ae1
parent 24793 2ec894582ea2
child 24795 f9aa4cb8f2dd
equal deleted inserted replaced
24793:2ec894582ea2 24794:21f2e8f48ae1
   477             if value is not None:
   477             if value is not None:
   478                 value = urllib.quote(value)
   478                 value = urllib.quote(value)
   479                 par = '%s=%s' % (par, value)
   479                 par = '%s=%s' % (par, value)
   480             blocks.append(par)
   480             blocks.append(par)
   481         return ' '.join(blocks)
   481         return ' '.join(blocks)
       
   482 
       
   483     def salvageoutput(self):
       
   484         """return a list with a copy of all output parts in the bundle
       
   485 
       
   486         This is meant to be used during error handling to make sure we preserve
       
   487         server output"""
       
   488         salvaged = []
       
   489         for part in self._parts:
       
   490             if part.type.startswith('output'):
       
   491                 salvaged.append(part.copy())
       
   492         return salvaged
       
   493 
   482 
   494 
   483 class unpackermixin(object):
   495 class unpackermixin(object):
   484     """A mixin to extract bytes and struct data from a stream"""
   496     """A mixin to extract bytes and struct data from a stream"""
   485 
   497 
   486     def __init__(self, fp):
   498     def __init__(self, fp):