equal
deleted
inserted
replaced
81 self._path = path |
81 self._path = path |
82 |
82 |
83 def read(self, node): |
83 def read(self, node): |
84 data = super(kwfilelog, self).read(node) |
84 data = super(kwfilelog, self).read(node) |
85 if not self._path.startswith('.hg') and not util.binary(data): |
85 if not self._path.startswith('.hg') and not util.binary(data): |
86 c = context.filectx(self._repo, self._path, fileid=node, |
|
87 filelog=self) |
|
88 for pat, opt in self._repo.ui.configitems('keyword'): |
86 for pat, opt in self._repo.ui.configitems('keyword'): |
89 if opt == 'expand': |
87 if opt == 'expand': |
90 mf = util.matcher(self._repo.root, |
88 mf = util.matcher(self._repo.root, |
91 '', [pat], [], [])[1] |
89 '', [pat], [], [])[1] |
92 if mf(self._path): |
90 if mf(self._path): |
|
91 c = context.filectx(self._repo, self._path, |
|
92 fileid=node, filelog=self) |
93 |
93 |
94 def kwexpander(matchobj): |
94 def kwexpander(matchobj): |
95 return kwexpand(matchobj, |
95 return kwexpand(matchobj, |
96 self._repo, c.changectx(), self._path, |
96 self._repo, c.changectx(), self._path, |
97 c.date(), c.user()) |
97 c.date(), c.user()) |