patchQuilt - Patches: patch #10094, refresh: Preserve the `-pab' strip...


You are not allowed to post comments on this tracker with your current authentication level.

patch #10094: refresh: Preserve the `-pab' strip level in the series file

Submitter:  Macaron <macaron>
Submitted:  Tue 10 Aug 2021 09:10:22 AM UTC
Category:  None Priority:  5 - Normal
Status:  Invalid Privacy:  Public
Assigned to:  khali Open/Closed:  Closed

Thu 20 Jun 2024 04:16:57 PM UTC, comment #3: 

After discussion on the mailing list, there was an agreement that the current implementation was clumsy, but no obvious resolution. So I went for the most simple solution and removed option "-p ab" from the "new" command, to make it clear that "-p ab" in series files is not supported.

After this change, we consistently only support options in the series file, which need to be passed to the patch utility to apply the patch (strip level and reverse), and not patch formatting options.

For completeness, note that the patch attached to this report was not sufficient to fix the problem anyway. It would indeed let the "refresh" command preserve "-p ab" in the series file, but other quilt commands would later fail because of this. More work would be needed for it to work, and even more work to support all other patch formatting options for consistency.

Jean Delvare <khali>
Group administrator
Mon 30 Aug 2021 08:29:11 AM UTC, comment #2: 

By the way, what is your use case?

Would there be any downside for your workflow if instead of "quilt new -p ab" you would use "quilt new" and later "quilt refresh -p ab"? Or even adding:


in your ~/.quiltrc file so that the setting is automatically applied to all patches in the future?

Jean Delvare <khali>
Group administrator
Mon 30 Aug 2021 08:24:40 AM UTC, comment #1: 

I'm not sure if this is a bug. The original purpose of the options in the series file was to allow patch(1) to apply the patches. "-p ab" does not serve this purpose.

As a comparison point, if you import a reverted patch with "quilt import -R", option "-R" will be added to the patch in the series file initially, however it will be removed when you refresh that patch (a non-reverted patch will be generated).

On the other hand, I see no other reason why the "new" command would allow option "-p ab", if that information isn't going to be used and preserved when refreshing the patch. But I also find equally odd that the first part of the feature has been added over 10 years ago and nobody bothered completing it or complaining that it wasn't working, until today.

Let me ask the developers who added it, in case I'm missing something.

Jean Delvare <khali>
Group administrator
Tue 10 Aug 2021 09:10:22 AM UTC, original submission:  

Hi all,

After refreshing a patch created with `quilt new -pab', the series file loses the `-pab' option after the patch name. This also happens when refreshing with `quilt refresh -pab': the `-pab' option is not stored into the series file.

This is due to the fact that `quilt refresh' updates the series file using `change_db_strip_level -p$num_strip_level'. However, the actual strip level is in `$opt_strip_level'. `$num_strip_level' only contains the numeric strip level which is given to `remove-trailing-ws' and `diffstat'.

The attached patch should fix this without (hopefully!) breaking anything else.



Macaron <macaron>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by khali (Posted a comment)
  • -email is unavailable- added by macaron (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-06-20 khali StatusNeed Info Invalid
        Open/ClosedOpen Closed
    2021-08-30 khali StatusIn Progress Need Info
        Assigned toNone khali
    2021-08-30 khali StatusNone In Progress
    2021-08-10 macaron Attached File- Added refresh-Preserve-the-pab-strip-level-in-the-series-file.patch, #51757

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code