artemis.py
changeset 19 c79f89b04676
parent 18 57157f212cde
child 20 1630cf85c7f7
equal deleted inserted replaced
18:57157f212cde 19:c79f89b04676
     1 # Author: Dmitriy Morozov <hg@foxcub.org>, 2007
     1 # Author: Dmitriy Morozov <hg@foxcub.org>, 2007
     2 
     2         
     3 """A very simple and lightweight issue tracker for Mercurial."""
     3 """A very simple and lightweight issue tracker for Mercurial."""
     4 
     4 
     5 from mercurial import hg, util
     5 from mercurial import hg, util
     6 from mercurial.i18n import _
     6 from mercurial.i18n import _
     7 import os, time, random, mailbox, glob, socket, ConfigParser
     7 import os, time, random, mailbox, glob, socket, ConfigParser
    49             property_match = property_match and (mbox[0][property] == value)
    49             property_match = property_match and (mbox[0][property] == value)
    50         if not show_all and (not properties or not property_match) and (properties or mbox[0]['State'].upper() == state['fixed'].upper()): continue
    50         if not show_all and (not properties or not property_match) and (properties or mbox[0]['State'].upper() == state['fixed'].upper()): continue
    51 
    51 
    52 
    52 
    53         if match_date and not date_match(util.parsedate(mbox[0]['date'])[0]): continue
    53         if match_date and not date_match(util.parsedate(mbox[0]['date'])[0]): continue
    54         ui.write("%s (%d) [%s]: %s\n" % (issue[len(issues_path)+1:], # +1 for trailing /
    54         ui.write("%s (%3d) [%s]: %s\n" % (issue[len(issues_path)+1:], # +1 for trailing /
    55                                          len(mbox)-1,                 # number of replies (-1 for self)
    55                                           len(mbox)-1,                # number of replies (-1 for self)
    56                                          mbox[0]['State'],
    56                                           mbox[0]['State'],
    57                                          mbox[0]['Subject']))
    57                                           mbox[0]['Subject']))
    58 
    58 
    59 
    59 
    60 def iadd(ui, repo, id = None, comment = 0):
    60 def iadd(ui, repo, id = None, comment = 0):
    61     """Adds a new issue, or comment to an existing issue ID or its comment COMMENT"""
    61     """Adds a new issue, or comment to an existing issue ID or its comment COMMENT"""
    62 
    62 
   269                    'update properties (e.g., -p state=fixed)'),
   269                    'update properties (e.g., -p state=fixed)'),
   270                   ('n', 'no-property-comment', None,
   270                   ('n', 'no-property-comment', None,
   271                    'do not add a comment about changed properties')],
   271                    'do not add a comment about changed properties')],
   272                  _('hg iupdate [OPTIONS] ID'))
   272                  _('hg iupdate [OPTIONS] ID'))
   273 }
   273 }
       
   274 
       
   275 # vim: expandtab