Patchwork [02,of,15] fetch: pass 'editform' argument to 'cmdutil.getcommiteditor'

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Aug. 2, 2014, 1:02 p.m.
Message ID <3d0afcec1d5053a7ed5f.1406984531@feefifofum>
Download mbox | patch
Permalink /patch/5230/
State Accepted
Commit 20fd00ee432e16965bfb97a2fcfbed8134d4352a
Headers show

Comments

Katsunori FUJIWARA - Aug. 2, 2014, 1:02 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1406983586 -32400
#      Sat Aug 02 21:46:26 2014 +0900
# Node ID 3d0afcec1d5053a7ed5f82947fd13b7c8f762891
# Parent  1751cb1a4bd3f8d50b498454e72155b3fc509d00
fetch: pass 'editform' argument to 'cmdutil.getcommiteditor'

This patch passes 'editform' argument according to the format below:

  EXTENSION[.COMMAND][.ROUTE]

  - EXTENSION: name of extension
  - COMMAND: name of command, if there are two or more commands in EXTENSION
  - ROUTE: name of route, if there are two or more routes in COMMAND

In this patch, COMMAND and ROUTE are omitted.

Patch

diff --git a/hgext/fetch.py b/hgext/fetch.py
--- a/hgext/fetch.py
+++ b/hgext/fetch.py
@@ -143,8 +143,8 @@ 
                        ('Automated merge with %s' %
                         util.removeauth(other.url())))
             editopt = opts.get('edit') or opts.get('force_editor')
-            n = repo.commit(message, opts['user'], opts['date'],
-                            editor=cmdutil.getcommiteditor(edit=editopt))
+            editor = cmdutil.getcommiteditor(edit=editopt, editform='fetch')
+            n = repo.commit(message, opts['user'], opts['date'], editor=editor)
             ui.status(_('new changeset %d:%s merges remote changes '
                         'with local\n') % (repo.changelog.rev(n),
                                            short(n)))