X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/2c3a16552d7d3809145890e0e3ac65ea88a6bd52..034db15c1443a01ed1333eaa2f41c1b74adef6bb:/stgit/commands/imprt.py diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py index fcbe9d3..cfbf0de 100644 --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -50,6 +50,9 @@ options = [make_option('-m', '--mail', make_option('-i', '--ignore', help = 'ignore the applied patches in the series', action = 'store_true'), + make_option('--replace', + help = 'replace the unapplied patches in the series', + action = 'store_true'), make_option('-b', '--base', help = 'use BASE instead of HEAD for file importing'), make_option('-e', '--edit', @@ -248,6 +251,9 @@ def __import_patch(patch, filename, options): if options.commemail: committer_email = options.commemail + if options.replace and patch in crt_series.get_unapplied(): + crt_series.delete_patch(patch) + crt_series.new_patch(patch, message = message, can_edit = False, author_name = author_name, author_email = author_email,