Patchwork [4,of,5] mq: implement log() on dummyui

login
register
mail settings
Submitter Yuya Nishihara
Date Dec. 16, 2018, 8:30 a.m.
Message ID <851dd18b181c113977b6.1544949037@mimosa>
Download mbox | patch
Permalink /patch/37208/
State New
Headers show

Comments

Yuya Nishihara - Dec. 16, 2018, 8:30 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1544860324 -32400
#      Sat Dec 15 16:52:04 2018 +0900
# Node ID 851dd18b181c113977b6b9bd903e9791a196460f
# Parent  85b2948f95b7916920f9af6f556a9ef0c36dee49
mq: implement log() on dummyui

Otherwise ui.log() in extensions.py would explode.

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -139,6 +139,8 @@  except KeyError:
     class dummyui(object):
         def debug(self, msg):
             pass
+        def log(self, event, msgfmt, *msgargs, **opts):
+            pass
     stripext = extensions.load(dummyui(), 'strip', '')
 
 strip = stripext.strip