cvs diff of new files over a read-only CVS repository access
Today I’ve found a problem trying to create a patch with cvs. I haven’t got write access to gnome repository. This way I have only read-only access to it. The problem is when I try to create a patch with new files involved.
If I run:
$ cvs diff -N
it ignores the new files. If I run:
$ cvs diff -N changedfile1 changedfile2 newfile1 newfile2
it says something like this for every new file:
cvs server: I know nothing about newfile1
An easy solution would be creating two patches:
- One patch using standard cvs diff
- A second patch for new files, using diff command against
/dev/null
.
But there’s another trick to get a standard patch from cvs. You have to edit the CVS/Entries file of the directory you want to add a file. For example, for a newfile1
in directory directory1
, you would change the directory1/CVS/Entries
file and add an entry like this one:
/newfile1/0/Initial newfile1//
Then I can do a standard cvs diff command like this one:
$ cvs diff -N
and this will include the new files in the patch. Of course you can use the -u
/-U
parameters to get unified format patches.
- Previous: DBus support for JHBuild (2)
- Next: Jhbuild + buildbot