CVS How-to. 17th July 2003

Similar documents
Portions adapted from A Visual Guide to Version Control. Introduction to CVS

Introduction to CVS. Sivan Toledo Tel-Aviv University

Using CVS to Manage Source RTL

A CVS Repository for the RNB Group

About CVS. 1 Version Control - what is it? why is it useful?

Submitting your Work using GIT

Some Linux (Unix) Commands that might help you in ENSC351

CSCE UVM Hands-on Session-1 Pre-Work

FusionViewer Developer s Guide

When you first log in, you will be placed in your home directory. To see what this directory is named, type:

CVS Instructions. Version 0.3. Date: Thursday 29 April 1999

Version Control. 1 Version Control Systems. Ken Bloom. Linux User Group of Davis March 1, 2005

CVS for Moodle Developers

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

A Gentle Introduction to CMSC311 labs and CVS Or How I learned to use CVS in CMSC311. William Arbaugh September 2, 2004

CS 143A. Principles of Operating Systems. Instructor : Prof. Anton Burtsev

Session 1: Accessing MUGrid and Command Line Basics

Version Control with CVS

15-122: Principles of Imperative Computation

Using RANCID. Contents. 1 Introduction Goals Notes Install rancid Add alias Configure rancid...

Working with Basic Linux. Daniel Balagué

Introduction to the UNIX command line

WinCvs Version 1.1. Users Guide. Don Harper

Common CVS Command Summary

LAB #5 Intro to Linux and Python on ENGR

Supercomputing environment TMA4280 Introduction to Supercomputing

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

Software Installation - Accessing Linux and Checking your Environmental Variables

Physics REU Unix Tutorial

Task-Oriented Solutions to Over 175 Common Problems. Covers. Eclipse 3.0. Eclipse CookbookTM. Steve Holzner

Introduction to the Linux Command Line

Linux Exercise. pwd answer: We call this directory (into which you get when you log in) your home directory.

2 Initialize a git repository on your machine, add a README file, commit and push

1. Git. Robert Snapp

Configuring SSH Public Key Authentication

Version control with RCS and CVS An introduction. Markus Bjartveit Krüger

Lecture 01 - Working with Linux Servers and Git

Exercise 1: Basic Tools

No More Passwords (with SSH)

Introduction to CVS C HAPTER 6

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

Carnegie Mellon. Linux Boot Camp. Jack, Matthew, Nishad, Stanley 6 Sep 2016

Setting up my Dev Environment ECS 030

LAB 0: LINUX COMMAND LINE AND SVN

Version Control: Gitting Started

CS CS Tutorial 2 2 Winter 2018

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

Lab #3 Automating Installation & Introduction to Make Due in Lab, September 15, 2004

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Home Page. Title Page. Contents. Page 1 of 17. Version Control. Go Back. Ken Bloom. Full Screen. Linux User Group of Davis March 1, Close.

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Working with CVS in Eclipse

Using the Zoo Workstations

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

CS480. Compilers Eclipse, SVN, Makefile examples

CSC111 Computer Science II

Version control system (VCS)

Practical Session 0 Introduction to Linux

CS 261 Recitation 1 Compiling C on UNIX

Version Control with Git

