changeset 14750:f5f97a0f983f stable

cmdserver: copy repo.ui before running commands
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 19:43:59 +0300
parents e3be7dc9a5e1
children 712954a67be3
files mercurial/commandserver.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commandserver.py	Fri Jun 24 17:04:37 2011 +0300
+++ b/mercurial/commandserver.py	Fri Jun 24 19:43:59 2011 +0300
@@ -143,6 +143,7 @@
                 logfile = open(logpath, 'a')
 
         self.repo = repo
+        self.repoui = repo.ui
 
         if mode == 'pipe':
             self.cerr = channeledoutput(sys.stderr, sys.stdout, 'e')
@@ -176,7 +177,9 @@
         else:
             args = self._read(length).split('\0')
 
-        # copy the ui so changes to it don't persist between requests
+        # copy the uis so changes (e.g. --config or --verbose) don't
+        # persist between requests
+        self.repo.ui = self.repo.dirstate._ui = self.repoui.copy()
         req = dispatch.request(args, self.ui.copy(), self.repo, self.cin,
                                self.cout, self.cerr)