help = 'pop all the applied patches',
action = 'store_true'),
make_option('-n', '--number', type = 'int',
- help = 'pop the specified number of patches')]
+ help = 'pop the specified number of patches'),
+ make_option('-k', '--keep',
+ help = 'keep the local changes',
+ action = 'store_true')]
def func(parser, options, args):
if len(args) > 1:
parser.error('incorrect number of arguments')
- check_local_changes()
check_conflicts()
check_head_top_equal()
+ if not options.keep:
+ check_local_changes()
+
applied = crt_series.get_applied()
if not applied:
raise CmdException, 'No patches applied'
if patches == []:
raise CmdException, 'No patches to pop'
- pop_patches(patches)
+ pop_patches(patches, options.keep)
print_crt_patch()