mercurial/patch.py
changeset 51830 454feddab720
parent 51699 ca7bde5dbafb
parent 51792 8f629783b8ae
child 51859 f4733654f144
equal deleted inserted replaced
51828:4eccb65e444f 51830:454feddab720
   120 
   120 
   121         m = mail.parse(c)
   121         m = mail.parse(c)
   122         if not m.is_multipart():
   122         if not m.is_multipart():
   123             yield msgfp(m)
   123             yield msgfp(m)
   124         else:
   124         else:
   125             ok_types = (b'text/plain', b'text/x-diff', b'text/x-patch')
   125             ok_types = ('text/plain', 'text/x-diff', 'text/x-patch')
   126             for part in m.walk():
   126             for part in m.walk():
   127                 ct = part.get_content_type()
   127                 ct = part.get_content_type()
   128                 if ct not in ok_types:
   128                 if ct not in ok_types:
   129                     continue
   129                     continue
   130                 yield msgfp(part)
   130                 yield msgfp(part)