[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help! Branch/attic mess
From: |
kynn |
Subject: |
Help! Branch/attic mess |
Date: |
Thu, 3 Jun 2004 11:54:27 -0400 (EDT) |
I am a CVS newbie, and I'm having a very hard time with some very
basic CVS concepts.
The interaction below illustrates the sources of my confusion.
Basically, I start a project Foo which initially consists of a single
file foo. Afterwards, I add and commit a new file bar. Finally, I
issue a "cvs status -v" command. (I've numbered the lines and
inserted a few comments, preceded by ###).
1 % CVSROOT=/home/jones/cvs_test
2 % rm -rf $CVSROOT/Foo
3 % mkdir -p Foo && rm -rf Foo/*
4 % cd Foo
5 ### generate a file for CVS to act on
6 % touch foo
7 ### import and check out
8 % cvs -d $CVSROOT im -m '' Foo trunk start
9 N Foo/foo
10
11 No conflicts created by this import
12
13 % cvs -d $CVSROOT co -d . Foo
14 cvs checkout: Updating .
15 U foo
16 ### modify a CVS-controlled file
17 ### create a new file to put under CVS control
18 % touch bar
19 % cvs ad bar
20 cvs add: scheduling file `bar' for addition
21 cvs add: use 'cvs commit' to add this file permanently
22 % cvs ci -m '' bar
23 RCS file: /home/jones/cvs_test/Foo/bar,v
24 done
25 Checking in bar;
26 /home/jones/cvs_test/Foo/bar,v <-- bar
27 initial revision: 1.1
28 done
29 % cvs st -v
30 cvs status: Examining .
31 ===================================================================
32 File: bar Status: Up-to-date
33
34 Working revision: 1.1 Thu Jun 3 15:22:24 2004
35 Repository revision: 1.1 /home/jones/cvs_test/Foo/bar,v
36 Sticky Tag: (none)
37 Sticky Date: (none)
38 Sticky Options: (none)
39
40 Existing Tags:
41 No Tags Exist
42
43 ===================================================================
44 File: foo Status: Up-to-date
45
46 Working revision: 1.1.1.1 Thu Jun 3 15:22:22 2004
47 Repository revision: 1.1.1.1 /home/jones/cvs_test/Foo/foo,v
48 Sticky Tag: (none)
49 Sticky Date: (none)
50 Sticky Options: (none)
51
52 Existing Tags:
53 start (revision: 1.1.1.1)
54 trunk (branch: 1.1.1)
55
OK, what puzzles me about this is that bar is not associated with
*any* branch, whereas foo is. This makes absolutely no sense to me.
What gives?
I tried to repeat everything above, but this time specifically
requesting the branch called "trunk" at checkout time (line 15).
1 % CVSROOT=/home/jones/cvs_test
2 % LAB=/home/jones/cvslab
3 % cd /home/jones/cvslab
4 % rm -rf $CVSROOT/Foo
5 % mkdir -p Foo && rm -rf Foo/*
6 % cd Foo
7 ### generate a file for CVS to act on
8 % touch foo
9 ### import and check out, explicitly requesting the trunk branch
10 % cvs -d $CVSROOT im -m '' Foo trunk start
11 N Foo/foo
12
13 No conflicts created by this import
14
15 % cvs -d $CVSROOT co -d . -r trunk Foo
16 cvs checkout: Updating .
17 U foo
18 ### modify a CVS-controlled file
19 ### create a new file to put under CVS control
20 % touch bar
21 % cvs ad bar
22 cvs add: scheduling file `bar' for addition on branch `trunk'
23 cvs add: use 'cvs commit' to add this file permanently
24 % cvs ci -m '' bar
25 RCS file: /home/jones/cvs_test/Foo/Attic/bar,v
26 done
27 Checking in bar;
28 /home/jones/cvs_test/Foo/Attic/bar,v <-- bar
29 new revision: 1.1.2.1; previous revision: 1.1
30 done
31 % cvs st -v
32 cvs status: Examining .
33 ===================================================================
34 File: bar Status: Up-to-date
35
36 Working revision: 1.1.2.1 Thu Jun 3 15:23:13 2004
37 Repository revision: 1.1.2.1 /home/jones/cvs_test/Foo/Attic/bar,v
38 Sticky Tag: trunk (branch: 1.1.2)
39 Sticky Date: (none)
40 Sticky Options: (none)
41
42 Existing Tags:
43 trunk (branch: 1.1.2)
44
45 ===================================================================
46 File: foo Status: Up-to-date
47
48 Working revision: 1.1.1.1 Thu Jun 3 15:23:11 2004
49 Repository revision: 1.1.1.1 /home/jones/cvs_test/Foo/foo,v
50 Sticky Tag: trunk (branch: 1.1.1)
51 Sticky Date: (none)
52 Sticky Options: (none)
53
54 Existing Tags:
55 start (revision: 1.1.1.1)
56 trunk (branch: 1.1.1)
Now the results are even more puzzling. For starters, when bar is
commited, its corresponding RCS file bar,v is (inexplicably) placed
under $CVSROOT/Foo/Attic. Moreover, and just as inexplicably, a
second branch (1.1.2) emerges. So now there are two branches
associated with the same tag "trunk", depending on which file one
looks at. The relationship between these two branches is a mystery to
me.
If someone can explain to me what's going on I'd be most grateful.
Many thanks,
kynn
- Help! Branch/attic mess,
kynn <=
RE: Help! Branch/attic mess, Jim.Hyslop, 2004/06/03