chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the --replace option to import
[stgit]
/
stgit
/
commands
/
imprt.py
diff --git
a/stgit/commands/imprt.py
b/stgit/commands/imprt.py
index fcbe9d3e338a5028db4828c91fc455882ada920e..cfbf0de568755f22ce5072771f2e53ceba8c0726 100644
(file)
--- 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('-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',
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.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,
crt_series.new_patch(patch, message = message, can_edit = False,
author_name = author_name,
author_email = author_email,