mercurial/patch.py
changeset 36046 a5cf79755eff
parent 36045 04984f2e50ae
child 36192 eb91ffdaaece
equal deleted inserted replaced
36045:04984f2e50ae 36046:a5cf79755eff
   213                         br'\*\*\*[ \t].*?^---[ \t])',
   213                         br'\*\*\*[ \t].*?^---[ \t])',
   214                         re.MULTILINE | re.DOTALL)
   214                         re.MULTILINE | re.DOTALL)
   215 
   215 
   216     data = {}
   216     data = {}
   217     fd, tmpname = tempfile.mkstemp(prefix='hg-patch-')
   217     fd, tmpname = tempfile.mkstemp(prefix='hg-patch-')
   218     tmpfp = os.fdopen(fd, pycompat.sysstr('w'))
   218     tmpfp = os.fdopen(fd, pycompat.sysstr('wb'))
   219     try:
   219     try:
   220         msg = pycompat.emailparser().parse(fileobj)
   220         msg = pycompat.emailparser().parse(fileobj)
   221 
   221 
   222         subject = msg['Subject'] and mail.headdecode(msg['Subject'])
   222         subject = msg['Subject'] and mail.headdecode(msg['Subject'])
   223         data['user'] = msg['From'] and mail.headdecode(msg['From'])
   223         data['user'] = msg['From'] and mail.headdecode(msg['From'])