usage = """%prog [options] <new-base-id>
Pop all patches from current stack, move the stack base to the given
-<new-base-id> and push the patches back."""
+<new-base-id> and push the patches back.
+If you experience merge conflicts, resolve the problem and continue
+the rebase by executing the following sequence:
+
+ $ stg resolved -a [-i]
+ $ stg refresh
+ $ stg goto top-patch
+
+Or if you want to skip that patch:
+
+ $ stg push --undo
+ $ stg push next-patch..top-patch"""
+
+directory = DirectoryGotoToplevel()
options = [make_option('-n', '--nopush',
help = 'do not push the patches back after rebasing',
action = 'store_true'),
check_local_changes()
check_conflicts()
- check_head_top_equal()
+ check_head_top_equal(crt_series)
# ensure an exception is raised before popping on non-existent target
- if git_id(args[0]) == None:
+ if git_id(crt_series, args[0]) == None:
raise GitException, 'Unknown revision: %s' % args[0]
- applied = prepare_rebase()
- rebase(args[0])
- post_rebase(applied, options.nopush, options.merged)
+ applied = prepare_rebase(crt_series)
+ rebase(crt_series, args[0])
+ post_rebase(crt_series, applied, options.nopush, options.merged)
- print_crt_patch()
+ print_crt_patch(crt_series)