mercurial/commandserver.py
branchstable
changeset 21195 9336bc7dca8e
parent 20650 e811b93f2cb1
child 22561 1120b1e2f975
--- a/mercurial/commandserver.py	Tue Apr 29 12:37:36 2014 +0900
+++ b/mercurial/commandserver.py	Sat Apr 26 18:13:06 2014 +0900
@@ -187,14 +187,20 @@
         # copy the uis so changes (e.g. --config or --verbose) don't
         # persist between requests
         copiedui = self.ui.copy()
+        uis = [copiedui]
         if self.repo:
             self.repo.baseui = copiedui
             # clone ui without using ui.copy because this is protected
             repoui = self.repoui.__class__(self.repoui)
             repoui.copy = copiedui.copy # redo copy protection
+            uis.append(repoui)
             self.repo.ui = self.repo.dirstate._ui = repoui
             self.repo.invalidateall()
 
+        for ui in uis:
+            # any kind of interaction must use server channels
+            ui.setconfig('ui', 'nontty', 'true', 'commandserver')
+
         req = dispatch.request(args[:], copiedui, self.repo, self.cin,
                                self.cout, self.cerr)