Anton Shestakov <av6@dwimlabs.net>, Sun, 16 Dec 2018 11:17:34 +0800
plugin: highlight differential replies in color, similar to bz
--- a/plugin.py Sun Dec 16 11:15:33 2018 +0800
+++ b/plugin.py Sun Dec 16 11:17:34 2018 +0800
url = 'D{}'.format(phabrev)
item = 'Revision {} {}, {}'.format(url, status, desc)
+ irc.reply(ircutils.mircColor(item, fg='blue'))
def differential(self, irc, msg, args, phabrev):
--- a/test.py Sun Dec 16 11:15:33 2018 +0800
+++ b/test.py Sun Dec 16 11:17:34 2018 +0800
def testDifferential(self):
+ expected = ircutils.mircColor(
'Revision https://phab.mercurial-scm.org/D3850'
- ' Closed, stringutil: update list of re-special characters to include &~'
+ ' Closed, stringutil: update list of re-special characters to include &~',
self.assertResponse('differential 3850', expected)
+ expected = ircutils.mircColor(
'Revision https://phab.mercurial-scm.org/D5194'
- ' Abandoned, wireprotov2: add an extension to cache wireproto v2 responses in S3'
+ ' Abandoned, wireprotov2: add an extension to cache wireproto v2 responses in S3',
self.assertSnarfResponse('snarf me D5194!', expected)
self.assertHelp('differential')