Pop all patches from current stack, move the stack base to the given
<new-base-id> and push the patches back."""
+directory = DirectoryHasRepository()
options = [make_option('-n', '--nopush',
help = 'do not push the patches back after rebasing',
action = 'store_true'),
make_option('-m', '--merged',
help = 'check for patches merged upstream',
- action = 'store_true'),
- make_option('--force',
- help = 'force rebase even if the stack based was moved by (un)commits',
action = 'store_true')]
def func(parser, options, args):
# ensure an exception is raised before popping on non-existent target
if git_id(args[0]) == None:
- raise GitException, 'Unknown revision: %s' % git_id
+ raise GitException, 'Unknown revision: %s' % args[0]
- applied = prepare_rebase(force=options.force)
+ applied = prepare_rebase()
rebase(args[0])
post_rebase(applied, options.nopush, options.merged)