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

[GUILT PATCH v2 0/5] Add guards to guilt

From
ELEric Lesh <eclesh@ucla.edu>
Date
Jul 31, 2007, 03:11 UTC
Message-ID
<1185851481190-git-send-email-eclesh@ucla.edu>
Changes in v2
        - get_series returns guarded series, get_full_series gives
          full series.  Most commands want the guarded series anyway.
        - more options for guilt-select (better hg compatability)
        - rename guilt-guards to guilt-guard (better hg compatability)
        - a couple bug fixes
        - an extra patch that adds a test suite

This series adds Mercurial Queues-like guards to guilt. It allows you to assign guards to related patches in the series file to selectively push patches.

See Chapter 13 of the HG Book for more info. (http://hgbook.red-bean.com/hgbookch13.html)

Guards are appended as "#+foo" or "#-foo" to the end of the patch name in the series file, so they are compatible with quilt. The guard setting and unsetting functions also respect comments on the patch line, so they aren't mangled when you use guards.

This changes `get_series` to return the guarded series of patches that will be actually be applied. `get_full_series` returns the full series file.

If you change guards on a patch or select a different guard while patches are applied, some commands might get confused. See `guilt-select --pop` and `guilt-select --reapply` to avoid having to `guilt-pop -a` yourself.

I did everything (maybe?) you suggested except implement a safe_sed wrapper and a validate_guards function. The sed stuff is maybe better for a later patch that covers most sed usage in guilt, and the validate_guards isn't really necessary given the small number of times it's called. If you would prefer either of those to get done, let me know.

[PATCH 1/5] get_series: Remove comments from end of series lines
       This just strips everything but the patch name from get_series,
       to hide comments or guards on the line.
[PATCH 2/5] guilt-guard: Assign guards to patches in series
       This adds the guilt-guard command and utility functions to
       guilt.  Introduces get_guarded_series, which is removed in
       patch 4.
[PATCH 3/5] guilt-select: Select guards to apply when pushing patches
       This puts selected guards in .git/patch/$branch/guards, and
       adds a $guards_file variable to guilt.
[PATCH 4/5] get_series: return guarded patches only
       Actually distinguish between guarded and non-guarded patches in
       a number of commands by making get_series return the guarded
       series, and introducing get_full_series to return the unguarded
       series.  Lots of changes.
       If anything breaks, it's in this patch.  Hopefully.
[PATCH 5/5] Guards test suite
       Test stuff that uses get_series or get_full_series.
Next: Eric Lesh
Message 1 of 16 in “Add guards to guilt”
  1. 0/5 Add guards to guiltEric Lesh, Jul 31, 2007
  2. 1/5 get_series: Remove comments from end of series linesEric Lesh, Jul 31, 2007
  3. Josef SipekJul 31, 2007
  4. 2/5 guilt-guard: Assign guards to patches in seriesEric Lesh, Jul 31, 2007
  5. Josef SipekJul 31, 2007
  6. Eric LeshAug 9, 2007
  7. David KastrupAug 9, 2007
  8. Thomas AdamAug 9, 2007
  9. David KastrupAug 9, 2007
  10. Eric LeshAug 9, 2007
  11. Eric LeshAug 9, 2007
  12. Josef SipekAug 9, 2007
  13. 3/5 guilt-select: Select guards to apply when pushing patchesEric Lesh, Jul 31, 2007
  14. 4/5 get_series: return guarded patches onlyEric Lesh, Jul 31, 2007
  15. 5/5 Guards test suiteEric Lesh, Jul 31, 2007
  16. Josef SipekJul 31, 2007

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.