comparison mercurial/cmdutil.py @ 21036:a1a1bd09e4f4

amend: invoke editor forcibly when "--edit" option is specified 422981492ace introduces "--edit" option into "hg commit", but it doesn't work for "hg commit --amend", because 422981492ace prepares for editor invocation only around "commitfunc()" internal function, which is used only for temporary amend commit by "cmdutil.amend()". Actual commit message editing is executed in "cmdutil.amend()". This patch invokes editor forcibly when "--edit" option is specified for "hg commit --amend", even if commit message is specified explicitly by "--message" or "--logfile". This patch also removes useless handling for commit message and editor invocation around "commitfunc()" internal function.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 16 Apr 2014 02:38:11 +0900
parents 254f55b64e31
children bdf5ed5246d2
comparison
equal deleted inserted replaced
21035:e6e34c17b1cc 21036:a1a1bd09e4f4
1946 date = opts.get('date') or old.date() 1946 date = opts.get('date') or old.date()
1947 editmsg = False 1947 editmsg = False
1948 if not message: 1948 if not message:
1949 editmsg = True 1949 editmsg = True
1950 message = old.description() 1950 message = old.description()
1951 elif opts.get('edit'):
1952 editmsg = True
1951 1953
1952 pureextra = extra.copy() 1954 pureextra = extra.copy()
1953 extra['amend_source'] = old.hex() 1955 extra['amend_source'] = old.hex()
1954 1956
1955 new = context.memctx(repo, 1957 new = context.memctx(repo,