Mercurial > public > mercurial-scm > hg
diff hgext/fetch.py @ 21406:288a793c3167
fetch: use "getcommiteditor()" instead of explicit editor choice
This patch also enhances "test-fetch.t", because "hg fetch" hasn't
been explicitly tested around editor invocation and '--edit' option.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sun, 11 May 2014 00:49:35 +0900 |
parents | b1e64c6720d8 |
children | 3838b910fa6b |
line wrap: on
line diff
--- a/hgext/fetch.py Sun May 11 00:49:35 2014 +0900 +++ b/hgext/fetch.py Sun May 11 00:49:35 2014 +0900 @@ -142,10 +142,9 @@ message = (cmdutil.logmessage(ui, opts) or ('Automated merge with %s' % util.removeauth(other.url()))) - editor = cmdutil.commiteditor - if opts.get('force_editor') or opts.get('edit'): - editor = cmdutil.commitforceeditor - n = repo.commit(message, opts['user'], opts['date'], editor=editor) + editopt = opts.get('edit') or opts.get('force_editor') + n = repo.commit(message, opts['user'], opts['date'], + editor=cmdutil.getcommiteditor(edit=editopt)) ui.status(_('new changeset %d:%s merges remote changes ' 'with local\n') % (repo.changelog.rev(n), short(n)))