Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: cvsdiff2udiff
Home

[Freeciv-Dev] Re: cvsdiff2udiff

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: cvsdiff2udiff
From: Reinier Post <rp@xxxxxxxxxx>
Date: Tue, 4 Mar 2003 17:36:57 +0100

On Tue, Mar 04, 2003 at 04:12:30AM -0500, Jason Dorje Short wrote:

[...]

> >>Doh. That is what I get for hand-converting from RCS diff to patch format.
> >>:-P
> >>
> >>I guess I'll get some script to do this for me in the future.
> >
> >
> >Try this.  I wrote it to "un-CVS" a cvs diff, but it does a lot more now.
> >Patches on pubserver are fed through this before they are applied.
> >A possible way to apply:
> >
> >  case "`cvsdiff2udiff $patch | p0p1`" in
> >  -p*) cvsdiff2udiff $patch | patch -f || exit 1;;
> >    *) exit 3;;
> >  esac
> 
> What is the problem that this is supposed to fix?  How does RCS diff 
> differ from patch format?  There are a few extra lines (Index: and RCS 
> file: ones, I guess); in what cases are those a problem?

All I know is that I remember running into a 'cvs diff' result that didn't
apply to my local freeciv/ tree and writign the script to make it work.
I updated it since to make it work with most patches I found in the wild.
 
> The only problem I've ever had is that I always do "patch -p0", which is 
> sometimes wrong ('diff' will make -p1 patches instead by default).

Yes, that's what the p0p1 script is for.  It figures out whether to use
-p0 or -p1.  The reason it's a separate script is that it needs to look
on the filesystem; cvsdiff2udiff doesn't.

> jason

-- 
Reinier


[Prev in Thread] Current Thread [Next in Thread]