I’m on a Windows XP system, and I execute this command from the command line:
cvs -d :pserver:CharlesAnderson@ServerName/RepositoryName login -p <pw>
which generates this response:
Logging in to :pserver:CharlesAnderson@servername:2401:/RepositoryName
If I then type:
cvs logout
I get this message:
cvs logout: bad CVSROOT - Cannot specify port: ":pserver:CharlesAnderson@ServerName:2401/RepositoryName"
Rebooting my PC didn’t help. How have I got into this state, and how can I get out of it?
As you did not specify a CVSROOT (i.e.
-doption) for thelogoutcommand, CVS can only get this either from the environment block or from the metadata of an already checked out working copy (i.e. the./CVS/Rootfile). Could it be you specified the CVSROOT via an environment variable and forgot the second colon (i.e. the one after the port number)? Also, specifying port 2401 explicitly shouldn’t be necessary as it is already the default port for:pserver:(and in your example you actually did not specify the port when you ran thelogincommand).In any case
logoutwill only work when the specified CVSROOT matches the one that was used for login.Finally, you should be aware that
loginandlogoutdo not delimit a “session”. CVS uses a session-less protocol. What thelogincommand actually does is locally cache your password so you won’t have to reenter it for every command (CVS implicitly reads it from the cache each time).Logoutremoves the password from the cache again so the next time you run a command you will have to enter it again.