Tuesday, March 15, 2011

CVS Version Control on Windows in 10 minutes

CVS Version Control on Windows in 10 minutes

 

Do you need a reliable version control for your website, personal notes, transferring data from work to home to university back & forth without any costs in time or budget?

Do you still don’t want to setup a Linux machine just because CVS requires Linux for stable use (like some dude told you ages ago?)

Do you not want to hassle around with flimsy Unix-stuff but only have convenient Version Control in a manner like PCVS or Microsoft VSS ??

Well just take CVS (CVSNT 2.x) and TortoiseCVS / WinCVS for your home/laptop/school machine and become happy with it… you don’t need anything else and get used to open-source industry-proven version and configuration management control.

Read on for a setup-howto consisting mainly of links to relevant pages and tools…

1) you need the CVSNT – version 2.x – for running the CVS server itself on your windows box. If you have a Linux-server, then forget this step and look up ordinary CVS on Linux setup guides… else

a) download the latest CVSNT 2.0.8 and start the setup. Don’t forget to install the services (Which are the actual CVS server services running in the background…) do a reboot afterwards, or you will receive some errors when creating your repository

b) checkout this Beginners guide to CVS for more detailled installation tips (i.e. user management)... I assume you simply install the stuff on your single PC/notebook with local users.

c) after Reboot your will have a panel “CVS For NT” in your Control Panel http://www.cvsnt.org/files/InstallationTips/attachments/Configure-1.png

2) The following steps explain a basic repository installation

a) stop the service in the CVS for NT panel

b) now create a repository for your PC – the repository is the directory where the internal representation of your version files are stored – sort of file-database…

c) Go to the tab “Repositories” and with a “prefix” of e.g. “c:\cvsrepos” you can define this basic path, which will be common for all repositories… Note: one repository is only a collection of many modules (which could be different projects )...

d) Use the Add button to add a repository. Enter TEST after the prefix in the box that appears. Accept the offer to create the repository. Again: You can have several separate repositories on the same server, in that case you will use the Add button once for each repository you need. Once the list of repositories contain those you want you are done here.

e) Go to the tab “ Advanced” and setup your temp-path to e.g. “c:\cvstemp”

e) Start the service again

3) The following steps explain a basic user setup – instead of localhost you can put in your IP or real hostname… these commands have to be performance in a commandline-window (CMD.EXE)

a) set cvsroot=:sspi:localhost:/TEST

b) cvs passwd -r {real account name} -a {new username}

e.g. cvs passwd -r Administrator -a Adminstrator

—- then enter the password on the commandline

Any user entered like this MUST be an NT user on the local system!

More tips to be found in this documentation about adding users to CVS if necessary, but for the first test it will be ok.

4) now for the connection testing – these commands have to be performance in a commandline-window (CMD.EXE)

a) set cvsroot=:{protocol}:{user}@{computername}:/TEST

e.g. set cvsroot=:pserver:Administrator@localhost:/TEST

b) cvs login

—- then enter the password on the commandline

c) cvs ls -l -R

to perform a basic query – don’t worry – the gui stuff is comming up right away…

5) Install TortoiseCVS

TortoiseCVS is a great plugin for the windows explorer that provides you all the necessary CVS functions via right-click&select like other version control systems do… I prefer it much more over WinCVS for daily use, because the standard-tasks of check-out (cvs:“update”) or check-in(cvs:“commit”) can be done very easy and seamless with it…

Don’t forget to reboot or at least re-login man…

6) now we will perform a simple module-import… a module-import bring files initially into CVS.

a) create a directory TestModule

b) right-click “TestModule” : CVS -> Create New Module

c) Enter the CVSROOT you used above like

</p>
 
    :sspi:Administrator@localhost:2401:/test
 
        <p>

and press OK to enter this module into CVS – that’s ONLY the directory so far!

d) now put some files/directories in this “module”-directory

e) right-click “TestModule” : CVS : add contents to add all the contained files/directories

f) and now “Commit” these changes, means to finish this “transaction” with

g) right-click “TestModule” : CVS : check in (einchecken)

Now these files are in an initial revision in your CVS repository! Congratulations!

6) for more advanced use and topics I also recommend to install the WinCVS GUI front-end for CVS you can get here... I am already using the beta 1.3, so give it a try… also make sure to install Python 2.1.3 for advanced scripting features… I am not sure if 2.2 or 2.3 will work aswell!

7) Use above steps for other directories/projects you wish to version control and keep the following simple steps in mind:

a) Import Module for initial load to CVS – create a “clean” version of your files – deleting from CVS is a hassle

b) CVS Check-Out to get one module / project to your work-directory the first time as a sort of complete export

c) CVS Update to sync your local work-directory with the CVS repository

d) CVS Commit to “check-in” again and make sure everythings on the server…

More documentation is to be found in the CVS NT Reference Manual

so long for now…

Copied from  -

http://weblog.cemper.com/a/200307/28-cvs-version-control-on-windows-in-10-minutes.php

 

No comments:

Post a Comment

Code Formater

Paste Here Your Source Code
Source Code Formatting Options
1) Convert Tab into Space :
2) Need Line Code Numbering :
3) Remove blank lines :
4) Embeded styles / Stylesheet :
5) Code Block Width :
6) Code Block Height :
7) Alternative Background :
Copy Formatted Source Code
 
Preview Of Formatted Code