115 kwexpand(m, self._repo, self._path, |
115 kwexpand(m, self._repo, self._path, |
116 fileid=node, filelog=self), |
116 fileid=node, filelog=self), |
117 data) |
117 data) |
118 return data |
118 return data |
119 |
119 |
120 def add(self, text, meta, tr, link, p1=None, p2=None): |
|
121 if not self._path.startswith('.hg') and not util.binary(text): |
|
122 for mf in kwfmatchers(ui, self._repo): |
|
123 if mf(self._path): |
|
124 ui.debug(_('removing keyword substitutions in %s\n') |
|
125 % self._path) |
|
126 text = re_kw.sub(r'$\1$', text) |
|
127 break |
|
128 return super(kwfilelog, self).add(text, meta, tr, link, p1, p2) |
|
129 |
|
130 def size(self, rev): |
120 def size(self, rev): |
131 '''Overrides filelog's size() to use kwfilelog.read().''' |
121 '''Overrides filelog's size() to use kwfilelog.read().''' |
132 node = revlog.node(self, rev) |
122 node = revlog.node(self, rev) |
133 if super(kwfilelog, self).renamed(node): |
123 if super(kwfilelog, self).renamed(node): |
134 return len(self.read(node)) |
124 return len(self.read(node)) |