Discussion:
What is a Codeline?
Barton Stanley
1999-05-05 15:31:23 UTC
Permalink
Greetings!

I hope this is an appropriate forum for my question. If not, please let me know sams flames.

I've been looking at the "best practices" SCM document ( http://www.perforce.com/perforce/bestpractices.html ), and I'm a little confused about what a codeline actually is. My trouble starts at section 3, The Codeline, under the bullet "Have a mainlne", where it says, "A mainline...is the branch of a codeline that evolves forever" When I read this, it sounds like a codeline is the mainline, plus other stuff. In fact, if I were to infer a definition of a codeline from this statement alone, I would conclude that a codeline is the mainline and all its branches. However, later on under that same bullet it says that "release codelines and development codelines are branched from the mainline". This makes it sound like each development branch and each release branch is a codeline. If this is the case, I can't make sense out of the earlier definition of a mainline.

I have even more trouble when I read the paragraph right under section 3, The Codeline that says, "In this context, the codeline is the canonical set of source files that is required to produce your software". Now, according to my understanding, I would never use the source files in a development branch to produce my software--I would only use the stuff in release branches for this. Further, according to my definition of "canonical", I would never consider stuff in a development branch to be canonical in any sense--the whole point of development branches as I understand it, is to allow people to check in stuff regardless of its state. So, this definition of a codeline makes it sound like development branches are not codelines because they are not canonical, and are not used to produce the software.

I would appreciate any comments on this.

Also, are most people careful to distinguish between a "branch" and a "codeline", i.e. that a "branch" is just the branchpoint, or the Perforce branch specification, and a "codeline" is a set of files?

Thanks,

Barton Stanley
Brad Appleton
1999-05-05 16:22:00 UTC
Permalink
Post by Barton Stanley
I have even more trouble when I read the paragraph right under section 3,
The Codeline that says, "In this context, the codeline is the canonical
set of source files that is required to produce your software".
Actually - a codeline is a *path* *of* *evolution/development* of the
canonical set of source files that is required to produce a given
software (sub)system. Note that "produce" does not mean any kind of
formal release in this context, it just means in order to build some
stable/consistent configuration that might be used in a client view
(for whatever reason - so don't try to read too much into the meaning
of "produce" - it has no specialized release-engineering meaning here).

But in the context of the paper you are reading, most of the time, a
codeline corresponds to any one single branch. Branch and codeline
are almost interchangeable, so long as the "branch" in question is used
for the *entire* "canonical set of sourcefile" and not just some really
small subset. Since Perforce's inter-file branching does auto-copying
of revisions from ancestor branches to heir branches (copying by
reference rather than by value), this distinction can be hard to
make; it may simply come down to a matter of conceptual intent.
Post by Barton Stanley
I would appreciate any comments on this.
For the purpose of the paper, I would say a codeline is any branch that
can be used to (possibly in conjunction with a baseline/label) to
select or build a valid configuration of the code on that branch.
Post by Barton Stanley
Also, are most people careful to distinguish between a "branch" and a
"codeline", i.e. that a "branch" is just the branchpoint, or the
Perforce branch specification, and a "codeline" is a set of files?
I usually distinguish between a "branch" and a "codeline" in that I do
not consider a branch that is used for only one logical development
activity to be a codeline. If it will be receiving the changes/results
of multiple "change-tasks" ('changes' or 'jobs' in p4 terms), *then* I
will consider it a codeline; otherwise a call it a "task-branch" or an
"activity-branch". I use the term "branch" more generally, since it
could be a codeline, or for a single task. But if I use the term
"codeline" and "branch" in the discussion of the same branching
strategy, then I usually use "branch" to mean a child-branch spawned
from the codeline (which is the parent branch). And the child-branch in
this case might be any kind of branch (a codeline or an activity).

See http://www.enteract.com/~bradapp/acme/branching/ to see more
discussion about how I choose to define and use these terms.

Hope that helps!
- --
Brad Appleton <***@enteract.com> | http://www.enteract.com/~bradapp/
"And miles to go before I sleep." | 3700+ WWW links on CS & Sw-Eng
Continue reading on narkive:
Loading...