From: Florian Kaufmann on
Hello

I was wondering if there is a way to mark conflicts right in the file
a patch is applied to. Currently I 'only' get a .rej file from patch
that contains the hunks that couldn't be applied. I think at least for
some of those rejected hunks it should be possible to mark them in the
file similar to the way diff3 does it for conflicts

<<<<<<< MYFILE
lines from MYFILE
=======
lines from PATCH
>>>>>>> PATCH

Are there any tools that can do such a thing? Preferably something
that nicely integrates into Emacs.

Regards

Flo
From: Sergei Organov on
Florian Kaufmann <sensorflo(a)gmail.com> writes:
> Hello
>
> I was wondering if there is a way to mark conflicts right in the file
> a patch is applied to. Currently I 'only' get a .rej file from patch
> that contains the hunks that couldn't be applied. I think at least for
> some of those rejected hunks it should be possible to mark them in the
> file similar to the way diff3 does it for conflicts
>
> <<<<<<< MYFILE
> lines from MYFILE
> =======
> lines from PATCH
> >>>>>>> PATCH
>
> Are there any tools that can do such a thing? Preferably something
> that nicely integrates into Emacs.

AFAIK, GNU patch v.2.6 (released 13 Nov 2009) can do this:

Changes in version 2.6:

[...]
* A --merge option has been added which will merge a patch file into
the original files similar to merge(1). See the patch(1) manual page for
documentation.

-- Sergei.

From: Ben Finney on
Sergei Organov <osv(a)javad.com> writes:

> Florian Kaufmann <sensorflo(a)gmail.com> writes:
> > I was wondering if there is a way to mark conflicts right in the
> > file a patch is applied to.
>
> AFAIK, GNU patch v.2.6 (released 13 Nov 2009) can do this:
>
> Changes in version 2.6:
>
> [...]
> * A --merge option has been added which will merge a patch file into
> the original files similar to merge(1). See the patch(1) manual page for
> documentation.

Serendipitous! Thanks for this, I would probably not have noticed if not
for this thread.

--
\ “If [a technology company] has confidence in their future |
`\ ability to innovate, the importance they place on protecting |
_o__) their past innovations really should decline.” —Gary Barnett |
Ben Finney