Use self._path directly instead of assigning f to context.path() solo-extension
authorChristian Ebert <blacktrash@gmx.net>
Thu, 28 Dec 2006 18:14:59 +0100
branchsolo-extension
changeset 50 fe891f87a16c
parent 49 5acfe7dc3086
child 51 1ecb6ec5d16b
Use self._path directly instead of assigning f to context.path()
hgkw/keyword.py
--- a/hgkw/keyword.py	Thu Dec 28 15:06:19 2006 +0100
+++ b/hgkw/keyword.py	Thu Dec 28 18:14:59 2006 +0100
@@ -86,19 +86,18 @@
 
             c = context.filectx(self._repo, self._path, fileid=node,
                                  filelog=self)
-            f = c.path()
-            if f.startswith('.hg'):
+            if self._path.startswith('.hg'):
                 return data
 
             for pat, opt in self._repo.ui.configitems('keyword'):
                 if opt == 'expand':
                     mf = util.matcher(self._repo.root,
                             '', [pat], [], [])[1]
-                    if mf(f):
+                    if mf(self._path):
 
                         def kwexpander(matchobj):
                             return kwexpand(matchobj,
-                                    self._repo, c.changectx(), f,
+                                    self._repo, c.changectx(), self._path,
                                     c.date(), c.user())
 
                         re_kw = re.compile(r'\$(%s)\$' % hgkeywords)