Search TheCodeArtist

Quilt : This patch can be reverse applied

Quilt is a very sweet little tool. Very easy for generating & maintaining a series of  patches to your code. Anyone involved in even a moderate bit of quilting will often come across this message especially when trying to apply imported patches.

Patch <patch-name here> can be reverse-applied

What exactly does this message mean?

Quilt is basically trying to tell us that ALL the changes in the patch (we are trying to apply) are already present in our code.The term "reverse-applied" seems to be derived from some other version-control system.


How-To Resolve this error?...

Simply comment the patch file in the series file as follows:

prev patch file
#current patch file    <-- this patch can be reverse-applied.
next patch file1
next patch file2

This effectively means that since all the changes provided by this patch are already present in your existing code, you are ignoring this patch completely and moving on to the next patch in the series.

Read more about quilt here.

UPDATE: 
Also one can use the patch -R command to reverse-apply
(i.e. revert) the patch. This is equivalent to removing the changes made by the patch, without altering the series.
(i.e. without quilt in the picture.)


After the patch -R command succeeds, then quilt push should work well and add the changes back and proceed to the next patch-file in the series.

Read more about patch here.

No comments :

Post a Comment