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

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sat Aug 2 08:02:16 CDT 2014


# HG changeset patch
# User FUJIWARA Katsunori <foozy at 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

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


More information about the Mercurial-devel mailing list