Skip to topic | Skip to bottom
Home
Projects
Projects.Vcsr1.16 - 26 Jun 2008 - 10:14 - RolandLevillaintopic end

Start of topic | Skip to actions

Vcs: A wrapper over Version Control Systems

Vcs

Version control systems (Subversion, CVS, SVK...), however useful, are not very extensible: adding new features can be cumbersome, especially if you want them for different such systems at once. Vcs provide a simple dynamic hierarchy for Version Control Systems.

If you are a LRDE user searching for information on how to have Vcs work in your environment, have a look a this section below.

Installation

Current distribution

Vcs depends on Ruby. Nicolas Pouillard? maintains packages at

The latest version of Vcs (as of 27/03/2008) is vcs 0.5 beta 17.

To install vcs, just extract the content of the tarball, and add the bin directory of vcs' distribution to your PATH. Et voilą!

Old distributions

To install old versions of vcs, you need to have the Ruby interpreter and its package system manager rubygems. To update your gem installation just type:

[sudo] gem update --system

After that, a single command suffices:

[sudo] gem install vcs [--no-rdoc -y]

Releases

Vcs is available freely under the terms of the GNU GPL.

Configuration

Vcs expects some environment variables to be set. First, it needs to know who you are. Use the FULLNAME and EMAIL variables to tell it. With a Bourne shell, it should look like:

export FULLNAME="My name"
export EMAIL="my.name@my.domain"

Sometimes, a project under vcs control comes with a vcs directory, which contains overloading commit or checkin subcommands. These commands may send a message to a mailing list when a patch is sent to the repository. If so, you need to set the SMTPSERVER envvar:

export SMTPSERVER=my.smtp.server

Also, vcs might use EDITOR to present a form (with a template of ChangeLog) that the user must fill in; you are encouraged to set this variable to your favorite editor, e.g.

export EDITOR=emacs  # or vim, etc.

Likewise, vcs queries the PAGER variable for a program name to display messages and diff outputs:

export PAGER=less

If you are a LRDE user

Vcs is installed on the /lrde/dev/ filesystem at the LRDE. The actual location of the installed package is

  • /lrde/dev/linux-x86/etch/vcs/

Therefore, you should only need to add the following commands to your shell configuration files (e.g., ~/.zshenv and ~/.zshrc):

# .zshenv
# -------

# ...

# Add Vcs to the PATH.
export PATH="/lrde/dev/linux-x86/etch/vcs/bin:$PATH"

# Vcs settings.
export FULLNAME="My name"
export EMAIL="my.name@my.domain"
export SMTPSERVER=smtp.lrde.epita.fr
export EDITOR=emacs
export PAGER=less

# .zshrc
# ------

# ...

# Have Vcs wrap the Subversion client.
alias svn=vcs-svn

Then, if you don't have a (valid) GnuPG (GPG) key pair yet, we encourage you to create one. Indeed, most LRDE projects come with a Vcs helper (in a vcs/ subdirectory), which sends GPG-signed messages to mailing lists/newsgroups upon commits. To create a key pair, simply run

% gpg --gen-key

and follow GPG's instructions. When gpg asks for an e-mail address identifying your key pair, don't forget to use the exact same one you assigned to the EMAIL environment variable, otherwise Vcs won't known which GPG key to use.


Emacs and Vcs

If your EDITOR variable is set to emacs, you might want to add this to your ~/.emacs file to have Emacs correctly handle Vcs, and have =ChangeLog=s be written in Latin-1 :

; Vcs mode alias.
(defun vcs-mode ()
  "Major mode for editing Vcs forms.
In fact, just an alias for the Change Log major mode and a switch to Latin-1.
The following keys are bound:
\\{change-log-mode-map}"
  (interactive)
  (setq buffer-file-coding-system 'iso-latin-1)
  (change-log-mode))

-- NicolasPouillard? - 11 Feb 2005

-- Roland Levillain - 26 Jun 2008
to top


Copyright © 1999-2010 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback