~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the preserving of the local changes during pop
[stgit]
/
stgit
/
stack.py
diff --git
a/stgit/stack.py
b/stgit/stack.py
index
26a2fc5
..
93a3d4e
100644
(file)
--- a/
stgit/stack.py
+++ b/
stgit/stack.py
@@
-975,6
+975,11
@@
class Series:
patch = Patch(name, self.__patch_dir, self.__refs_dir)
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
git.switch(patch.get_bottom(), keep)
# save the new applied list