ui: add formatter method
authorMatt Mackall <mpm@selenic.com>
Mon, 20 Feb 2012 16:42:48 -0600
changeset 16135 ae5f92e154d3
parent 16134 3c0327ea20c0
child 16136 68007f0557de
ui: add formatter method
mercurial/ui.py
--- a/mercurial/ui.py	Mon Feb 20 16:42:47 2012 -0600
+++ b/mercurial/ui.py	Mon Feb 20 16:42:48 2012 -0600
@@ -7,7 +7,7 @@
 
 from i18n import _
 import errno, getpass, os, socket, sys, tempfile, traceback
-import config, scmutil, util, error
+import config, scmutil, util, error, formatter
 
 class ui(object):
     def __init__(self, src=None):
@@ -46,6 +46,9 @@
     def copy(self):
         return self.__class__(self)
 
+    def formatter(self, topic, opts):
+        return formatter.formatter(self, topic, opts)
+
     def _trusted(self, fp, f):
         st = util.fstat(fp)
         if util.isowner(st):