This argument is rarely used so adding a default value simplifies the
calling code.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
Acked-by: Karl Hasselström <kha@treskal.com>
applied = [p for p in stack.patchorder.applied if p not in patches] + \
patches
unapplied = [p for p in stack.patchorder.unapplied if not p in patches]
applied = [p for p in stack.patchorder.applied if p not in patches] + \
patches
unapplied = [p for p in stack.patchorder.unapplied if not p in patches]
- hidden = list(stack.patchorder.hidden)
iw = stack.repository.default_iw
clean_iw = (not options.keep and iw) or None
iw = stack.repository.default_iw
clean_iw = (not options.keep and iw) or None
check_clean_iw = clean_iw)
try:
check_clean_iw = clean_iw)
try:
- trans.reorder_patches(applied, unapplied, hidden, iw)
+ trans.reorder_patches(applied, unapplied, iw = iw)
except transaction.TransactionHalted:
pass
return trans.run(iw)
except transaction.TransactionHalted:
pass
return trans.run(iw)
else:
insert_idx = 0
applied = applied[:insert_idx] + patches + applied[insert_idx:]
else:
insert_idx = 0
applied = applied[:insert_idx] + patches + applied[insert_idx:]
unapplied = [p for p in stack.patchorder.unapplied if p not in patches]
unapplied = [p for p in stack.patchorder.unapplied if p not in patches]
- hidden = list(stack.patchorder.hidden)
iw = stack.repository.default_iw
clean_iw = (not options.keep and iw) or None
iw = stack.repository.default_iw
clean_iw = (not options.keep and iw) or None
check_clean_iw = clean_iw)
try:
check_clean_iw = clean_iw)
try:
- trans.reorder_patches(applied, unapplied, hidden, iw)
+ trans.reorder_patches(applied, unapplied, iw = iw)
except transaction.TransactionHalted:
pass
return trans.run(iw)
except transaction.TransactionHalted:
pass
return trans.run(iw)
# Update immediately.
update()
# Update immediately.
update()
- def reorder_patches(self, applied, unapplied, hidden, iw = None):
+ def reorder_patches(self, applied, unapplied, hidden = None, iw = None):
"""Push and pop patches to attain the given ordering."""
"""Push and pop patches to attain the given ordering."""
+ if hidden is None:
+ hidden = self.hidden
common = len(list(it.takewhile(lambda (a, b): a == b,
zip(self.applied, applied))))
to_pop = set(self.applied[common:])
common = len(list(it.takewhile(lambda (a, b): a == b,
zip(self.applied, applied))))
to_pop = set(self.applied[common:])