|
From: | Paul Gelderblom \(ptok\) |
Subject: | sticky non-branch tags are sometines treated as branches in empty directories - Bug? |
Date: | Wed, 03 Dec 2003 12:29:38 -0000 |
Hi all,
We often checkout using a sticky tag, so that
developers can work with
baselines of code.
Normally, checkins on files or directories with a
sticky non-branch tag
are disabled, which is correct.
However, we have found out that sometimes commit on
these sticky tags succeed, because CVS somewhere
in the process _converts_ the sticky normal tag into
a branch! This happens when there are empty
directories in the
tree on which cvs update -r TAG has been
done.
I isolated the problem in the following set of
commands and output.
(see below)
Bear with me, although it is a bit
long...
If you look at the contents of the CVS/Tag files,
it indeed looks as if
the empty directories have a different kind of
meaning for the tag. See the 'find'
output below: some directories have an N and some a
T as first character in the
CVS/Tag file. I guess that N means Tag and T means
Branch(!), but could not
find documentation on the Tag file format in the
CVS dox.
This does look like a bug to me, unless
someone can explain this 'feature' ?
Paul Gelderblom.
------------------------ # create an empty project in
repository /home/cvs
+ mkdir /home/cvs/project # check it out
+ cvs co project cvs checkout: Updating project + cd project # add a directory
+ mkdir dir1 + cvs add dir1 Directory /home/cvs/project/dir1 added to the repository + cd dir1 # create a file in the
directory
+ touch file1 + cvs add file1 cvs add: scheduling file `file1' for addition cvs add: use 'cvs commit' to add this file permanently + cvs ci -m file1 RCS file: /home/cvs/project/dir1/file1,v done Checking in file1; /home/cvs/project/dir1/file1,v <-- file1 initial revision: 1.1 done + cd .. # tag the entire project with
nnonbranch tag TAG
+ cvs tag TAG cvs tag: Tagging . cvs tag: Tagging dir1 T dir1/file1 # and checkout with a sticky
tag
+ cvs update -r TAG cvs update: Updating . cvs update: Updating dir1 # create a new
directory
+ mkdir dir2
+ cvs add dir2 Directory /home/cvs/project/dir2 added to the repository --> Using per-directory sticky tag `TAG' # look at all the per directory
sticky tag files...
# ... they are different for the
empty dirs.
+ find . -name Tag -print -exec cat {} ; ./CVS/Tag TTAG ./dir1/CVS/Tag NTAG ./dir2/CVS/Tag TTAG # add a file in dir1 and check it
in - not allowed, as it should be
+ cd dir1 + touch file3 + cvs add file3 cvs add: cannot add file on non-branch tag TAG # add a file in the root and
check it in - allowed!, and a branch is created
+ cd .. + touch file2 + cvs add file2 cvs add: scheduling file `file2' for addition on branch `TAG' cvs add: use 'cvs commit' to add this file permanently + cvs ci -m file2 RCS file: /home/cvs/project/Attic/file2,v done Checking in file2; /home/cvs/project/Attic/file2,v <-- file2 new revision: 1.1.2.1; previous revision: 1.1 done # add a file in dir2 and check it
in - allowed!, and a branch is created
+ cd dir2 + touch file4 + cvs add file4 cvs add: scheduling file `file4' for addition on branch `TAG' cvs add: use 'cvs commit' to add this file permanently + cvs ci -m file4 RCS file: /home/cvs/project/dir2/Attic/file4,v done Checking in file4; /home/cvs/project/dir2/Attic/file4,v <-- file4 new revision: 1.1.2.1; previous revision: 1.1 done --------------------
|
[Prev in Thread] | Current Thread | [Next in Thread] |