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: Thu, 20 May 2004 13:45:50 -0400

address@hidden wrote:
> First, thanks a lot Jim!!! Really!!!!
You're welcome. We'll get there eventually.

> I still prefer this picture since it "shows" that branch_b is
> off branch_a, even though WE all know now that they're equivalent.
Don't create an artificial distinction that will end up confusing the users.
"A difference which makes no difference is no difference" (attributed to
various philosophers, psychologists, mathematicians and Commander Spock -
anybody have a reference as to who _really_ said it?).

You need to demonstrate this equivalence to your users, and I think the
revised diagram shows that more clearly.

I've an idea. Let's back this whole thing up a step, and start out by
demonstrating what happens on branches that are modified. Start with marking
the branch point for branch_a:
Figure 1:
+-----+    +-----+    +----------+
| 1.1 |----| 1.2 |----|   1.3    |---- ...
+-----+    +-----+    | branch_a |
                      +----------+

Note that there is no actual branch yet - we've only applied the tag. Now,
check something in on the branch:
Figure 2:
+-----+    +-----+    +------+
| 1.1 |----| 1.2 |----| 1.3  |---- ...
+-----+    +-----+    +------+
                         \
                          \
                           +----------+
                           | rev R    |
                           | branch_a |
                           +----------+

Notice that the tag "branch_a" has floated up to the latest revision in the
branch. Note, by the way, that I'm not showing actual CVS revision numbers
so as not to confuse the issue.

Now, create a branch from that branch:
Figure 3:
+-----+    +-----+    +------+
| 1.1 |----| 1.2 |----| 1.3  |---- ...
+-----+    +-----+    +------+
                         \
                          \
                           +----------+
                           | rev. R   |
                           | branch_a |
                           | branch_b |
                           +----------+

Notice that at this point, branch_a and branch_b are identical.

Now, check something in on branch_a:
Figure 4:
+-----+    +-----+    +------+
| 1.1 |----| 1.2 |----| 1.3  |---- ...
+-----+    +-----+    +------+
                         \
                          \
                           +----------+    +----------+
                           | rev. R   |----| rev. S   |---- ...
                           | branch_b |    | branch_a |
                           +----------+    +----------+

Again, notice that branch_a has floated up to the latest revision in the
branch. branch_b is still at the same point. Now, check something in on
branch_b:
Figure 5:
+-----+    +-----+    +------+
| 1.1 |----| 1.2 |----| 1.3  |---- ...
+-----+    +-----+    +------+
                         \
                          \
                           +----------+    +----------+
                           | rev. R   |----| rev. S   |---- ...
                           |          |    | branch_a |
                           +----------+    +----------+
                               \
                                \
                                 +----------+
                                 | rev. T   |
                                 | branch_b |
                                 +----------+

Carrying this on, we get:
Figure 6:
+-----+    +-----+    +------+
| 1.1 |----| 1.2 |----| 1.3  |---- ...
+-----+    +-----+    +------+
                         \
                          \
                           +----------+    +----------+
                           | rev. R   |----| rev. S   |---- ...
                           | branch_b |    | branch_a |
                           +----------+    +----------+
                               \
                                \
                                 +--------+    +----------+
                                 | rev. T |----|  rev. U  |
                                 +--------+    | branch_b |
                                               +----------+

Now the two branches are distinct from each other, and your branching
structure is as expected. 

OK, time to hit the rewind button:
Figure 7:
+-----+    +-----+    +----------+
| 1.1 |----| 1.2 |----|   1.3    |---- ...
+-----+    +-----+    | branch_a |
                      +----------+

This time, instead of modifying the branch then creating the tag, we will
create the tag and then modify the branches:
Figure 8:
+-----+    +-----+    +----------+
| 1.1 |----| 1.2 |----|   1.3    |---- ...
+-----+    +-----+    | branch_a |
                      | branch_b |
                      +----------+

Note the similarity between figure 3 and figure 8. Both branches are about
to sprout from the same point - they are completely indistinguishable from
each other at this time.

Now we modify branch_a:
Figure 9:
+-----+    +-----+    +----------+
| 1.1 |----| 1.2 |----|   1.3    |---- ...
+-----+    +-----+    | branch_b |
                      +----------+
                             \
                              \
                               +----------+
                               | rev R    |
                               | branch_a |
                               +----------+
[thank goodness for copy-and-paste!] Note that branch_b's base point is
still the same: 1.3

Continue modifying branch_a:
Figure 10:
+-----+    +-----+    +----------+
| 1.1 |----| 1.2 |----|   1.3    |---- ...
+-----+    +-----+    | branch_b |
                      +----------+
                             \
                              \
                               +--------+    +----------+
                               | rev. R |----|  rev S   |
                               +--------+    | branch_a |
                                             +----------+

Now we are ready to modify branch_b. It is sprouting from revision 1.3, so
we have:
Figure 10:
+-----+    +-----+    +----------+
| 1.1 |----| 1.2 |----|   1.3    |---- ...
+-----+    +-----+    +----------+
                        \     \
                         \     \
                          \     +--------+    +----------+
                           \    | rev. R |----| rev. S   |---- ...
                            \   +--------+    | branch_a |
                             \                +----------+
                              \
                               +----------+
                               | rev. T   |
                               | branch_b |
                               +----------+

And, continuing modifications on branch_b:
Figure 11:
+-----+    +-----+    +----------+
| 1.1 |----| 1.2 |----|   1.3    |---- ...
+-----+    +-----+    +----------+
                        \     \
                         \     \
                          \     +--------+    +----------+
                           \    | rev. R |----| rev. S   |---- ...
                            \   +--------+    | branch_a |
                             \                +----------+
                              \
                               +--------+    +----------+
                               | rev. T |----| rev. U   |---- ...
                               +--------+    | branch_b |
                                             +----------+

Keep focused on the end results: there are two distinct branches, each of
which contains exactly the changes you need.

-- 
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]