Search code examples
cvs

Can I modify a file in CVS server repo without committing


I have a CVS server where my code base is stored. I have root on this server. I want to update a source code file and although I could check it out and check back in I want to just modify it straight up using root permissions in the file. When I download the file I notice the ",v" extension file has the most recent version of the code in it. Can I just change that? If I do will this change show up anywhere?


Solution

  • Yes, but don't.

    A ,v file does contain a copy of the most recent version of the file. If you have read/write access to it, you can modify it, and the the result will be a change to the current version.

    If you know the format well enough, you might even be able to change previous versions and metadata.

    You might have to force an update to your working copy to named the change appear, since CVS will assume that the ,v file hasn't changed (you've put the repo into an inconsistent state).

    But again, don't do this unless you have a very good reason. If you want to change a file in CVS, make the change in a working copy and check it in. By editing the ,v file, you defeat much of the purpose for using a source control system.