quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] issue with quilt push -f


From: Aristeu Rozanski
Subject: [Quilt-dev] issue with quilt push -f
Date: Wed, 17 Sep 2014 16:52:15 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Hello!
So we stumbled today with something unexpected. This big patch was
patching one file and the first hunk was already applied by a previous
patch. quilt push had as output the 'patch -f' behavior:

        patching file drivers/gpu/drm/radeon/radeon_atpx_handler.c
        Hunk #1 FAILED at 8.
        Hunk #2 succeeded at 33 (offset -1 lines).
        Hunk #3 succeeded at 59 (offset -1 lines).
        Hunk #4 succeeded at 219 (offset -1 lines).
        Hunk #5 succeeded at 453 (offset -1 lines).
        1 out of 5 hunks FAILED -- saving rejects to file /tmp/quilt.CxJhKq

The next step, my usual "quilt push -f" didn't quite did the expected,
it just ran patch without -f and patch just thought it was a full revert
based on the first hunk. Now I understand that "quilt push -f -q" will
make quilt use "-f" for patch, but here's the problem: using quilt push
without -q is supposed to be "interactive" except it isn't after the
color output support:
        for patch in $patches
        do
                if ! add_patch "$patch"
                then
                        exit 1
                fi
                [ -n "$opt_quiet" ] || echo
        done \
        | cleanup_patch_output \
        | colorize

This effectively makes patch's stdout to not be a tty and it will just
assume "n" for answer. Removing the pipes in a quick test proved this is
indeed the case. The result is that file not being patched at all and not
being added to the list of changed files. Obviously, some head scratching
trying to figure out what was going on.

So, I don't follow quilt's development list (although I use quilt for a
long time), so before proposing a patch, I'd like to ask first which way
to fix this:
        1) could simply use -f for patch always, and have -q still
           useful to supress further messages
        2) could not use colors and supress patch messages unless -q is
           specified (which would be a little weird since I believe the
           coloring would be more useful when you're not using -q)
        3) just not have coloring in quilt push at all

Or am I missing some other solution here?
Thanks

-- 
Aristeu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]