Download:
child 6:3773fa2d0805
parent 4:cf0cac509fcf
5:0b8327ad3140
Brendan Cully <brendan@cs.ubc.ca>, Wed, 15 Jul 2009 17:10:45 -0700
Add link to issue

1 файлов изменено, 8 вставок(+), 6 удалений(-) [+]
plugin.py file | annotate | diff | comparison | revisions
--- a/plugin.py Thu Jun 25 09:04:30 2009 -0700
+++ b/plugin.py Wed Jul 15 17:10:45 2009 -0700
@@ -178,19 +178,21 @@
main = wrap(main, ['revision'])
def bts(self, irc, msg, args, issue):
+ url = 'http://mercurial.selenic.com/bts'
if issue == 'url':
- irc.reply('http://mercurial.selenic.com/bts')
+ irc.reply(url)
return None
title = fetch(issue)
+ link = None
if title.startswith('[issue'):
- end = title.find(']') + 1
- title = ircutils.bold(title[:end]) + title[end:]
+ end = title.find(']')
+ link = '/'.join([url, title[1:end]])
+ title = ircutils.bold(title[:end+1]) + title[end+1:]
title = title.replace('\n', ' ')
irc.reply(title)
+ if link:
+ irc.reply(link)
bts = wrap(bts, ['text'])
Class = Mercurial
-
-
-# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: