# HG changeset patch # User Andrey Vlasovskikh # Date 1259712757 -10800 # Node ID 7897c850150f35fc4699d84429e4a332421c6402 # Parent 1f5ed31cc92ab721b644b590acca58dcd31a98af iadd: Added --message diff -r 1f5ed31cc92a -r 7897c850150f artemis.py --- a/artemis.py Sat Nov 28 03:20:00 2009 +0300 +++ b/artemis.py Wed Dec 02 03:12:37 2009 +0300 @@ -112,9 +112,17 @@ # Get properties, and figure out if we need an explicit comment properties = _get_properties(opts['property']) no_comment = id and properties and opts['no_property_comment'] + message = opts['message'] # Create the text - if not no_comment: + if message: + if not id: + state_str = 'State: %s\n' % state['default'] + else: + state_str = '' + issue = "From: %s\nDate: %s\nSubject: %s\n%s" % \ + (user, util.datestr(format=date_format), message, state_str) + elif not no_comment: issue = ui.edit(default_issue_text, user) if issue.strip() == '': @@ -401,7 +409,9 @@ ('p', 'property', [], 'update properties (e.g., -p state=fixed)'), ('n', 'no-property-comment', None, - 'do not add a comment about changed properties')], + 'do not add a comment about changed properties'), + ('m', 'message', '', + 'use as an issue subject')], _('hg iadd [OPTIONS] [ID] [COMMENT]')), 'ishow': (ishow, [('a', 'all', None, 'list all comments'),