# HG changeset patch # User Christian Ebert # Date 1247183531 -7200 # Node ID cae62580bea35923d3683b9260849168c761897b # Parent 5b87f3ea105a4c0734d82776867988cee2acb539 (0.9.2compat) prefer self.func over repo.func in kwrepo Avoid nesting by falling back on parent class member function. diff -r 5b87f3ea105a -r cae62580bea3 hgkw/keyword.py --- a/hgkw/keyword.py Wed Jul 08 03:25:07 2009 +0200 +++ b/hgkw/keyword.py Fri Jul 10 01:52:11 2009 +0200 @@ -688,7 +688,7 @@ if commithooks: # store parents for commit hook environment if p1 is None: - _p1, _p2 = repo.dirstate.parents() + _p1, _p2 = self.dirstate.parents() else: _p1, _p2 = p1, p2 or nullid _p1 = hex(_p1) @@ -705,7 +705,7 @@ ui.setconfig('hooks', name, cmd) if n is not None: kwt.overwrite(n, True, None) - repo.hook('commit', node=n, parent1=_p1, parent2=_p2) + self.hook('commit', node=n, parent1=_p1, parent2=_p2) return n finally: del _wlock, _lock