183 def ishow(ui, repo, id, comment = 0, **opts): |
183 def ishow(ui, repo, id, comment = 0, **opts): |
184 """Shows issue ID, or possibly its comment COMMENT""" |
184 """Shows issue ID, or possibly its comment COMMENT""" |
185 |
185 |
186 comment = int(comment) |
186 comment = int(comment) |
187 issue, id = _find_issue(ui, repo, id) |
187 issue, id = _find_issue(ui, repo, id) |
188 if not issue: return |
188 if not issue: |
|
189 return ui.warn('No such issue\n') |
189 |
190 |
190 _create_missing_dirs(os.path.join(repo.root, issues_dir), issue) |
191 _create_missing_dirs(os.path.join(repo.root, issues_dir), issue) |
|
192 |
|
193 if opts.get('mutt'): |
|
194 return util.system('mutt -R -f %s' % issue) |
191 |
195 |
192 mbox = mailbox.Maildir(issue, factory=mailbox.MaildirMessage) |
196 mbox = mailbox.Maildir(issue, factory=mailbox.MaildirMessage) |
193 |
197 |
194 if opts['all']: |
198 if opts['all']: |
195 ui.write('='*70 + '\n') |
199 ui.write('='*70 + '\n') |
400 'do not add a comment about changed properties')], |
404 'do not add a comment about changed properties')], |
401 _('hg iadd [OPTIONS] [ID] [COMMENT]')), |
405 _('hg iadd [OPTIONS] [ID] [COMMENT]')), |
402 'ishow': (ishow, |
406 'ishow': (ishow, |
403 [('a', 'all', None, 'list all comments'), |
407 [('a', 'all', None, 'list all comments'), |
404 ('s', 'skip', '>', 'skip lines starting with a substring'), |
408 ('s', 'skip', '>', 'skip lines starting with a substring'), |
405 ('x', 'extract', [], 'extract attachments (provide attachment number as argument)')], |
409 ('x', 'extract', [], 'extract attachments (provide attachment number as argument)'), |
|
410 ('', 'mutt', False, 'use mutt to show issue')], |
406 _('hg ishow [OPTIONS] ID [COMMENT]')), |
411 _('hg ishow [OPTIONS] ID [COMMENT]')), |
407 } |
412 } |
408 |
413 |
409 # vim: expandtab |
414 # vim: expandtab |