mercurial/patch.py
changeset 50928 d718eddf01d9
parent 50591 886d05ed9a46
equal deleted inserted replaced
50927:7a8ea1397816 50928:d718eddf01d9
   166     inheader = False
   166     inheader = False
   167     cur = []
   167     cur = []
   168 
   168 
   169     mimeheaders = [b'content-type']
   169     mimeheaders = [b'content-type']
   170 
   170 
   171     if not util.safehasattr(stream, 'next'):
   171     if not hasattr(stream, 'next'):
   172         # http responses, for example, have readline but not next
   172         # http responses, for example, have readline but not next
   173         stream = fiter(stream)
   173         stream = fiter(stream)
   174 
   174 
   175     for line in stream:
   175     for line in stream:
   176         cur.append(line)
   176         cur.append(line)
  1701 
  1701 
  1702     '''
  1702     '''
  1703 
  1703 
  1704     newhunks = []
  1704     newhunks = []
  1705     for c in hunks:
  1705     for c in hunks:
  1706         if util.safehasattr(c, 'reversehunk'):
  1706         if hasattr(c, 'reversehunk'):
  1707             c = c.reversehunk()
  1707             c = c.reversehunk()
  1708         newhunks.append(c)
  1708         newhunks.append(c)
  1709     return newhunks
  1709     return newhunks
  1710 
  1710 
  1711 
  1711