dispatch: set descriptors on the request repo.ui stable
authorIdan Kamara <idankk86@gmail.com>
Fri, 24 Jun 2011 19:38:28 +0300
branchstable
changeset 14744 23325c5ef6a7
parent 14743 84a680daa4b2
child 14745 cae09a39b2d2
dispatch: set descriptors on the request repo.ui
mercurial/dispatch.py
--- a/mercurial/dispatch.py	Fri Jun 24 19:36:44 2011 +0300
+++ b/mercurial/dispatch.py	Fri Jun 24 19:38:28 2011 +0300
@@ -622,7 +622,12 @@
         if not rpath:
             repo = req.repo
 
-        if not repo:
+        if repo:
+            # set the descriptors of the repo ui to those of ui
+            repo.ui.fin = ui.fin
+            repo.ui.fout = ui.fout
+            repo.ui.ferr = ui.ferr
+        else:
             try:
                 repo = hg.repository(ui, path=path)
                 if not repo.local():