Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apply patch line-by-line

Tags:

patch

Since I'm stuck with Subversion and shell tools for the time, git-gui and such are out of the question. Are there any shell tools to apply a patch line-by-line interactively?

like image 441
l0b0 Avatar asked Feb 09 '11 14:02

l0b0


People also ask

Which command is used for patching?

The patch command reads a source file's instructions on how to change a file, then applies the changes. The source file contains difference listings (or diff listings) produced by the diff -c or -u command, and one or more sets of diff command output, customarily called hunks.


2 Answers

Try passing the --dry-run option to patch. This will let you identify the problem hunks and edit the patch and/or file being patched appropriately.

like image 169
ezod Avatar answered Oct 20 '22 00:10

ezod


ipatch brings the power and convenience of selecting and editing patches in Darcs to those who are not using the Darcs version control system.

It allows the user to interactively split a patch file into several patch file, as well as applying a patch interactively and possibly partially.

There's an introduction from the author here.

like image 4
ephemient Avatar answered Oct 19 '22 23:10

ephemient