- def __begin_stack_check(self):
- """Save the current HEAD into .git/refs/heads/base if the stack
- is empty
- """
- if len(self.get_applied()) == 0:
- head = git.get_head()
- write_string(self.__base_file, head)
-
- def __end_stack_check(self):
- """Remove .git/refs/heads/base if the stack is empty.
- This warning should never happen
- """
- if len(self.get_applied()) == 0 \
- and read_string(self.__base_file) != git.get_head():
- print 'Warning: stack empty but the HEAD and base are different'
-