Date: Sat, 9 Feb 2002 19:46:29 +0000 From: Tony Finch <dot@dotat.at> To: fyre@orbital.wiretapped.net Cc: "M. Warner Losh" <imp@village.org>, freebsd-standards@FreeBSD.ORG Subject: Re: diff problem Message-ID: <20020209194629.A11392@chiark.greenend.org.uk> In-Reply-To: <20020209140259.A51448@descent.robbins.dropbear.id.au>; from tim@robbins.dropbear.id.au on Sat, Feb 09, 2002 at 02:02:59PM %2B1100 References: <20020209140259.A51448@descent.robbins.dropbear.id.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 09, 2002 at 02:02:59PM +1100, Tim Robbins wrote: > > I have absolutely no idea why we have both version 2.5 and version 2.1 of > patch in the tree. 2.5 lives in /usr/src/contrib/patch, 2.1 lives in > /usr/src/gnu/usr.bin/patch. Version 2.1 ends up in /usr/bin, version 2.5 > is not installed anywhere I can find. The reason for this is that versions of `patch` after 2.1 do not correctly handle the output of `cvs diff`. For example, on FreeBSD-4.5-STABLE, first using `patch` 2.5 then using `patch` 2.1: fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; cvs diff > patch cvs diff: Diffing . cvs diff: Diffing bltin cvs diff: Diffing funcs fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 1; cat patch Index: bltin/echo.c =================================================================== RCS file: /home/ncvs/src/bin/sh/bltin/echo.c,v retrieving revision 1.9.2.1 diff -u -r1.9.2.1 echo.c --- bltin/echo.c 29 Jun 2000 20:51:59 -0000 1.9.2.1 +++ bltin/echo.c 9 Feb 2002 19:41:00 -0000 @@ -37,6 +37,8 @@ * $FreeBSD: src/bin/sh/bltin/echo.c,v 1.9.2.1 2000/06/29 20:51:59 mph Exp $ */ +/* example change */ + /* * Echo command. */ fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; rm -r bltin fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; cvs up cvs update: Updating . ? patch ? tmp cvs update: Updating bltin U bltin/bltin.h U bltin/echo.1 U bltin/echo.c cvs update: Updating funcs fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; /FreeBSD/releng4/contrib/patch/patch < patch can't find file to patch at input line 8 Perhaps you should have used the -p or --strip option? The text leading up to this was: -------------------------- |Index: bltin/echo.c |=================================================================== |RCS file: /home/ncvs/src/bin/sh/bltin/echo.c,v |retrieving revision 1.9.2.1 |diff -u -r1.9.2.1 echo.c |--- bltin/echo.c 29 Jun 2000 20:51:59 -0000 1.9.2.1 |+++ bltin/echo.c 9 Feb 2002 19:41:00 -0000 -------------------------- File to patch: ^C fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 130; patch < patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: bltin/echo.c |=================================================================== |RCS file: /home/ncvs/src/bin/sh/bltin/echo.c,v |retrieving revision 1.9.2.1 |diff -u -r1.9.2.1 echo.c |--- bltin/echo.c 29 Jun 2000 20:51:59 -0000 1.9.2.1 |+++ bltin/echo.c 9 Feb 2002 19:41:00 -0000 -------------------------- Patching file bltin/echo.c using Plan A... Hunk #1 succeeded at 37. done fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; Tony. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020209194629.A11392>