tags:

views:

113

answers:

2

Today, for the first time in several months, I needed to use CVS on the command line on my Mac (MacOS X 10.4), and discovered that 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 am happily using SmartCVS 7.0.8 on the same machine. The directory I was in contains a CVS folder, with a Root file that looks exactly as I'd expect it to.

Can anyone suggest how command line CVS could have stopped working, when SmartCVS is still functioning perfectly?

A: 

Most likely your bashrc or mac-terminal-equivalent ( Im a linux user ) does not have the line which sets CVSROOT for whatever reason?

export CVSROOT=:ext:[email protected]:/home/cvs

Not having this set will provoke that error.

meder
Okay, I don't set up $CVSROOT, but I never have and nor has my colleague, and yet he can still use the 'cvs' command, and I used to be able to.
Charles Anderson
+1  A: 

I've found the problem. SmartCVS is creating Root files with a back slash in them instead of a forward slash. If I edit the Root file to put in a forward slash instead, 'cvs diff' works fine. (SmartCVS, on the other hand, now refuses to recognise the existence of my source tree.)

Charles Anderson