changeset 214:1416429584b2

Reuse ui from the repo if available.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Fri, 20 Mar 2009 16:40:51 +0100
parents b1d2ea765516
children b5ef9a404f5d
files hg_delta_editor.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hg_delta_editor.py
+++ b/hg_delta_editor.py
@@ -69,6 +69,8 @@ class HgChangeReceiver(delta.Editor):
         subdir is the subdirectory of the edits *on the svn server*.
         It is needed for stripping paths off in certain cases.
         """
+        if repo and repo.ui and not ui_:
+            ui_ = repo.ui
         if not ui_:
             ui_ = ui.ui()
         self.ui = ui_