How to generate a patch for a new file?

Zack Weinberg zack@codesourcery.com
Wed Apr 21 19:00:00 GMT 2004


"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



More information about the Binutils mailing list