Mercurial > hg
changeset 40646:179c02baaa8c
blackbox: initialize repo attribute properly
And ditch the "bb" prefix as it's no longer a ui extension class.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 11 Nov 2018 17:24:28 +0900 |
parents | fff3e213ace9 |
children | 6d9a87fb8c89 |
files | hgext/blackbox.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/blackbox.py Sun Nov 11 17:22:14 2018 +0900 +++ b/hgext/blackbox.py Sun Nov 11 17:24:28 2018 +0900 @@ -129,14 +129,14 @@ class blackboxlogger(object): def __init__(self, ui): + self._repo = None self.track = ui.configlist('blackbox', 'track') @property def _bbvfs(self): vfs = None - repo = getattr(self, '_bbrepo', None) - if repo: - vfs = repo.vfs + if self._repo: + vfs = self._repo.vfs if not vfs.isdir('.'): vfs = None return vfs @@ -169,7 +169,7 @@ formattedmsg = msg[0] % msg[1:] rev = '(unknown)' changed = '' - ctx = self._bbrepo[None] + ctx = self._repo[None] parents = ctx.parents() rev = ('+'.join([hex(p.node()) for p in parents])) if (ui.configbool('blackbox', 'dirty') and @@ -193,7 +193,7 @@ self._bbinlog = False def setrepo(self, repo): - self._bbrepo = repo + self._repo = repo def wrapui(ui): class blackboxui(ui.__class__):