# HG changeset patch # User Christian Ebert # Date 1167398063 -3600 # Node ID e8834575128bda698248860917c5971e4408ddfb # Parent 34fb92c050bcbb88b709dad8896d7164ed4b630f Move context.filectx into if-clause where it's actually needed diff -r 34fb92c050bc -r e8834575128b hgkw/keyword.py --- a/hgkw/keyword.py Fri Dec 29 14:06:10 2006 +0100 +++ b/hgkw/keyword.py Fri Dec 29 14:14:23 2006 +0100 @@ -83,13 +83,13 @@ def read(self, node): data = super(kwfilelog, self).read(node) if not self._path.startswith('.hg') and not util.binary(data): - c = context.filectx(self._repo, self._path, fileid=node, - filelog=self) for pat, opt in self._repo.ui.configitems('keyword'): if opt == 'expand': mf = util.matcher(self._repo.root, '', [pat], [], [])[1] if mf(self._path): + c = context.filectx(self._repo, self._path, + fileid=node, filelog=self) def kwexpander(matchobj): return kwexpand(matchobj,