cmdserver: assign repo.baseui before running commands stable
authorIdan Kamara <idankk86@gmail.com>
Fri, 24 Jun 2011 19:44:17 +0300
branchstable
changeset 14751 712954a67be3
parent 14750 f5f97a0f983f
child 14752 99ace3cb7352
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.
mercurial/commandserver.py
--- 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