[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
assigning revisions
From: |
Daniel Lungu |
Subject: |
assigning revisions |
Date: |
Thu, 05 Sep 2002 04:20:20 -0500 |
Hello!
I am using cvs...
$ cvs --version
Concurrent Versions System (CVS) 1.10.7 (client/server)
Copyright (c) 1989-1998 Brian Berliner, david d `zoo' zuhn,
Jeff Polk, and other authors
CVS may be copied only under the terms of the GNU General Public License, a
copy of which can be found with the CVS distribution kit.
Specify the --help option for further information about CVS
+++++++++++++++++++++++++++++++++-++++++++++++++++++++++++++++++++++
The problem I would like to tell you about is related to ยง6.3 in my revision of
"Version Management with CVS for CVS" Per Cederqvist et al, Copyright (C) 1992,
1993 Signum Support AB
where one can read:
6.3 Assigning revisions
By default, CVS will assign numeric revisions by leaving the first number the
same and incrementing the second number. For example, 1.1, 1.2, 1.3, etc.
When adding a new file, the second number will always be one and the first
number will equal the highest first number of any file in that directory. For
example, the current directory contains files whose highest numbered revisions
are 1.7, 3.1, and 4.12, then an added file will be given the numeric revision
4.1.
Normally there is no reason to care about the revision numbers--it is easier to
treat them as internal numbers that CVS maintains, and tags provide a better
way to distinguish between things like release 1 versus release 2 of your
product (see section 6.4 Tags--Symbolic revisions). However, if you want to set
the numeric revisions, the `-r' option to cvs commit can do that. The `-r'
option implies the `-f' option, in the sense that it causes the files to be
committed even if they are not modified.
For example, to bring all your files up to revision 3.0 (including those that
haven't changed), you might invoke:
$ cvs commit -r 3.0
Note that the number you specify with `-r' must be larger than any existing
revision number. That is, if revision 3.0 exists, you cannot `cvs commit -r
1.3'. If you want to maintain several releases in parallel, you need to use a
branch (see section 6 Revisions and branches).
+++++++++++++++++++++++++++++++++-++++++++++++++++++++++++++++++++++
I am showing below a test case (from scratch) that you could try to reproduce:
$ cvs checkout module
cvs server: Updating module
$ cd module
$ cat CVS/Entries
D
$ vi a
$ cat a
$Id: a$
$Source$
$Log: a$
$ cvs add a
cvs server: scheduling file `a' for addition
cvs server: use 'cvs commit' to add this file permanently
$ cat CVS/Entries
/a/0/dummy timestamp//
D
$ cvs commit a
RCS file: /cvsroot/Soft/module/a,v
done
Checking in a;
/cvsroot/Soft/module/a,v <-- a
initial revision: 1.1
done
$ cat CVS/Entries
/a/1.1/Thu Sep 5 08:23:29 2002//
D
$ cat a
$Id: a,v 1.1 2002/09/05 08:23:29 lungu Exp $
$Source: /cvsroot/Soft/module/a,v $
$Log: a,v $
Revision 1.1 2002/09/05 08:23:29 lungu
first revision
----- bring all files i.e. "a" to <revision> 2.0 -----
$ cvs commit -r 2.0
Checking in a;
/cvsroot/Soft/module/a,v <-- a
new revision: 2.0; previous revision: 1.1
done
$ cat CVS/Entries
/a/2.0/Thu Sep 5 08:27:01 2002//T2.0
D
$ cat a
$Id: a,v 2.0 2002/09/05 08:27:01 lungu Exp $
$Source: /cvsroot/Soft/module/a,v $
$Log: a,v $
Revision 2.0 2002/09/05 08:27:01 lungu
second revision
Revision 1.1 2002/09/05 08:23:29 lungu
first revision
----- add a new file "b" -----
$ vi b
$ cat b
$Id: b$
$Source$
$Log: b$
$ cvs add b
cvs server: scheduling file `b' for addition
cvs server: use 'cvs commit' to add this file permanently
----- error: first number in <revision> of "b" should be -----
----- highest first number of any file in that directory -----
$ cvs commit b
RCS file: /cvsroot/Soft/module/b,v
done
Checking in b;
/cvsroot/Soft/module/b,v <-- b
initial revision: 1.1
done
$ cat CVS/Entries
/a/2.0/Thu Sep 5 08:27:01 2002//T2.0
/b/1.1/Thu Sep 5 08:29:54 2002//
D
$ cat b
$Id: b,v 1.1 2002/09/05 08:29:54 lungu Exp $
$Source: /cvsroot/Soft/module/b,v $
$Log: b,v $
Revision 1.1 2002/09/05 08:29:54 lungu
first revision: should be 2.1
----- furthermore: cannot commit changes to "a" anylonger -----
$ vi a
$ cat a
$Id: a,v 2.0 2002/09/05 08:27:01 lungu Exp $
--source
$Source: /cvsroot/Soft/module/a,v $
$Log: a,v $
Revision 2.0 2002/09/05 08:27:01 lungu
second revision
Revision 1.1 2002/09/05 08:23:29 lungu
first revision
$ cvs commit a
cvs server: sticky tag `2.0' for file `a' is not a branch
cvs [server aborted]: correct above errors first!
cvs commit: saving log message in /tmp/cvsBAAaaLWoa
+++++++++++++++++++++++++++++++++-++++++++++++++++++++++++++++++++++
Thanks for checking this scenario,
Daniel Lungu
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
- assigning revisions,
Daniel Lungu <=