##// END OF EJS Templates
CHanges to UI object injection after lazy property changes
marcink -
r3476:258e0353 beta
parent child Browse files
Show More
@@ -67,14 +67,12 b' class GitRepository(BaseRepository):'
67 @ThreadLocalLazyProperty
67 @ThreadLocalLazyProperty
68 def _repo(self):
68 def _repo(self):
69 repo = Repo(self.path)
69 repo = Repo(self.path)
70 #temporary set that to now at later we will move it to constructor
70 # patch the instance of GitRepo with an "FAKE" ui object to add
71 baseui = None
71 # compatibility layer with Mercurial
72 if baseui is None:
72 if not hasattr(repo, 'ui'):
73 from mercurial.ui import ui
73 from mercurial.ui import ui
74 baseui = ui()
74 baseui = ui()
75 # patch the instance of GitRepo with an "FAKE" ui object to add
75 setattr(repo, 'ui', baseui)
76 # compatibility layer with Mercurial
77 setattr(repo, 'ui', baseui)
78 return repo
76 return repo
79
77
80 @property
78 @property
General Comments 0
You need to be logged in to leave comments. Login now