equal
deleted
inserted
replaced
131 and calls given substitution function.''' |
131 and calls given substitution function.''' |
132 if node is None: |
132 if node is None: |
133 # kwrepo.wwrite except when overwriting on commit |
133 # kwrepo.wwrite except when overwriting on commit |
134 if self.ctx is None: |
134 if self.ctx is None: |
135 self.ctx = self.repo.changectx() |
135 self.ctx = self.repo.changectx() |
136 fnode = self.ctx.filenode(path) |
136 try: |
137 fl = self.repo.file(path) |
137 fnode = self.ctx.filenode(path) |
138 c = context.filectx(self.repo, path, fileid=fnode, filelog=fl) |
138 fl = self.repo.file(path) |
139 node = c.node() |
139 c = context.filectx(self.repo, path, fileid=fnode, filelog=fl) |
|
140 node = c.node() |
|
141 except revlog.LookupError: |
|
142 # eg: convert |
|
143 return subfunc == self.re_kw.sub and data or (data, None) |
140 elif subfunc == self.re_kw.sub: |
144 elif subfunc == self.re_kw.sub: |
141 # hg kwcat using kwfilelog.read |
145 # hg kwcat using kwfilelog.read |
142 c = context.filectx(self.repo, path, fileid=node) |
146 c = context.filectx(self.repo, path, fileid=node) |
143 node = c.node() |
147 node = c.node() |
144 |
148 |