equal
deleted
inserted
replaced
99 dispatch, |
99 dispatch, |
100 error, |
100 error, |
101 extensions, |
101 extensions, |
102 filelog, |
102 filelog, |
103 localrepo, |
103 localrepo, |
|
104 logcmdutil, |
104 match, |
105 match, |
105 patch, |
106 patch, |
106 pathutil, |
107 pathutil, |
107 pycompat, |
108 pycompat, |
108 registrar, |
109 registrar, |
252 |
253 |
253 def substitute(self, data, path, ctx, subfunc): |
254 def substitute(self, data, path, ctx, subfunc): |
254 '''Replaces keywords in data with expanded template.''' |
255 '''Replaces keywords in data with expanded template.''' |
255 def kwsub(mobj): |
256 def kwsub(mobj): |
256 kw = mobj.group(1) |
257 kw = mobj.group(1) |
257 ct = cmdutil.makelogtemplater(self.ui, self.repo, |
258 ct = logcmdutil.maketemplater(self.ui, self.repo, |
258 self.templates[kw]) |
259 self.templates[kw]) |
259 self.ui.pushbuffer() |
260 self.ui.pushbuffer() |
260 ct.show(ctx, root=self.repo.root, file=path) |
261 ct.show(ctx, root=self.repo.root, file=path) |
261 ekw = templatefilters.firstline(self.ui.popbuffer()) |
262 ekw = templatefilters.firstline(self.ui.popbuffer()) |
262 return '$%s: %s $' % (kw, ekw) |
263 return '$%s: %s $' % (kw, ekw) |