Reuse ui from the repo if available.

This commit is contained in:
Dirkjan Ochtman 2009-03-20 16:40:51 +01:00
parent a54db6d5a8
commit fb3ecc8ed3

View File

@ -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_