X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/19cd0a8fe0cb7cfd0d5f784024014419ec354adf..2b4b9c29d1bc5d98eafdfdc82b99b57ebd4298d0:/stgit/commands/refresh.py diff --git a/stgit/commands/refresh.py b/stgit/commands/refresh.py index 46a7ea2..20b7546 100644 --- a/stgit/commands/refresh.py +++ b/stgit/commands/refresh.py @@ -26,7 +26,15 @@ from stgit.config import config help = 'generate a new commit for the current patch' -usage = '%prog [options]' +usage = """%prog [options] [] + +Include the latest tree changes in the current patch. This command +generates a new GIT commit object with the patch details, the previous +one no longer being visible. The patch attributes like author, +committer and description can be changed with the command line +options. The '--force' option is useful when a commit object was +created with a different tool but the changes need to be included in +the current patch.""" options = [make_option('-f', '--force', help = 'force the refresh even if HEAD and '\ @@ -36,6 +44,9 @@ options = [make_option('-f', '--force', help = 'invoke an editor for the patch '\ 'description', action = 'store_true'), + make_option('-s', '--showpatch', + help = 'show the patch content in the editor buffer', + action = 'store_true'), make_option('-m', '--message', help = 'use MESSAGE as the patch ' \ 'description'), @@ -55,9 +66,6 @@ options = [make_option('-f', '--force', def func(parser, options, args): - if len(args) != 0: - parser.error('incorrect number of arguments') - if config.has_option('stgit', 'autoresolved'): autoresolved = config.get('stgit', 'autoresolved') else: @@ -86,8 +94,10 @@ def func(parser, options, args): if autoresolved == 'yes': resolved_all() - crt_series.refresh_patch(message = options.message, + crt_series.refresh_patch(files = args, + message = options.message, edit = options.edit, + show_patch = options.showpatch, author_name = options.authname, author_email = options.authemail, author_date = options.authdate,