ui: ui.copy() now takes the ui class into account
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
Mon, 27 Apr 2009 10:33:57 +0200
changeset 8220 6e6ebeb52899
parent 8219 21cf74ff2deb
child 8221 f35b933044cc
ui: ui.copy() now takes the ui class into account Helps subclassing by other API users.
mercurial/ui.py
--- a/mercurial/ui.py	Mon Apr 27 09:12:07 2009 +0200
+++ b/mercurial/ui.py	Mon Apr 27 10:33:57 2009 +0200
@@ -35,7 +35,7 @@
             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)