Re: [StGit PATCH 5/5] Convert "float" to the lib infrastructure
- From
Karl Hasselström <kha@treskal.com>
- Date
- Mar 13, 2009, 02:41 UTC
- Message-ID
- <20090313024137.GE15393@diana.vm.bytemark.co.uk>
- In-Reply-To
- <20090312120918.2992.82713.stgit@pc1117.cambridge.arm.com>
Nice job here too.
On 2009-03-12 12:09:18 +0000, Catalin Marinas wrote:
Show 5 quoted lines
> 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. :-)
Show 9 quoted lines
> + 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