hgext/mq.py
changeset 36667 bcfc4e3b6548
parent 36632 9e2866065982
child 36668 e77cee5de1c7
equal deleted inserted replaced
36666:d79d68bb9f7c 36667:bcfc4e3b6548
   778         except Exception:
   778         except Exception:
   779             raise error.Abort(_("unable to read %s") % patch)
   779             raise error.Abort(_("unable to read %s") % patch)
   780 
   780 
   781         diffopts = self.patchopts(diffopts, patch)
   781         diffopts = self.patchopts(diffopts, patch)
   782         patchf = self.opener(patch, "w")
   782         patchf = self.opener(patch, "w")
   783         comments = str(ph)
   783         comments = bytes(ph)
   784         if comments:
   784         if comments:
   785             patchf.write(comments)
   785             patchf.write(comments)
   786         self.printdiff(repo, diffopts, head, n, fp=patchf)
   786         self.printdiff(repo, diffopts, head, n, fp=patchf)
   787         patchf.close()
   787         patchf.close()
   788         self.removeundo(repo)
   788         self.removeundo(repo)