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

login
register
mail settings
Submitter Alexander Drozdov
Date Feb. 17, 2014, 3:29 a.m.
Message ID <d16cb20404ea32b1ad9e.1392607775@localhost6.localdomain6>
Download mbox | patch
Permalink /patch/3682/
State Accepted
Commit cc76c619bed6658f14baa51c7a776075cfb0a401
Headers show

Comments

Alexander Drozdov - Feb. 17, 2014, 3:29 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 d16cb20404ea32b1ad9e632f8c28918ef139216c
# Parent  0e2877f8605dcaf4fdf2ab7e0046f1f6f80161dd
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: