[PATCH] dispatch: set descriptors on the request repo.ui

Idan Kamara idankk86 at gmail.com
Fri Jun 24 11:38:51 CDT 2011


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1308933508 -10800
# Branch stable
# Node ID c465f6530c27360d89154f6febcd37adc9961912
# Parent  4f7274bb9e576b3d9f1d9728c1e9c8928fbad330
dispatch: set descriptors on the request repo.ui

diff -r 4f7274bb9e57 -r c465f6530c27 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
@@ -620,7 +620,11 @@
         if not rpath:
             repo = req.repo
 
-        if not repo:
+        if repo:
+            # set the descriptors of the repo ui to those of ui
+            for desc in ('fout', 'ferr', 'fin'):
+                setattr(repo.ui, desc, getattr(ui, desc))
+        else:
             try:
                 repo = hg.repository(ui, path=path)
                 if not repo.local():


More information about the Mercurial-devel mailing list