from stgit.commands.common import *
from stgit.utils import *
+from stgit.out import *
from stgit import stack, git
Note that the 'delete' operation is irreversible."""
+directory = DirectoryGotoToplevel()
options = [make_option('-b', '--branch',
help = 'use BRANCH instead of the default one')]
all_patches = applied_patches + unapplied_patches
if args:
- patches = parse_patches(args, all_patches)
+ patches = parse_patches(args, all_patches, len(applied_patches))
else:
parser.error('No patches specified')
if applied and not options.branch:
check_local_changes()
check_conflicts()
- check_head_top_equal()
+ check_head_top_equal(crt_series)
# delete the patches
for patch in applied + patches:
crt_series.delete_patch(patch)
- print 'Patch "%s" successfully deleted' % patch
+ out.info('Patch "%s" successfully deleted' % patch)
if not options.branch:
- print_crt_patch()
+ print_crt_patch(crt_series)