Creating patches using CVS

Today I needed to create a patch to LTIB build system, oh gosh, LTIB uses CVS to version control.

LTIB people suggest me to use “cvs diff -u” to create patches, but it is not too easy as it appears. If you haven’t write access to repository, “cvs diff -u” will only works to existent files on CVS server which you change in your local copy.

Then if you create a new directory and a new file you need other approach. You need to install cvsutils to get the command “cvsdo”. The cvsdo will pretend to write the CVS entries and the normal cvs will think these files really exist on external repository.

Then this is the tip:
* First modify the file which already existent on repository;
When you got finished, execute:
$ cvs diff -u > ~/mymod.patch

* Create the directories and files you want;
Then execute:
$ cvsdo add newdirectoryadded/
$ cvsdo add newdirectoryadded/newfileonthisnewdir.c
$ cvsdo diff newdirectoryadded >> ~/mymod.patch

I hope there is some other easy way to create patch using CVS, but on my searches I just found it.

This is because I love git, I don’t need recreating wheel to get it working.

One thought on “Creating patches using CVS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s