Patchwork [1,of,4] ui: allow edit() to work with revision extras

login
register
mail settings
Submitter Alexander Drozdov
Date Feb. 10, 2014, 3:18 a.m.
Message ID <b70febf4c8f876874026.1392002290@localhost6.localdomain6>
Download mbox | patch
Permalink /patch/3534/
State Superseded
Headers show

Comments

Alexander Drozdov - Feb. 10, 2014, 3:18 a.m.
# HG changeset patch
# User Alexander Drozdov <al.drozdov@gmail.com>
# Date 1391672308 -14400
#      Thu Feb 06 11:38:28 2014 +0400
# Node ID b70febf4c8f87687402638b744a6340eb3ecdc23
# Parent  98eadbfffa0e987eaa9b24bcc92357be1bd252d5
ui: allow edit() to work with revision extras

Make edit() to accept optional 'extra' dictionary. Revision extras will be
used in upcoming patches to set some environment variables.

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -712,7 +712,7 @@ 
         if self.debugflag:
             opts['label'] = opts.get('label', '') + ' ui.debug'
             self.write(*msg, **opts)
-    def edit(self, text, user):
+    def edit(self, text, user, extra={}):
         (fd, name) = tempfile.mkstemp(prefix="hg-editor-", suffix=".txt",
                                       text=True)
         try: