Patchwork [07,of,15] shelve: pass 'editform' argument to 'cmdutil.getcommiteditor'

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Aug. 2, 2014, 1:02 p.m.
Message ID <587ac098dcaac83333f0.1406984536@feefifofum>
Download mbox | patch
Permalink /patch/5235/
State Accepted
Commit dabf8fb8a91ed974dae10d7f70f8e2d2f9204cbf
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 587ac098dcaac83333f09d98e627826e312be9ae
# Parent  533ebf02c9e1e98a526909980c8b089b945d23e0
shelve: 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:

  - 'shelve' is used as COMMAND
  - ROUTE is omitted

Patch

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -178,8 +178,9 @@ 
         if hasmq:
             saved, repo.mq.checkapplied = repo.mq.checkapplied, False
         try:
+            editor = cmdutil.getcommiteditor(editform='shelve.shelve', **opts)
             return repo.commit(message, user, opts.get('date'), match,
-                               editor=cmdutil.getcommiteditor(**opts))
+                               editor=editor)
         finally:
             if hasmq:
                 repo.mq.checkapplied = saved