Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CVSROOT environment

Tags:

cvs

How to set the CVSROOT environment variable in WinCVS?

like image 892
Lakshmi Avatar asked Aug 02 '26 18:08

Lakshmi


2 Answers

The simple answer is: You don't need to. The CVSROOT environment variable is terribly overrated. CVS(NT) will only use it if all other methods of determining the repository connection string have been exhausted. People often assume that it is the other way round and then wonder that changes they've made to the CVSROOT environment variable are not effective.

The order in which CVS evaluates possible sources for the repository connection string:

  1. The -d option on the commandline. This is what WinCvs allows you to set via the CVSROOT option on the following dialogs: login, init, import, checkout and rtag. Also note that WinCvs remembers the CVSROOTs you've used in the past: If you revisit one of these dialogs you can simply pick the previous CVSROOTs from the dropdown.

  2. The contents of any ./CVS/Root files if present (they have the hidden attribute set by default in case you don't see them). This means that as soon as you are running a command inside a working copy there is no need to specify the CVSROOT via any other means. WinCvs also displays this in the status bar if available.

  3. Finally, as a last resort, the CVSROOT environment variable. This is useful when you're actually working on the commandline, executing commands outside a checked out sandbox but inside WinCvs there really is no point... either you already are inside a sandbox or you can simply pick the CVSROOT from the dropdown where it is needed.

If you need to change the connection settings of an existing working copy you need to modify the contents of the ./CVS/Root files. WinCvs comes with a macro that will simplify this for you. Just select the root folder of the working copy you want to change the CVSROOT for and go to Macros|CVS|Change CVSROOT...

Also see this FAQ item on the whole issue: http://cvsgui.sf.net/newfaq.htm#CvsrootWizard

like image 197
Oliver Giesen Avatar answered Aug 05 '26 22:08

Oliver Giesen


You can set it in the preferences pane at the "General" tab.

like image 20
Andreas Kraft Avatar answered Aug 05 '26 22:08

Andreas Kraft



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!