# HG changeset patch # User Idan Kamara # Date 2011-06-24 16:43:59 # Node ID f5f97a0f983fdc8ad0b0a7535b9b14fc7fbd28ee # Parent e3be7dc9a5e11d219a342defe79acd7e3b265eb6 cmdserver: copy repo.ui before running commands diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py --- a/mercurial/commandserver.py +++ b/mercurial/commandserver.py @@ -143,6 +143,7 @@ class server(object): 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 @@ class server(object): 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)