info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Branching bug ??? (was Re: Bug is tagging the head of a branc h head


From: Jim.Hyslop
Subject: RE: Branching bug ??? (was Re: Bug is tagging the head of a branc h head???)
Date: Wed, 19 May 2004 16:33:32 -0400

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of
> address@hidden
> Sent: Wednesday, May 19, 2004 3:24 PM
> To: address@hidden
> Cc: address@hidden
> Subject: Branching bug ??? (was Re: Bug is tagging the head 
> of a branch
> head???)
> 
> 
> I thought I was all straigt on this so I ran an experiment.
> Again I have v1.11.14...
> 
> I have a sample project and I did the following...
>       > cvs rtag -r HEAD -b b_dev_01_03 sample
> 
> ...to create the b_dev_01_03 branch off the trunk correct?
> And...
>       > cvs rtag -r b_dev_01_03 -b b_dev_01_03_cf sample
> 
> ...to create the b_dev_01_03_cf branch off the b_dev_01_03 branch
> correct?
> 
> I checked out the b_dev_01_03 branch, modified one file, and 
> checked it
> in. I get...
>       > cvs status -v file1
> 
> ===================================================================
> File: file1             Status: Up-to-date
> 
>    Working revision:    1.6.4.1
>    Repository revision: 1.6.4.1 /cvsroot/sample/dir1/file1,v
>    Sticky Tag:          b_dev_01_03 (branch: 1.6.4)
>    Sticky Date:         (none)
>    Sticky Options:      (none)
> 
>    Existing Tags:
>         b_dev_01_03_cf                  (branch: 1.6.6)
>         b_dev_01_03                     (branch: 1.6.4)
>         t_pre_dev_01_02_xx              (revision: 1.6)
>         b_dev_01_02                     (branch: 1.6.2)
>         t_pre_dev_01_02                 (revision: 1.6)
> 
> I checked out the b_dev_01_03_cf branch, modified one file, 
> and checked
> it
> in. I get...
>       > cvs status -v file1
> 
> File: file1             Status: Up-to-date
> 
>    Working revision:    1.6.6.2
>    Repository revision: 1.6.6.2 /cvsroot/sample/dir1/file1,v
>    Sticky Tag:          b_dev_01_03_cf (branch: 1.6.6)
>    Sticky Date:         (none)
>    Sticky Options:      (none)
> 
>    Existing Tags:
>         b_dev_01_03_cf                  (branch: 1.6.6)
>         b_dev_01_03                     (branch: 1.6.4)
>         t_pre_dev_01_02_xx              (revision: 1.6)
>         b_dev_01_02                     (branch: 1.6.2)
>         t_pre_dev_01_02                 (revision: 1.6)
> 
> Do you see how the b_dev_01_03_cf branch is NOT off the b_dev_01_03,
> even though I've files checked in in both branches and hence defeating
> the "optimization" that Larry pointed out? Of course tkCVS shows that
> BOTH b_dev_01_03 and b_dev_01_03_cf are off the trunk.
> 
> So I ask again, is this a bug in v1.11.14, or is it user error.
It's still user error ;-)

The branches were applied _before_ any modifications were made. The branch
point is still the same: 1.6

You'll notice they do have different branch points - one is 1.6.4 and the
other is 1.6.6

> If 
> user error, how can I achieve my desired results, where b_dev_01_03
> is off the trunk, and b_dev_01_03_cf branch off b_dev_01_03 branch?
You already *have* those results, you just don't realize it.

Try this sequence:

mkdir test_branches
cvs add test_branches
cd test_branches
echo Hello > newfile.txt
cvs add newfile.txt
cvs ci -m"A new file"
cvs tag -b basic_branch
cvs up -r basic_branch
echo "A change" >> newfile.txt
cvs ci -m "Change on branch"
cvs tag -b sub-branch
echo "A change after sub-branch" >> newfile.txt
cvs ci -m "Change after sub-branch"
cvs up -r sub-branch
echo "A change on the sub-branch" >> newfile.txt
cvs ci -m "Change on the sub-branch"
cvs log

Your output from cvs log should look like this:
RCS file: /cvs/cvs-test/jhyslop/test_branches/newfile.txt,v
Working file: newfile.txt
head: 1.1
branch:
locks: strict
access list:
symbolic names:
        sub-branch: 1.1.2.1.0.2
        basic_branch: 1.1.0.2
keyword substitution: kv
total revisions: 4;     selected revisions: 4
description:
----------------------------
revision 1.1
date: 2004/05/19 20:29:07;  author: jhyslop;  state: Exp;
branches:  1.1.2;
A new file
----------------------------
revision 1.1.2.2
date: 2004/05/19 20:30:41;  author: jhyslop;  state: Exp;  lines: +1 -0
Change after sub-branch
----------------------------
revision 1.1.2.1
date: 2004/05/19 20:29:49;  author: jhyslop;  state: Exp;  lines: +1 -0
branches:  1.1.2.1.2;
Change on branch
----------------------------
revision 1.1.2.1.2.1
date: 2004/05/19 20:31:11;  author: jhyslop;  state: Exp;  lines: +1 -0
Change on the sub-branch
============================================================================
=


The moral of the story is: don't try to interpret or second-guess exactly
what the revision numbers mean. They are black magic voodoo to you and me.
Just worry about the symbolic tags, and let CVS handle exactly how they
correspond to numeric revision numbers.

-- 
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. (http://www.leitch.com)
Columnist, C/C++ Users Journal (http://www.cuj.com/experts)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]