Archive

Posts Tagged ‘CVS’

Git vs Mercurial (Hg)

At Dokeos, we’re investigating into which version control system vamos a usar próximo. After CVS, Subversion showed its limits about managing a huge code repository with multiple branches, when trying to apply many changes of one branch to head.

The two most interesting systems remaining are Git and Mercurial. Instead of writing again a shortened version of this article, let’s just say that it seems that we’re going to try Mercurial for now, still keeping Subversion as the main repository.

Advertisements

CVS Pocket Reference

Terminology

Term Definition
Module Typically, the CVS name for the development project directory
Checkout The action of downloading a module the first time
Commit The action of submitting a change in one or more files to CVS
Diff A list of differences between two versions of a file or a set of files
Vendor Tag Indicates the supplier of this module – used for branches naming
Release Tag Indicates the release version – used prior to merging branches

Remarks

Every path is relative to the $CVSROOT.
A CVS Root directory resembles this: :extssh:username@cvs.domain.com:/var/lib/cvs
Almost all commands act recursively (all the commands in this document act like that).

Create a module

To create a module on the repository:
$ cvs import [-m "Comments…"] path/module_name vendor_tag release_tag
This will also import all files from the current directory, recursively.

Checkout

To grab the latest version of the files:
$ cvs checkout module_name
This will download all the files of the module into the current directory.
WARNING: This will synchronize the local folder with the remote one. This means that every file in the local folder will be overwritten or DELETED if they do not exist on the remote folder!

Commit

To commit your changes:
$ cvs commit [-m "Comments…"] [files]
If you don’t specify a comment, your default editor will be loaded allowing you to enter a comment (it is mandatory to enter a comment!).
If you don’t specify a file, it will commit every files under the current directory.

This article was first written by Bruno Dusausoy in October 2003 for
the BeezNest technical website (http://glasnost.beeznest.org/articles/84)
Categories: English, Tech Crunch Tags:

Supprimer les répertoires CVS d’un repository

August 9, 2007 Leave a comment
Cet article a été écrit à l'origine en Août 2007 pour le site technique de
BeezNest (http://glasnost.beeznest.org/articles/363).

Pour supprimer les répertoires CVS se trouvant dans un repository CVS récemment téléchargé (et donc obtenir le même résultat final qu’un export CVS), la commande pratique à utiliser est:

find . -name CVS -prune -exec rm -rf {} \;

Notez que si l’objectif est d’en faire un fichier compressé, la commande tar dispose d’une option –exclude-vcs qui exclut d’office tous les répertoires de gestionnaires de versions (Subversion, CVS, …)

Categories: French, Tech Crunch Tags:

HOWTO Move a CVS repositoy between servers on Debian

This article was first written in May 2006 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/334).

Basically, moving a CVS repository itself is not really difficult.

Let’s assume first that we don’t use the pserver mode of CVS, which is known to be weak with respect to security. We use then the SSH transport to access the CVS server, which we strongly recommend.

On Debian, the CVS repository is located by default in /var/lib/cvs. At install time, a debconf question asked you where to set it. To check where debconf at least thinks the repository is, look at /etc/cvs-cron.conf. We strongly recommend not to move it afterwards, as all the local CVS repositories (when using SSH mode) on developers’ machine retain this full path.

Make sure CVS is installed on the destination server. Package is called “cvs” and ships both the server and the client.

Now, make sure no developer is going to try to commit anything during the move. Either ask them, cut them SSH access temporarily or whatever suits you best.

Copy the repository /var/lib/cvs to the new server.

Update clients’ local repositories to point to the new server/name if you could not keep it.

Categories: English, Tech Crunch Tags: ,

Admin CVS on RH FC2

This article was first written in July 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/284).

Introduction

This article mainly describes several tricks to admin a CVS install on RHFC2.

Adding a user

Adding a user for pserver is done by updating the CVSROOT/passwd file in the CVS modules repository. The passwords there are encrypted using the htpasswd utility, so use it like this:

cd /home/cvs/cvsroot/CVSROOT
htpasswd passwd user1
Please enter password: _

If the user is not a system user, you need to add a little something to the passwd file to authorize him as another user. Guessing that the CVS system user on that server is called “cvs”, update the corresponding line in passwd by trailing “:cvs”.

If needed (it shouldn’t be) restart the server by restarting xinetd.

Removing a user

Removing a user is done the same way as adding one, except for the command line being

htpasswd -D passwd user1
Categories: English, Tech Crunch Tags: , , ,

Install ViewCVS on RH FC2

This article was first written in May 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/259).

Introduction

This article is intended to help system administrators with very moderate knowledge of RedHat Fedora (Core 2) install ViewCVS 0.9.3

Getting the file

Apparently, there is no packaged version of ViewCVS for RHFC2 coming from a reliable source, so go get it on SourceForge (in this case, Ireland mirror) – ViewCVS from SourceForge

You can do this like this:

wget http://heanet.dl.sourceforge.net/sourceforge/viewcvs/viewcvs-0.9.3.tar.gz

Trying quick start

Then the ideal solution would be to tell you to read the INSTALL file in the viewcvs archive, but it is pretty incomplete if you want to do it quick. First, the “GUI Operation” section says you can launch viewcvs right now, but this will merely result in a Python error:

Traceback (most recent call last):
  File "/home/ywarnier/viewcvs-0.9.3/standalone.py", line 511, in ?
    import viewcvs
ImportError: No module named viewcvs

Installing

So we have to do the whole install anyway. The “INSTALLING VIEWCVS” section is useful to state what packages should be installed for ViewCVS.cgi to work.

Launch ./viewcvs-install as root user and answer the questions (the default value can be used by pressing “Enter”).

Configuring

Edit /usr/local/viewcvs-0.9.3/viewcvs.conf and change the settings accordingly to your cvs install (probably at least cvs_roots)

Edit /etc/httpd/conf/httpd.conf and add something like

ScriptAlias /viewcvs/ "/usr/local/viewcvs-0.9.3/cgi/"

Fixing missing RCS

Then if you try the alias in a browser (http://localhost/viewcvs/viewcvs.cgi), it might work, but if it doesn’t, it is probably because RCS is not installed on your computer (even if the error is more about something like the files not corresponding to the filter). You can grab a RCS package here or do:

wget http://linuxsoft.cern.ch/cern/7.3.X/i386/RedHat/RPMS/rcs-5.7-15.i386.rpm
rpm -Uvh rcs-5.7-15.i386.rpm

Done

That should work now. Enjoy.

Misc

This article provides with a way to add PHP syntax highlighting in ViewCVS.

Categories: English, Tech Crunch Tags: , , ,
%d bloggers like this: