This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: How to generate a patch for a new file?
- From: Zack Weinberg <zack at codesourcery dot com>
- To: "Dave Korn" <dk at artimi dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Wed, 21 Apr 2004 11:59:49 -0700
- Subject: Re: How to generate a patch for a new file?
- References: <NUTMEGEZTBqmD9TgDW40000055b@NUTMEG.CAM.ARTIMI.COM>
"Dave Korn" <dk@artimi.com> writes:
>> Yeah. You need to cvs add first as cgd said.
>
> And if you don't have write-access to the sourceware CVS, your only way of
> getting a file added to it is by submitting it as a patch.
You can fake CVS out like so:
echo '/FILENAME/0/dummy timestamp//' >> CVS/Entries
where FILENAME is the name of the file you want to add, and everything
else is literal text. Do this in the immediate parent directory of
the file. cvs diff -N will then do the right thing.
This is, in fact, the only persistent effect of 'cvs add' of a file;
it just insists on checking that you have repository write access
first. (cvs add of a *directory* modifies the repository right then
and there; I suspect they couldn't be bothered to distinguish for
purposes of access control.)
People have written scripts that do the above for you, but I can never
remember where to find them.
zw