ishow: add --mutt option to display issue with mutt
authorAlexander Solovyov <piranha@piranha.org.ua>
Sat, 28 Nov 2009 00:10:46 +0200
changeset 40 d013e9b9aba7
parent 39 c8cf0454e5d1
child 41 6ac81157f063
ishow: add --mutt option to display issue with mutt
artemis.py
--- a/artemis.py	Sat Nov 28 00:03:01 2009 +0200
+++ b/artemis.py	Sat Nov 28 00:10:46 2009 +0200
@@ -185,10 +185,14 @@
 
     comment = int(comment)
     issue, id = _find_issue(ui, repo, id)
-    if not issue: return
+    if not issue:
+        return ui.warn('No such issue\n')
 
     _create_missing_dirs(os.path.join(repo.root, issues_dir), issue)
 
+    if opts.get('mutt'):
+        return util.system('mutt -R -f %s' % issue)
+
     mbox = mailbox.Maildir(issue, factory=mailbox.MaildirMessage)
 
     if opts['all']:
@@ -402,7 +406,8 @@
     'ishow':      (ishow,
                  [('a', 'all', None, 'list all comments'),
                   ('s', 'skip', '>', 'skip lines starting with a substring'),
-                  ('x', 'extract', [], 'extract attachments (provide attachment number as argument)')],
+                  ('x', 'extract', [], 'extract attachments (provide attachment number as argument)'),
+                  ('', 'mutt', False, 'use mutt to show issue')],
                  _('hg ishow [OPTIONS] ID [COMMENT]')),
 }