mercurial/patch.py
branchstable
changeset 51796 8f629783b8ae
parent 50928 d718eddf01d9
child 51834 454feddab720
equal deleted inserted replaced
51795:73476a9e5ced 51796:8f629783b8ae
   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)