X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/5e888f30cf851fc0989ba73f935f6da7681d4903..2299c463794f214b750ecc33e24779243ddc5aff:/stgit/commands/refresh.py diff --git a/stgit/commands/refresh.py b/stgit/commands/refresh.py index 218075b..f032375 100644 --- a/stgit/commands/refresh.py +++ b/stgit/commands/refresh.py @@ -37,50 +37,22 @@ 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.""" +directory = DirectoryGotoToplevel() options = [make_option('-f', '--force', help = 'force the refresh even if HEAD and '\ 'top differ', action = 'store_true'), - make_option('-e', '--edit', - 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('--update', help = 'only update the current patch files', action = 'store_true'), make_option('--undo', help = 'revert the commit generated by the last refresh', action = 'store_true'), - make_option('-m', '--message', - help = 'use MESSAGE as the patch ' \ - 'description'), make_option('-a', '--annotate', metavar = 'NOTE', help = 'annotate the patch log entry'), - make_option('--author', metavar = '"NAME "', - help = 'use "NAME " as the author details'), - make_option('--authname', - help = 'use AUTHNAME as the author name'), - make_option('--authemail', - help = 'use AUTHEMAIL as the author e-mail'), - make_option('--authdate', - help = 'use AUTHDATE as the author date'), - make_option('--commname', - help = 'use COMMNAME as the committer name'), - make_option('--commemail', - help = 'use COMMEMAIL as the committer ' \ - 'e-mail'), make_option('-p', '--patch', - help = 'refresh (applied) PATCH instead of the top one'), - make_option('--sign', - help = 'add Signed-off-by line', - action = 'store_true'), - make_option('--ack', - help = 'add Acked-by line', - action = 'store_true')] - + help = 'refresh (applied) PATCH instead of the top one') + ] def func(parser, options, args): autoresolved = config.get('stgit.autoresolved') @@ -109,28 +81,11 @@ def func(parser, options, args): out.done() return - if options.author: - options.authname, options.authemail = name_email(options.author) - - if options.sign: - sign_str = 'Signed-off-by' - if options.ack: - raise CmdException, '--ack and --sign were both specified' - elif options.ack: - sign_str = 'Acked-by' - else: - sign_str = None - - files = [x[1] for x in git.tree_status(verbose = True)] + files = [path for (stat,path) in git.tree_status(verbose = True)] if args: files = [f for f in files if f in args] - if files or not crt_series.head_top_equal() \ - or options.edit or options.message \ - or options.authname or options.authemail or options.authdate \ - or options.commname or options.commemail \ - or options.sign or options.ack: - + if files or not crt_series.head_top_equal(): if options.patch: applied = crt_series.get_applied() between = applied[:applied.index(patch):-1] @@ -149,16 +104,7 @@ def func(parser, options, args): if autoresolved == 'yes': resolved_all() crt_series.refresh_patch(files = files, - message = options.message, - edit = options.edit, - show_patch = options.showpatch, - author_name = options.authname, - author_email = options.authemail, - author_date = options.authdate, - committer_name = options.commname, - committer_email = options.commemail, - backup = True, sign_str = sign_str, - notes = options.annotate) + backup = True, notes = options.annotate) if crt_series.empty_patch(patch): out.done('empty patch')