Patchwork [07,of,10,v5] ui: give editor() a tag of its own

login
register
mail settings
Submitter Simon Farnsworth
Date Feb. 15, 2017, 10:06 p.m.
Message ID <ce6e773a6719fab87fa0.1487196417@devvm022.lla2.facebook.com>
Download mbox | patch
Permalink /patch/18521/
State Accepted
Headers show

Comments

Simon Farnsworth - Feb. 15, 2017, 10:06 p.m.
# HG changeset patch
# User Simon Farnsworth <simonfar@fb.com>
# Date 1487194680 28800
#      Wed Feb 15 13:38:00 2017 -0800
# Node ID ce6e773a6719fab87fa098021aac72b42709aa33
# Parent  1ae8bc5565b680008d82e93bee9455432b6ba0b2
ui: give editor() a tag of its own

We know that calls to ui.editor() always block on the user's configured editor.
Use a blocking tag that ensures that we don't see a huge variety of editor
options in our logging.

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1139,7 +1139,8 @@ 
 
             self.system("%s \"%s\"" % (editor, name),
                         environ=environ,
-                        onerr=error.Abort, errprefix=_("edit failed"))
+                        onerr=error.Abort, errprefix=_("edit failed"),
+                        blockedtag='editor')
 
             f = open(name)
             t = f.read()