message, author_name, author_email, author_date = \
__parse_patch(filename)
- # new_patch() will invoke the editor in this case
+ # refresh_patch() will invoke the editor in this case, with correct
+ # patch content
if not message:
- edit = False
+ can_edit = False
# override the automatically parsed settings
if options.authname:
if options.commemail:
committer_email = options.commemail
- crt_series.new_patch(patch, message = message,
+ crt_series.new_patch(patch, message = message, can_edit = False,
author_name = author_name,
author_email = author_email,
author_date = author_date,
return commit_id
- def new_patch(self, name, message = None, edit = False, show_patch = False,
+ def new_patch(self, name, message = None, can_edit = True, show_patch = False,
author_name = None, author_email = None, author_date = None,
committer_name = None, committer_email = None):
"""Creates a new patch
if self.__patch_applied(name) or self.__patch_unapplied(name):
raise StackException, 'Patch "%s" already exists' % name
- if not message:
+ if not message and can_edit:
descr = edit_file(self, None, \
'Please enter the description for patch "%s" ' \
'above.' % name, show_patch)