What is CVS "pserver" mode?

cvs
Johan Fredrik Varen picture Johan Fredrik Varen · Jan 5, 2010 · Viewed 24.6k times · Source

Could someone tell me exactly what the "pserver" mode is, in regards to CVS? The term "pserver" is used frequently, but I've yet to find an explanation of what it actually is. If "pserver" is a special mode, then I assume there is a default mode as well. If so, what is the difference between the two?

Answer

Dave Webb picture Dave Webb · Jan 5, 2010

pserver is a method for giving remote access to CVS repository. Basically you run cvs as a server listening on port 2401.

The "default" mode would be local access, where a developer has an account on the system hosting the CVS repository and accesses its directory and files directly. So for a local repository CVSROOT would just be directory:

CVSROOT=/opt/path/to/my/repo

Although, if you like you can explicitly state this this is a local respository:

CVSROOT=:local:/opt/path/to/my/repo

For a pserver connection we have to specify some more, the host the repository is running on, our username, and the path to the repo on that host:

CVSROOT=:pserver:username@hostname:/opt/path/to/my/repo

A better mode for remote access for a CVS repository would be ext which can used to access a repository via SSH.

CVSROOT=:ext:username@hostname:/opt/path/to/my/repo
CVS_RSH=ssh