Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 32785:041d976b662a
context: inline makememctx (API)
I have always thought it weird that we have a helper method instead of
just using __init__. So, I ripped it out.
author | Sean Farley <sean@farley.io> |
---|---|
date | Sat, 10 Jun 2017 10:24:33 -0400 |
parents | 9d201b39ccd9 |
children | de7dc25ecf2e |
comparison
equal
deleted
inserted
replaced
32784:ec302748edd8 | 32785:041d976b662a |
---|---|
1106 raise error.Abort(str(e)) | 1106 raise error.Abort(str(e)) |
1107 if opts.get('exact'): | 1107 if opts.get('exact'): |
1108 editor = None | 1108 editor = None |
1109 else: | 1109 else: |
1110 editor = getcommiteditor(editform='import.bypass') | 1110 editor = getcommiteditor(editform='import.bypass') |
1111 memctx = context.makememctx(repo, (p1.node(), p2.node()), | 1111 memctx = context.memctx(repo, (p1.node(), p2.node()), |
1112 message, | 1112 message, |
1113 user, | 1113 files=files, |
1114 date, | 1114 filectxfn=store, |
1115 branch, files, store, | 1115 user=user, |
1116 date=date, | |
1117 branch=branch, | |
1116 editor=editor) | 1118 editor=editor) |
1117 n = memctx.commit() | 1119 n = memctx.commit() |
1118 finally: | 1120 finally: |
1119 store.close() | 1121 store.close() |
1120 if opts.get('exact') and nocommit: | 1122 if opts.get('exact') and nocommit: |