X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/64354a2d7d5f11f2592f72b74b48d750cf00c6f7..d98a499cb2a75decec1fb5f313ec07fa8e00ec2d:/stgit/stack.py diff --git a/stgit/stack.py b/stgit/stack.py index 0113a1c..93a3d4e 100644 --- a/stgit/stack.py +++ b/stgit/stack.py @@ -601,7 +601,7 @@ class Series: author_name = None, author_email = None, author_date = None, committer_name = None, committer_email = None, - backup = False, log = 'refresh'): + backup = False, sign_str = None, log = 'refresh'): """Generates a new commit for the given patch """ name = self.get_current() @@ -633,6 +633,10 @@ class Series: if not committer_email: committer_email = patch.get_commemail() + if sign_str: + descr = '%s\n%s: %s <%s>\n' % (descr.rstrip(), sign_str, + committer_name, committer_email) + bottom = patch.get_bottom() commit_id = git.commit(files = files, @@ -971,6 +975,11 @@ class Series: patch = Patch(name, self.__patch_dir, self.__refs_dir) + # only keep the local changes + if keep and not git.apply_diff(git.get_head(), patch.get_bottom()): + raise StackException, \ + 'Failed to pop patches while preserving the local changes' + git.switch(patch.get_bottom(), keep) # save the new applied list