changeset 14751:712954a67be3 stable

cmdserver: assign repo.baseui before running commands There are places in the code that use localrepository.baseui (see hg.remoteui), we need the ui descriptors (and possibly other things) to be set correctly on it, so output written to the remoteui descriptors ends up at the right place. Before this change, tests such as 'test-bookmarks-pushpull.t' didn't work.
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 19:44:17 +0300
parents f5f97a0f983f
children 99ace3cb7352
files mercurial/commandserver.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commandserver.py	Fri Jun 24 19:43:59 2011 +0300
+++ b/mercurial/commandserver.py	Fri Jun 24 19:44:17 2011 +0300
@@ -179,8 +179,11 @@
 
         # copy the uis so changes (e.g. --config or --verbose) don't
         # persist between requests
+        copiedui = self.ui.copy()
+        self.repo.baseui = copiedui
         self.repo.ui = self.repo.dirstate._ui = self.repoui.copy()
-        req = dispatch.request(args, self.ui.copy(), self.repo, self.cin,
+
+        req = dispatch.request(args, copiedui, self.repo, self.cin,
                                self.cout, self.cerr)
 
         ret = dispatch.dispatch(req) or 0 # might return None