changeset 1868:6a3d5a56f19c

merge with self.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Wed, 08 Mar 2006 18:48:40 -0800
parents 91ebf29c1595 (current diff) 89a6ce5ae510 (diff)
children 42c76ec7a8d4 258e3a7955b8
files
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Wed Mar 08 15:14:24 2006 -0800
+++ b/mercurial/ui.py	Wed Mar 08 18:48:40 2006 -0800
@@ -5,10 +5,10 @@
 # This software may be used and distributed according to the terms
 # of the GNU General Public License, incorporated herein by reference.
 
-import os, ConfigParser
+import ConfigParser
 from i18n import gettext as _
 from demandload import *
-demandload(globals(), "re socket sys util")
+demandload(globals(), "os re socket sys util")
 
 class ui(object):
     def __init__(self, verbose=False, debug=False, quiet=False,
@@ -26,6 +26,10 @@
 
             self.updateopts(verbose, debug, quiet, interactive)
             self.diffcache = None
+        else:
+            self.cdata._defaults = parentui.cdata._defaults
+            for key, value in parentui.cdata._sections.iteritems():
+                self.cdata._sections[key] = value.copy()
 
     def __getattr__(self, key):
         return getattr(self.parentui, key)
@@ -197,4 +201,3 @@
         os.unlink(name)
 
         return t
-