3759 try: |
3759 try: |
3760 patch.patchrepo(ui, repo, p1, store, tmpname, strip, |
3760 patch.patchrepo(ui, repo, p1, store, tmpname, strip, |
3761 files, eolmode=None) |
3761 files, eolmode=None) |
3762 except patch.PatchError, e: |
3762 except patch.PatchError, e: |
3763 raise util.Abort(str(e)) |
3763 raise util.Abort(str(e)) |
3764 memctx = patch.makememctx(repo, (p1.node(), p2.node()), |
3764 memctx = context.makememctx(repo, (p1.node(), p2.node()), |
3765 message, |
3765 message, |
3766 opts.get('user') or user, |
3766 opts.get('user') or user, |
3767 opts.get('date') or date, |
3767 opts.get('date') or date, |
3768 branch, files, store, |
3768 branch, files, store, |
3769 editor=cmdutil.commiteditor) |
3769 editor=cmdutil.commiteditor) |
3770 repo.savecommitmessage(memctx.description()) |
3770 repo.savecommitmessage(memctx.description()) |
3771 n = memctx.commit() |
3771 n = memctx.commit() |
3772 finally: |
3772 finally: |
3773 store.close() |
3773 store.close() |
3774 if opts.get('exact') and hex(n) != nodeid: |
3774 if opts.get('exact') and hex(n) != nodeid: |