Re: [StGit PATCH 5/5] Convert "float" to the lib infrastructure
From: Karl Hasselström <hidden>
Date: 2016-06-15 22:46:23
Nice job here too. On 2009-03-12 12:09:18 +0000, Catalin Marinas wrote:
options = [
opt('-s', '--series', action = 'store_true',
- short = 'Rearrange according to a series file')]
+ short = 'Rearrange according to a series file')
+ ] + argparse.keep_option()
This flag should take the filename as a parameter, both because it's
the right thing to do and because it'll make the tab completion work
right (as is, it'll complete on patch names after the -s flag).
Something like
opt('-s', '--series', type = 'string')
ought to do it.
+ applied = [p for p in stack.patchorder.applied if p not in patches] + \ + patches + unapplied = [p for p in stack.patchorder.unapplied if p not in patches]
It may be just me, but I find "not p in patches" more readable than "p not in patches". Oh, and the backslash. Feel free to ignore, of course. :-)
+ hidden = list(stack.patchorder.hidden) + + iw = stack.repository.default_iw + clean_iw = not options.keep and iw or None + trans = transaction.StackTransaction(stack, 'sink', + check_clean_iw = clean_iw) + + try: + trans.reorder_patches(applied, unapplied, hidden, iw)
That default value for hidden would've come in handy here too!
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle