comparison hgext/notify.py @ 9486:dd8d10c36c9c

notify: make it possible to pass extra info into templates
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 24 Aug 2009 16:30:42 -0700
parents 9a69ab6d7cf7
children 90ae579924e4
comparison
equal deleted inserted replaced
9387:20ed9909dbd9 9486:dd8d10c36c9c
163 for s in sorted(subs)] 163 for s in sorted(subs)]
164 164
165 def url(self, path=None): 165 def url(self, path=None):
166 return self.ui.config('web', 'baseurl') + (path or self.root) 166 return self.ui.config('web', 'baseurl') + (path or self.root)
167 167
168 def node(self, ctx): 168 def node(self, ctx, **props):
169 '''format one changeset.''' 169 '''format one changeset.'''
170 self.t.show(ctx, changes=ctx.changeset(), 170 self.t.show(ctx, changes=ctx.changeset(),
171 baseurl=self.ui.config('web', 'baseurl'), 171 baseurl=self.ui.config('web', 'baseurl'),
172 root=self.repo.root, webroot=self.root) 172 root=self.repo.root, webroot=self.root, **props)
173 173
174 def skipsource(self, source): 174 def skipsource(self, source):
175 '''true if incoming changes from this source should be skipped.''' 175 '''true if incoming changes from this source should be skipped.'''
176 ok_sources = self.ui.config('notify', 'sources', 'serve').split() 176 ok_sources = self.ui.config('notify', 'sources', 'serve').split()
177 return source not in ok_sources 177 return source not in ok_sources