CVS commands stopped working in MacOS X terminal
Today, for the first time in months, I needed to use CVS on the command line on my Mac (MacOS X 10.4) and found the commands no longer work. In response to:
cvs diff -u
I got:
cvs diff: CVSROOT requires a path spec:
cvs diff: :(gserver|kserver|pserver):[[user][:password]@]host[:[port]]/path
cvs diff: [:(ext|server):][[user]@]host[:]/path
cvs diff: in directory .:
cvs diff: ignoring CVS/Root because it does not contain a valid root.
cvs diff: No CVSROOT specified! Please use the `-d' option
cvs [diff aborted]: or set the CVSROOT environment variable.
However, I happily use SmartCVS 7.0.8 on the same machine. The directory I was in contains a CVS folder with a root file that looks exactly what I expected.
Can anyone suggest that the CVS command may have stopped working when SmartCVS is still functioning perfectly?
I found the problem. SmartCVS creates root files with backslashes in them instead of forward slashes. If I edit the root file to add a forward slash instead, "cvs diff" works fine. (SmartCVS, on the other hand, now refuses to acknowledge the existence of my source tree.)
Most likely your bashrc or mac-terminal equivalent (Im a linux user) doesn't have a line that sets CVSROOT for some reason?
export CVSROOT=:ext:user@domain.com:/home/cvs
The absence of this set will cause this error.
You can use homebrew to install cvs. Enter the following into your terminal:
brew install cvs
which should work