Skip to content
Snippets Groups Projects
Commit 0fe00301 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Implement template variable.

parent 86178b06
No related branches found
No related tags found
No related merge requests found
irker history
Repository header:
Add the ability to set the notification-message template (Debian bug #824512)
2.17: 2016-03-14
Add a reconnect delay (Debian bug #749650).
Add proxy support (requres setting some variables in the source file).
......
......@@ -237,7 +237,7 @@ class GitExtractor(GenericExtractor):
self.channels = do("git config --get irker.channels")
self.email = do("git config --get irker.email")
self.tcp = do("git config --bool --get irker.tcp")
self.template = '%(bold)s%(project)s:%(reset)s %(green)s%(author)s%(reset)s %(repo)s:%(yellow)s%(branch)s%(reset)s * %(bold)s%(rev)s%(reset)s / %(bold)s%(files)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
self.template = do("git config --get irker.template") or '%(bold)s%(project)s:%(reset)s %(green)s%(author)s%(reset)s %(repo)s:%(yellow)s%(branch)s%(reset)s * %(bold)s%(rev)s%(reset)s / %(bold)s%(files)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
self.tinyifier = do("git config --get irker.tinyifier") or default_tinyifier
self.color = do("git config --get irker.color")
self.urlprefix = do("git config --get irker.urlprefix") or "gitweb"
......@@ -374,7 +374,7 @@ class HgExtractor(GenericExtractor):
self.channels = ui.config('irker', 'channels')
self.email = ui.config('irker', 'email')
self.tcp = str(ui.configbool('irker', 'tcp')) # converted to bool again in do_overrides
self.template = '%(bold)s%(project)s:%(reset)s %(green)s%(author)s%(reset)s %(repo)s:%(yellow)s%(branch)s%(reset)s * %(bold)s%(rev)s%(reset)s / %(bold)s%(files)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
self.template = ui.config('irker', 'template') or '%(bold)s%(project)s:%(reset)s %(green)s%(author)s%(reset)s %(repo)s:%(yellow)s%(branch)s%(reset)s * %(bold)s%(rev)s%(reset)s / %(bold)s%(files)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
self.tinyifier = ui.config('irker', 'tinyifier') or default_tinyifier
self.color = ui.config('irker', 'color')
self.urlprefix = (ui.config('irker', 'urlprefix') or
......
......@@ -163,6 +163,15 @@ a threshold value for the length of the file list in
characters.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>template</term>
<listitem>
<para>Set the template used to generate notification messages. Only
available in VCses with config variables; presently this means git or
hg. All basic commit and aextractor fields, including color switches,
are available as %() substitutions.</para>
</listitem>
</varlistentry>
</variablelist>
<refsect2 id="git"><title>git</title>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment