--- a/plugin.py Sat May 30 21:03:37 2009 -0700
+++ b/plugin.py Sat May 30 21:32:17 2009 -0700
super(Mercurial, self).__init__(irc)
self.path = self.registryValue('path')
- def hg(self, irc, msg, args, cmd):
+ def hghelp(self, irc, msg, args, cmd):
"""runs hg help with the given args"""
lines = text.splitlines()
- if line.startswith('aliases:') or line.startswith('options'):
+ if not line or line.startswith('aliases:'):
+ if line.startswith('options') or line.startswith('enabled extensions:'):
+ if out and ' extension - ' in out[0]:
+ out[0] = ircutils.bold(out[0])
+ out[1] = ircutils.bold(out[1])
+ if out and out[0].startswith('Mercurial Distributed SCM'):
+ out = ['"%s": unknown command' % cmd]
fd = os.popen('%s help %s' % (self.path, cmd))
- irc.replies(fmt(out), joiner=' '.join)
- hg = wrap(hg, ['text'])
- def hglog(self, irc, msg, args, rev):
+ hghelp = wrap(hghelp, ['text'])
+ def crew(self, irc, msg, args, rev):
"gets the changelog message for the given revision"
lines = ['%s %s %s: %s' % (rev, user, date, files)] + lines
- hglog = wrap(hglog, ['revision'])
+ crew = wrap(crew, ['revision'])