CVS: Difference between revisions
No edit summary |
No edit summary |
||
Line 105: | Line 105: | ||
[[Category:Computing]] | [[Category:Computing]] | ||
[[Category: | [[Category:Code]] | ||
[[Category:CodeManagement]] |
Revision as of 22:38, 13 April 2017
This page page needs expert review!
Introduction
Our primary code base has moved to git but soem areas are still in Concurrent Version System (CVS).
There is a read-only interface to browse files in the repository http://cdcvs.fnal.gov/cgi-bin/public-cvs/cvsweb-public.cgi/mu2e/. This is not a fully functional code browser but it is a start.
Access to the repository, for both read and write, is restricted and is based on your Fermilab kerberos principal. To get authorization to use Mu2e's cvs, send an email, containing your kerberos principal, to kutschke@fnal.gov.
Setting Environment Variables
To access files in the repository you need to first get a kerberos ticket and set two enviroment variables. For csh flavor shells (csh, tcsh) the instructions are:
setenv CVSROOT mu2ecvs@cdcvs.fnal.gov:/cvs/mu2e setenv CVS_RSH /usr/bin/ssh setenv CVSEDITOR /usr/bin/xemacs # For example; see below.
For sh flavor shells ( sh, bash) the instructions are:
export CVSROOT=mu2ecvs@cdcvs.fnal.gov:/cvs/mu2e export CVS_RSH=/usr/bin/ssh export CVSEDITOR=/usr/bin/xemacs # For example; see below.
For a Mac using the ssh3a version of ssh the last line should read:
export CVS_RSH=/usr/bin/ssh3a
In all cases the value of CVSROOT must be given exactly as shown. The example value of CVS_RSH is correct for Scientific Linux Fermi, versions 4.* and 5.*. On other machines it may be different; it should be the complete path of the name of a kerberos aware version of ssh that is compliant with Fermilab's use of kerberos.
Setting the CVSEDITOR environment variable is not necessary but most people will find it useful. This controls the editor that will be used when you are asked to supply a comment for a cvs commit operation. If you do not specify an editor then a system default, usually vi, will be chosen; if you are not familiar with vi you will then be trapped. This is discussed further in CVS Cheat Sheet section on cvs commit.
Forwarding Kerberos Tickets
If you kinit on your laptop ( or desktop ) you will be able to run cvs to check out and commit files. If you log in from your laptop to detsim or mu2egpvm*you should be able to run cvs on those machines. If you get a "permission denied" error from the cvs server, there are two things to check:
- Check that the kerberos ticket on your laptop is still valid.
- Check that the ticket was forwarded to detsim or mu2egpvm*. This can be done with the -A option on ssh or by configuring ssh and kinit defaults on your laptop.
If the ssh defaults for your computer are set up correctly, the following step is not
necessary. If the ssh defaults for your computer are incorrect, then you should
override them for your own account by adding the following lines to your ~ssh/.config
:
host cdcvs.fnal.gov ForwardX11 = no GSSAPIAuthentication yes GSSAPIDelegateCredentials yes
The cvs User Areas
We have provided a cvs area for people to keep side projects and code that is not yet ready to be in an official cvs release. At the cvs top level there is a subdirectory Users, in which people may create subdirectories for themselves. If a subdirectory has already been created for you, you can check out its contents with:
cvs co Users/yourKerberosPrincipal
To create your own User cvs area:
cvs co Users/nobody cd Users mkdir <yourKerberosPrincipal> cd <yourKerberosPrincipal> cp yourfiles . cd .. cvs add <yourKerberosPrincipal> cvs commit -m "Comment about what you did." <yourKerberosPrincipal>
where you should replace <yourKerberosPrincipal>
with the name of your kerberos principal.
A quirk of cvs is that when you cvs add a new directory there must already be at least one file in that directory;
if not, cvs gets confused. See also the [CvsCheatSheet]] section on adding directories
in the CvsCheatSheet.
There is no technical enforement that the directory name you create for yourself must match your
kerberos principal but please follow that convention.
These areas are not protected. So if several people wish to collaborate on a project they can agree to set up their code base in the cvs space of one of the group.
In an earlier incarnation of this I called this cvs space "Personal" not "Users". Please use "Users" space. At some point "Personal" will go away.