CS Fundamentals of Programming II Fall Very Basic UNIX

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Concurrent Versions System (cvs( cvs) Adviser Date August 31, 2004

CHE3935. Lecture 1. Introduction to Linux

CVS for the developer or amateur

Linux and Git Boot Camp

Introduction. Overview of 201 Lab and Linux Tutorials. Stef Nychka. September 10, Department of Computing Science University of Alberta

Eugene, Niko, Matt, and Oliver

User Guide Version 2.0

You should see something like this, called the prompt :

MVAPICH MPI and Open MPI

Draft: MLDesigner and LinCVS

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys

Table of Contents. Table of Contents License server installation guide - Linux. Download SCL

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

IT Services Security. The Dark Arts Of SSH. Author: John Curran Version: 0.1

Introduction to version control. David Rey DREAM

TELE301 Lab16 - The Secure Shell

Gitlab Setup/Usage by Yifeng Zhu modified by Vince Weaver 30 January 2019

SmartCVS Tutorial. Starting the putty Client and Setting Your CVS Password

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

mkdir Phys338 s2017 Draw the tree of the directories and files for this step and all the following cd Phys338 s2017

How to version control like a pro: a roadmap to your reproducible & collaborative research

Table Of Contents. 1. Zoo Information a. Logging in b. Transferring files 2. Unix Basics 3. Homework Commands

sftp - secure file transfer program - how to transfer files to and from nrs-labs

The Online Unix Manual

LPF Training Handbook!

PROJECT INFRASTRUCTURE AND BASH INTRODUCTION MARKUS PILMAN<

Crash Course in C++ R F L Evans. www-users.york.ac.uk/~rfle500/

Automatic Creation of a Virtual Network with VBoxManage [1]

ssh and handson Matsuzaki maz Yoshinobu 1

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36

Version Control. Software Carpentry Github s Hello World Git For Ages 4 And Up You need source code control now

Assumptions. GIT Commands. OS Commands

Helpful Tips for Labs. CS140, Spring 2015

Object Oriented Programming. Week 1 Part 2 Git and egit

Problem Set 1 Due: 11:59pm Wednesday, February 7

Lab Exercise Git: A distributed version control system

Transcription:

CVS How-to helpdesk@stat.rice.edu 17th July 2003 This how-to gives introduction on how to set up and use cvs (Concurrent revision system) on stat network. Briefly, cvs system maintains a center repository and let you check out, check in files conveniently both locally and remotely. It allows you to work on the most current version of your files from any machine. The usual scenario of using cvs system is: cvs checkout project # check out a module cd project... work on the project... cvs commit # commit changes, check in cd.. cvs release -d myproject # delete local copy. optional Set up Server set up 1. Log on to stat007 2. mkdir ~/CVS 3. Add the following two lines to your.cshrc setenv CVSROOT ~/CVS setenv CVSEDITOR vi # or your favorite editor 4. Source.cshrc to activate $CVSROOT and $CVSEDITOR 5. cvs init 6. If you are going to use rsh, edit or create ~/.rhosts, add machines/usernames that you will be working on. - can be used as any machine or user. For example: your-laptop.stat.rice.edu yourusername - yourusername 1

Note: (a) Only machine within Rice network can rsh to stat007. (b) Your home machine can rsh via a VPN connection but the machine appears to stat007 as something like vpnrice-10-2.rice.edu (dynamically). If you would like to rsh from home, you will have to use the second form which allows rsh from any rice machine to stat007. (c) The second line is useful but dangerous. Do not use it if possible. (d) The most current version of cvs is under /home/helpdesk/newbin Client set up 1. Add the following lines to your.cshrc Note: setenv CVSROOT ":ext:username@stat007.stat.rice.edu:/home/username/cvs" setenv CVSEDITOR vi # or your favorite editor setenv CVS RSH rsh (a) Substitute username with your real user name on stat007. (b) Use setenv CVS RSH ssh if the machine is off campus or is not listed in.rhosts. You can also use ssh for in campus connections but you will have to enter password for each cvs command. (See the last part of this howto if you would like to avoid repeated password.) In general, rsh is easy to use but not secure and can only be used within Rice (or via VPN). ssh is secure and universal but need to input password. 2. Source.cshrc to activate these variables. 3. test your rsh connect if your set CVS RSH to rsh rsh stat007.stat.rice.edu echo $path 4. If not successful, check your.rhosts on stat007. 5. You should be able to run all cvs commands. CVS Usage Helpdesk has written some shell scripts to speed up the use of cvs system. However, you would better read some tutorials and understand how basic cvs commands work. Module are just directories in cvs system. It contains files or subdirectories. cvs allows you to define modules within a module but that is out of the range of this introduction. 2

create a module by importing a folder Note: cd stat410 cvs import stat410 vendor release 1. You would better clean your folder and leave only text files you would like to import. 2. vendor relase are two parameters cvs import need. You can change them if you understand what they mean. 3. You will be prompted to enter some comment. Use cvs import -m stat course stat410 vendor relase to avoid it. by helpdesk cvsadd cvsadd dotfiles.cshrc.muttrc.emacs will add these three files to module dotfiles. If dotfiles does not exist, you will be prompted to create it. list files on center repository or some of the modules Use helpdesk cvsls cvsls # list module names cvsls -a # list all modules cvsls module1 module2 # list files of module1 module2 Read cvsls to see how it works. Add files to existing module usual cvs sequence cvs co module cd module cp files. cvs add files cvs commit use helpdesk cvsadd cvsadd module files It is basically an automation of the above procedure. 3

Add directories to a existing module It is easier to import a directory as a new module. If you would like to add a directory to an existing module: usual cvs sequence cvs co module cd module cp -r directory. # or mkdir and add files cvs add directory cd directory cvs add * # and keep going on. helpdesk cvsadd cvsadd module directory cvsadd does the adding procedure recursively. Check in and check out Usually, you work in this way cvs co project cd project...work on it... cvs commit After a while, if you have modified some of the files from other places cvs update # read the newest version from center repository. If you would like to remove local copy, cd.. cvs release -d project Note: You can cd.. rm -rf project directly. cvs release will check if you have un-committed changes before removal. Remove file or directory from an existing module usual cvs sequence cvs co module cd module cvs remove -f file # tell cvs to remove cvs commit # really remove 4

helpdesk cvsremove cvsremove module files-or-directories automation of above procedure. Retrieve files or directories from repository usually cvs co module cp module/file somewhere com -rf module By helpdesk cvsget cvsget module files Dealing with binary files add -kb option to cvs add or cvsadd command. Dealing with keywords Keywords are words such as Log, Date, that are delimited by $ $ and will be managed by cvs system. I can not write it here since it will be replaced by cvs and will not be recognized. See the last part of this file how Date, Log are replaced by cvs. See /home/helpdesk/bin/cvs* for examples. Tired with repeated SSH password? It is not easy, but you can use public-key authorization instead of password authorization so you do not have to enter password each time. However, you are under the risk that: ANYONE WOULD BE ABLE TO LOG ON TO STAT007 IF THEY HAVE ACCESS TO YOU LOCAL ACCOUNT! Anway, if you will work off-campus a lot and would like to take the risk, here is how: 1. On your LOCAL machine, run ssh-keygen2. Enter return for the two questions. If command not found, you are running ssh1 and can not use this method. The following instruction will assume that you get two files: ~/.ssh2/id dsa 2048 a and ~/.ssh2/id dsa 2048 a.pub.change file names accordingly if you get different keys. 2. On you LOCAL machine, run cd ~/.ssh2 echo "IdKey id dsa 2048 a" > identification 5

3. Transfer id dsa 2048 a.pub to stat007:~/.ssh2. You can use sftp to do this. sftp stat007.stat.rice.edu... > cd.ssh2 > put id dsa 2048 a.pub > quit scp can be used too. scp id dsa 2048 a.pub stat007.stat.rice.edu:~/.ssh2 4. Log on to stat007. Run cd.ssh2 echo "Key id dsa 2048 a.pub" > authorization 5. Log off and try ssh stat007.stat.rice.edu You should not be prompted for a password. All cvs operations will also be executed without asking a password. If you are using Openssh through Linux or Windows/Cygwin and would like to connect to stat007 without password, here is a undocumented trick from internet: 1. Make sure you are using openssh 2.2.x+ 2. Run ssh-keygen -d -f $HOME/.ssh/id dsa cd $HOME/.ssh ssh-keygen -x -f $HOME/.ssh/id dsa > ssh2.pub echo "IdKey id dsa" > identification 3. Copy ssh2.pub to stat007:~/.ssh2 4. Use ssh2.pub in authorization file echo "Key ssh2.pub" > authorization 6

Warning cvs scripts are under development. Helpdesk is not responsible for data lose or any consequences of using them. I will appreciate your help if you can report any bug to me. The public-key method is dangerous. Helpdesk is not responsible for any data lose or invasion to your account due to its use. helpdesk@stat.rice.edu $Date: 2003/07/17 02:49:21 $ 7