[LORENE] Recovering older versions of code

Eric Gourgoulhon Eric.Gourgoulhon at obspm.fr
Fri Apr 30 12:00:48 CEST 2004

Dear All,

It can be sometimes usefull to recover a previous
version of a source code file. This can be achieved
by typing the cvs command:
    cvs update -r1.3 filename.C
where 1.3 is the version of file "filename.C"
that you want to recover ("-r" stands for "revision").
This will erase the previous copy of filename.C
present in your working directory, replacing it
by the version 1.3.
For instance if you want to visualize the difference
between version 1.3 and the latest version
of filename.C, type:
    mv filename.C filename.C-latest
    cvs update -r1.3 filename.C
    xxdiff filename.C filename.C-latest

The "cvs update -r" command marks the file
as "sticky", as you can see from the command
    cvs status filename.C
which returns:
Sticky Tag:    1.3
This means that you cannot come back to
the latest version by the usual command
"cvs update". This later will maintain
the file in the 1.3 version (without
providing any warning !), contrary to
what one may have thought.
The command to use to erase the old
version 1.3 and really come back to
the latest version in the repository is

    cvs update -A

(See man cvs for further details).

Bon code !


Eric Gourgoulhon
Laboratoire de l'Univers et de ses THeories (LUTH)
UMR 8102 du CNRS / Observatoire de Paris, F-92195 Meudon Cedex, France
tel: +33 (secretariat : +33
e-mail: Eric.Gourgoulhon/at/obspm.fr    WWW: http://www.luth.obspm.fr/

More information about the Lorene.list mailing list