182 else: |
182 else: |
183 msg.add_header(property, value) |
183 msg.add_header(property, value) |
184 mbox[root] = msg |
184 mbox[root] = msg |
185 |
185 |
186 mbox.close() |
186 mbox.close() |
|
187 |
|
188 if opts['commit']: |
|
189 commands.commit(ui, repo, issue_fn) |
187 |
190 |
188 # If adding issue, add the new mailbox to the repository |
191 # If adding issue, add the new mailbox to the repository |
189 if not id: |
192 if not id: |
190 ui.status('Added new issue %s\n' % issue_id) |
193 ui.status('Added new issue %s\n' % issue_id) |
191 else: |
194 else: |
414 ('p', 'property', [], |
417 ('p', 'property', [], |
415 'update properties (e.g., -p state=fixed)'), |
418 'update properties (e.g., -p state=fixed)'), |
416 ('n', 'no-property-comment', None, |
419 ('n', 'no-property-comment', None, |
417 'do not add a comment about changed properties'), |
420 'do not add a comment about changed properties'), |
418 ('m', 'message', '', |
421 ('m', 'message', '', |
419 'use <text> as an issue subject')], |
422 'use <text> as an issue subject'), |
|
423 ('c', 'commit', False, |
|
424 'perform a commit after the addition')], |
420 _('hg iadd [OPTIONS] [ID] [COMMENT]')), |
425 _('hg iadd [OPTIONS] [ID] [COMMENT]')), |
421 'ishow': (ishow, |
426 'ishow': (ishow, |
422 [('a', 'all', None, 'list all comments'), |
427 [('a', 'all', None, 'list all comments'), |
423 ('s', 'skip', '>', 'skip lines starting with a substring'), |
428 ('s', 'skip', '>', 'skip lines starting with a substring'), |
424 ('x', 'extract', [], 'extract attachments (provide attachment number as argument)'), |
429 ('x', 'extract', [], 'extract attachments (provide attachment number as argument)'), |