"""Merge a patch from a remote branch into the current tree.
"""
patch = remote_series.get_patch(pname)
- git.merge(patch.get_bottom(), git.get_head(), patch.get_top())
+ git.merge_recursive(patch.get_bottom(), git.get_head(), patch.get_top())
def __series_merge_patch(base, patchdir, pname):
"""Merge a patch file with the given StGIT patch.
to_pop = applied[applied.index(first_patch) + 1:]
if to_pop:
pop_patches(crt_series, to_pop[::-1])
+ pushed = [first_patch]
else:
to_pop = []
+ pushed = []
popped = to_pop + [p for p in patches if p in unapplied]
- for p in [first_patch] + popped:
+ for p in pushed + popped:
if p in popped:
# push this patch
push_patches(crt_series, [p])
# reset the patch backup information. That's needed in case we
# undo the sync but there were no changes made
- patch.set_bottom(bottom, backup = True)
patch.set_top(top, backup = True)
# the actual merging (either from a branch or an external file)