[comp.sources.d] Bug in -R flag of patch ?

jos@idca.tds.PHILIPS.nl (Jos Vos) (06/27/89)

When using the -R (reverse patch) flag of patch, only the first
file is automatically patched in the reverse order.
For subsequent files patch "detects" that the patch was already aplied
and aks confirmation for patching the other way around.

Is this a know problem and does a patch exist for that?
My patch -v says:

	$Header: patch.c,v 2.0.1.6 88/06/22 20:46:39 lwall Locked $
	Patch level: 12

Is there a newer version?

-- 
-- ######   Jos Vos   ######   Internet   jos@idca.tds.philips.nl   ######
-- ######             ######   UUCP         ...!mcvax!philapd!jos   ######

joe@modcomp.UUCP (06/28/89)

> When using the -R (reverse patch) flag of patch, only the first file is
> automatically patched in the reverse order.  For subsequent files patch
> "detects" that the patch was already aplied ...

This is a very annoying (but documented) feature of patch, alas.  The
problem is that patch has made this a "local flag".  Each embedded diff
set in the patch file is treated as if it was a separate file processed
by a separate instance of patch.  The local flags of each diff set have
to be separated with the plus sign on the command line.

A global -R facility would be useful in "backing out" patch files --
something I need when new, official patches come down the net and I
want to back out our site-specific patches before applying them.
Someday, I'll do it -- if it hasn't already been done somewhere out
there in netland.

joe korty
uunet!modcomp!joe