[PATCH] ui.copy now takes the ui class into account

Ronny Pfannschmidt Ronny.Pfannschmidt at gmx.de
Mon Apr 27 03:34:08 CDT 2009


# HG changeset patch
# User Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
# Date 1240821237 -7200
# Node ID 941ff7250a32d362ba20390cd79cba7e3989fbb4
# Parent  a2af1d92b913f878cc8ec57197e40145ef85843a
ui.copy now takes the ui class into account

this is just a simple help for ease of subclassing

diff -r a2af1d92b913 -r 941ff7250a32 mercurial/ui.py
--- a/mercurial/ui.py	Sun Apr 26 20:19:40 2009 +0200
+++ b/mercurial/ui.py	Mon Apr 27 10:33:57 2009 +0200
@@ -35,7 +35,7 @@ class ui(object):
             for f in util.rcpath():
                 self.readconfig(f, trust=True)
     def copy(self):
-        return ui(self)
+        return self.__class__(self)
 
     def _is_trusted(self, fp, f):
         st = util.fstat(fp)


More information about the Mercurial-devel mailing list