diff hg_delta_editor.py @ 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 05243ec295e1
children 6eb691a163cd
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_