From: Catalin Marinas Date: Sat, 1 Dec 2007 22:59:59 +0000 (+0000) Subject: Make Series.refresh_patch automatically save the undo information X-Git-Tag: v0.14~19 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/cb68860194290ad4eb6a2baa65a53a756ad98b7b Make Series.refresh_patch automatically save the undo information The patch pushing with was losing the undo information because the arguments passed to refresh_patch. The backup argument now defaults to True since this is needed in most of the cases. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/imprt.py b/stgit/commands/imprt.py index ec3ca93..1c21a74 100644 --- a/stgit/commands/imprt.py +++ b/stgit/commands/imprt.py @@ -171,7 +171,8 @@ def __create_patch(filename, message, author_name, author_email, git.apply_patch(diff = diff) crt_series.refresh_patch(edit = options.edit, show_patch = options.showpatch, - sign_str = options.sign_str) + sign_str = options.sign_str, + backup = False) out.done() def __import_file(filename, options, patch = None): diff --git a/stgit/stack.py b/stgit/stack.py index 7f16711..3139822 100644 --- a/stgit/stack.py +++ b/stgit/stack.py @@ -767,7 +767,7 @@ class Series(PatchSet): author_name = None, author_email = None, author_date = None, committer_name = None, committer_email = None, - backup = False, sign_str = None, log = 'refresh', + backup = True, sign_str = None, log = 'refresh', notes = None, bottom = None): """Generates a new commit for the topmost patch """ diff --git a/t/t1202-push-undo.sh b/t/t1202-push-undo.sh index 039103a..51ae138 100755 --- a/t/t1202-push-undo.sh +++ b/t/t1202-push-undo.sh @@ -52,4 +52,10 @@ test_expect_success \ stg push --undo ' +test_expect_success \ + 'Check the push after undo fails as well' \ + ' + ! stg push bar + ' + test_done