mercurial/patch.py
changeset 16705 c2d9ef43ff6c
parent 16687 e34106fa0dc3
child 16803 107a3270a24a
equal deleted inserted replaced
16704:1f3acc30bdfe 16705:c2d9ef43ff6c
   243                     tmpfp.write(payload)
   243                     tmpfp.write(payload)
   244                     if not payload.endswith('\n'):
   244                     if not payload.endswith('\n'):
   245                         tmpfp.write('\n')
   245                         tmpfp.write('\n')
   246             elif not diffs_seen and message and content_type == 'text/plain':
   246             elif not diffs_seen and message and content_type == 'text/plain':
   247                 message += '\n' + payload
   247                 message += '\n' + payload
   248     except:
   248     except: # re-raises
   249         tmpfp.close()
   249         tmpfp.close()
   250         os.unlink(tmpname)
   250         os.unlink(tmpname)
   251         raise
   251         raise
   252 
   252 
   253     if subject and not message.startswith(subject):
   253     if subject and not message.startswith(subject):