# HG changeset patch # User Dirkjan Ochtman # Date 1237563651 -3600 # Node ID 1416429584b23032778dbbf5438d53d89f761014 # Parent b1d2ea765516f59237ce9aeaf5e3b82ce23ae453 Reuse ui from the repo if available. diff --git a/hg_delta_editor.py b/hg_delta_editor.py --- 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_