git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Catalin MarinasNext: Catalin Marinas
Message 17 of 19 in “Various StGit patches”
  1. 0/5 Various StGit patchesCatalin Marinas, Mar 12, 2009
  2. 1/5 Check for local changes with "goto"Catalin Marinas, Mar 12, 2009
  3. Karl HasselströmMar 13, 2009
  4. Catalin MarinasMar 16, 2009
  5. Karl HasselströmMar 17, 2009
  6. Catalin MarinasMar 17, 2009
  7. Karl HasselströmMar 17, 2009
  8. 2/5 Add mergetool support to the classic StGit infrastructureCatalin Marinas, Mar 12, 2009
  9. Karl HasselströmMar 13, 2009
  10. 3/5 Add automatic git-mergetool invocation to the new infrastructureCatalin Marinas, Mar 12, 2009
  11. Karl HasselströmMar 13, 2009
  12. Catalin MarinasMar 16, 2009
  13. Karl HasselströmMar 17, 2009
  14. 4/5 Convert "sink" to the new infrastructureCatalin Marinas, Mar 12, 2009
  15. Karl HasselströmMar 13, 2009
  16. 5/5 Convert "float" to the lib infrastructureCatalin Marinas, Mar 12, 2009
  17. Karl HasselströmMar 13, 2009
  18. Catalin MarinasMar 16, 2009
  19. Karl HasselströmMar 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.