from stgit import stack, git
help = 'push patches to the top, even if applied'
-usage = """%prog [options] [<patches> | <series>]
+usage = """%prog [<patches> | -s [<series>] ]
Push a patch or a range of patches to the top even if applied. The
necessary pop and push operations will be performed to accomplish
this. The '--series' option can be used to rearrange the (top) patches
as specified by the given series file (or the standard input)."""
+directory = DirectoryGotoToplevel()
options = [make_option('-s', '--series',
help = 'rearrange according to a series file',
action = 'store_true')]
check_local_changes()
check_conflicts()
- check_head_top_equal()
+ check_head_top_equal(crt_series)
unapplied = crt_series.get_unapplied()
applied = crt_series.get_applied()
# check whether the operation is really needed
if topop != topush:
if topop:
- pop_patches(topop)
+ pop_patches(crt_series, topop)
if topush:
topush.reverse()
- push_patches(topush)
+ push_patches(crt_series, topush)