##// END OF EJS Templates
blackbox: initialize repo attribute properly...
Yuya Nishihara -
r40682:179c02ba default
parent child Browse files
Show More
@@ -129,14 +129,14 b' def _openlogfile(ui, vfs):'
129
129
130 class blackboxlogger(object):
130 class blackboxlogger(object):
131 def __init__(self, ui):
131 def __init__(self, ui):
132 self._repo = None
132 self.track = ui.configlist('blackbox', 'track')
133 self.track = ui.configlist('blackbox', 'track')
133
134
134 @property
135 @property
135 def _bbvfs(self):
136 def _bbvfs(self):
136 vfs = None
137 vfs = None
137 repo = getattr(self, '_bbrepo', None)
138 if self._repo:
138 if repo:
139 vfs = self._repo.vfs
139 vfs = repo.vfs
140 if not vfs.isdir('.'):
140 if not vfs.isdir('.'):
141 vfs = None
141 vfs = None
142 return vfs
142 return vfs
@@ -169,7 +169,7 b' class blackboxlogger(object):'
169 formattedmsg = msg[0] % msg[1:]
169 formattedmsg = msg[0] % msg[1:]
170 rev = '(unknown)'
170 rev = '(unknown)'
171 changed = ''
171 changed = ''
172 ctx = self._bbrepo[None]
172 ctx = self._repo[None]
173 parents = ctx.parents()
173 parents = ctx.parents()
174 rev = ('+'.join([hex(p.node()) for p in parents]))
174 rev = ('+'.join([hex(p.node()) for p in parents]))
175 if (ui.configbool('blackbox', 'dirty') and
175 if (ui.configbool('blackbox', 'dirty') and
@@ -193,7 +193,7 b' class blackboxlogger(object):'
193 self._bbinlog = False
193 self._bbinlog = False
194
194
195 def setrepo(self, repo):
195 def setrepo(self, repo):
196 self._bbrepo = repo
196 self._repo = repo
197
197
198 def wrapui(ui):
198 def wrapui(ui):
199 class blackboxui(ui.__class__):
199 class blackboxui(ui.__class__):
General Comments 0
You need to be logged in to leave comments. Login now