Rochester Institute of Technology
RIT Scholar Works
Theses
Thesis/Dissertation Collections
10-1-1986
TCS: a version control system
Rosita Caridi Scheible
Follow this and additional works at:
http://scholarworks.rit.edu/theses
This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion
in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact
.
Recommended Citation
TCS
A VERSION CONTROL SYSTEM
by
Rosita Caridi Scheible
Submitted in Partial Fulfillment
of the
Requirements for the Degree
Master of Science
Approvals:
Peter H. Lutz
Peter H. Lutz (chairman)
Michael
J. Lutz
Michael J. Lutz
Will
J. Stratton
William J
.
Stratton
GRADUATE COMPUTER SCIENCE DEPARTMENT
ROCHESTER INSTITUTE OF TECHNOLOGY
Rochester, NY 14623
;
ed sample statement for granting or denying permission to
duce an
RI~
thesis.
of Thesis
)~I ()~5/~To,~_
·
SM~,Io.;:;:e:....:...·l b~le
__
< _ _R_o_s_i t_a_S_c_h_e_i b_1 e_
hereb~
.
(grant
~
permission to the Wallace Memorial
Library~
of
R.I.T.~
to
duce my thesis in whole or in part. Any reproduction will
e for commercial use or profit.
Or
---
prefer to be
~ted
each time a request for reproduction is made. I can be
CONTENTS
CHAPTER 1
INTRODUCTION
TO TCS AND VERSION CONTROL1.1
INTRODUCTION
1-11.2
THE
NEED
FOR
VERSION
CONTROL
SYSTEMS 1-21.3
BASIC
REQUIREMENTS
1-51.4
THE TCS
SYSTEM
1-7CHAPTER
2
ASURVEY
OF VERSION CONTROL SYSTEMS
2.1
SCCS
(SOURCE
CODE CONTROL
SYSTEM)
2-42.2
CMS
(CODE MANAGEMENT SYSTEM)
2-8
2.3
DSEE
(DOMAINSOFTWARE ENGINEERING
ENVIRONMENT)
2-11
2.4
RCS
(REVISION
CONTROL
SYSTEM)
2-142.5
CCC
(CHANGE AND
CONFIGURATION CONTROL)
.... 2-182.6
AIDE-DE-CAMP
2-22
2.7
CONCLUSION
2-25
CHAPTER 3 TCS
COMMANDS
3.1 TCS USER COMMANDS 3-1
3.1.1
GENERAL FORM OF AUSER
COMMAND
3-23.2
SUPERUSER
FUNCTIONS 3-15CHAPTER 4 TCS INTERNAL
DOCUMENTATION
4.1 THE
TCS
MODULEFILE
4-44.1.1 The Tree Table 4-4
4.1.2 The Release Tables 4-6
4.1.3 The Change Table 4-7
4.1.4 The
Body
Of The Module File 4-84.1.5 Illustrations 4-9
4.2 THE TCS HISTORY FILE 4-13
4.2.1 The
History
File Header 4-144.2.2 The
Body
Of
The
History
File
4-154.3 ACCESSING
A
VERSION 4-164.3.1 Data Structures For
The
ACCESSRoutines
. . . 4-174.3.2 The
Accessing
Routines 4-204.4 STORING A VERSION 4-22
4.5 STORING AND ACCESSING HISTORY
INFORMATION
. . . 4-284.6 THE USER INTERFACE 4-33
4.7 A SAMPLE TCS SESSION 4-35
CONTENTS
APPENDIX
ATCS
FILES
APPENDIX
B
B.l
B.2APPENDIX C
C.l
C.2APPENDIX D
TCS
MODULE FILE FORMATS
THE TCS
MODULE FILE
B-l
PRINTMOD
OUTPUTB-4
THE
TCS
HISTORY
FILE FORMAT
THE TCS
HISTORY FILE
C-l
PRINTHIS
OUTPUT
FORMAT
C-2PRINTEMP
OUTPUT FORMAT
APPENDIX
EAPPENDIX F
SOURCE
CODE
TCS
COMMAND
SCRIPTS
APPENDIX G COMPILE AND LINK SCRIPTS
G.l COMPILING TCS .C FILES
G.2 LINKING TCS MODULES .
CHAPTER
1INTRODUCTION TO TCS AND VERSION CONTROL
1
. 1 INTRODUCTIONTCS (Text
Control
System)
is a version controlsystem
implemented
under UNIX(tm). It recordschanges made to a text
(ASCII)
file,
providingfacilities
for the storage and retrieval ofmultiple versions of a
file,
in
such away
that noversion, once stored,
is
ever lost.TCS
providesbasic controls over how changes are stored, keeps
conflicting changes separate, and provides a
convenient mechanism
for
identifying
any
version.In addition, for each version, TCS keeps a record
of who created the version, when the version was
created, and any user submitted
documentation
text.The
purpose of this thesis project isto
demonstrate and implement a version control system
that reflects many of the positive features
found
INTRODUCTION
TO
TCS AND
VERSION
CONTROL
Several
ofthese
systems willbe
discussed
in
subsequent sections of
this
paper.The
intent ofthis project is not to
implement
a system suitablefor a production environment, but
TCS
does,
indeed,
have
many
immediately
usefulfeatures.
It
providesa simple, yet
functional,
userinterface
consistingof a
handful
of commands thatthe
user can masterquickly.
Even
in
its
presentform,
it
is suitablefor
useby
anindividual
or small project teamconsisting of a
few
individuals.
1.2
THE NEEDFOR VERSION CONTROL
SYSTEMSMost commercially available version control
systems arose from the need of software
manufacturers to control their own engineering
environments.
During
the software development andmaintenance cycle, the components of a software
system (source code, object code,
documentation,
input
file,
etc.) will undergo several changes.Several versions of selected components begin to
evolve and this
in
turn results in multipleversions of the software system itself. More often
than not, multiple versions must be permanently
INTRODUCTION TO TCS
AND VERSION CONTROL
within the software project.
Furthermore,
it
is
often
difficult
to predict which version willbe
needed and
for
what purpose atany
given time.It
may
be
important
to store all versions.Identifying
the
versionsthemselves,
whothey
belong
to,
when andfor
what purposethey
wereevolved became central issues throughout the
software life cycle.
A
version control system insures that noversion (or any
important
information related tothe version) is ever
lost,
once stored. Itprovides a means for control over changes. The
most crucial control is the system's requirement
that two or more individuals
do
nottry
to make achange to the same version at the same
time,
whichwould result
in
incompatible changes.Once a change is stored, a version control
system records who made the change and requires the
user to enter a comment regarding the purpose and
nature of the change.
Given these simple controls, any individual
within the project should be able to make changes
to a component without fear that the work will be
INTRODUCTION
TO TCS
AND VERSION
CONTROL
individuals
must work on a version concurrently,the
ability
toidentify
whois
working
on theversion gives
them
the chance to either coordinatetheir efforts or agree to
keep
changes separate.Should
some problem arise withany
version (abug
in
the code,for
instance),
the person responsiblefor
the
changeis
readily
identified.
This
personis
mostfamiliar
withthe
change and wouldconsequently
be
the centralfigure
responsiblefor
resolving
the problem.In
large
engineering
environments, more elaborate controls are often
implemented. Control over changes
may
mean thatonly chosen individuals be allowed to make changes
to any particular version, or that strict naming
conventions be instituted.
Naming
conventionsprovide a simple, yet powerful, vehicle for
associating changes with a specific project or
version of the entire software system
(i.e.,
asystem configuration).
Software is not the only entity that requires
version control. Large
documents,
like usermanuals, reference guides, and internal software
documentation are continuously under revision.
Like software, these are stored on-line, and
require control over their changes.
A
versionINTRODUCTION
TO
TCS AND VERSION CONTROL
well.
Whenever
multiple versions of an entity mustbe
storedfor
immediate
on-line retrieval,the
question of available
disk
space arises.While
disk
spaceis
continuously
coming down
in
price,it
still remains an expensive proposition to store
redundant data in
large
bodies of information. Toconserve
disk
space, a version control systemstores only the changes (or
"deltas")
toany
version. That
is,
it storesthe
differencesamong
versions rather than all versions
in
theirentirety.
The rationale behind version control within
software development environments is applicable
to
any environment where multiple versions of on-line
files must be stored and are
continuously
undergoing revision. Version control systems are
used to store government and legal
documents,
hardware configuration
information,
VLSI
andPCB
layouts,
etc.1.3 BASIC REQUIREMENTS
With the need for version control in mind, we
can now state the minimum requirements of such a
INTRODUCTION TO
TCS
AND VERSION CONTROL
1.
Store
multiple versions of atext
file
in
aspace efficient manner.
2.
Protect
theintegrity
of each version. (Oncestored, the version is always readily
available. It always looks
the
same regardlessof
any
changes which evolve subsequentversions.
)
3.
Permit
concurrentdevelopment
ofany
version,but
insure
that
incompatible
changes aredisallowed.
4.
Allow any version to be modified at any timeand allow any subsequent version to be stored.
5. Provide a mechanism for the identification of
any version,
insuring
that the user has controlover version identification.
6.
Record,
for
each version, who created theversion and when
it
was created.7.
Allow the user to enter additional descriptiveinformation about the version at the time of
INTRODUCTION
TO TCS
AND
VERSION
CONTROL
8.
Make
information
onany
versionreadily
available
to
the user .1.4
THE TCS
SYSTEM
The
TCS
(Text
Control
System)
stores andretrieves multiple versions of an
ASCII
file. Toconserve space.
TCS
storesonly
the originalversion
in
itsentirety
with subsequent versionsstored as
deltas
of the previous version.Thus,
only the
differences
among
versions arephysically
stored.
When
the
user requests a version, TCSbuilds
the
versionby
applyingdeltas
to previousversions and
delivers
the requested version tothe
user.
The
user views the collection of versions asforming
arbitrary branchesin
a tree.Each branch
is
composed of a chain of nodesrepresenting
the
deltas for each version. Deltas are inserted at
the end of a chain, never between deltas.
This
insures that a version looks the same at all times,
When a version along a chain is requested,
TCS
applies all deltas
beginning
with those for thefirst
versionin
the chain up to andincluding
INTRODUCTION
TO TCS
AND
VERSION
CONTROL
A
versionis
identified
by
atree
name and aversion number within
the
tree.
The
version numberis of the
form:
r.d where r is a releaselevel,
defined
by
the
user and dis
the
delta
withinthe
release.
When
the
user creates aTCS
module,the
original version
is
stored as:tree
0
version1.1.
Tree
0
is
the
maintree
ofany
modulefrom
whichother
trees
canbe
defined.
As
versions are addedto
atree,
TCS
automatically
numbers thenew
version
by
adding
1
to
the
previous version'sdelta
number.
The
user can overridethis
by
requesting
that
the
new versionhave
the next release number.In this case, TCS adds 1 to the previous version's
release number and makes
the
new version'sdelta
number 1.
Any
node inany
delta
chain can be splitinto
one or more
trees,
thusallowing
paths ofdiversion
along the
delta
chain. The user choosesthe
tree
name with the exception of the main
tree's
namewhich is always "0". TCS retrieves a version
within a tree
by
applying all deltasfor
thetree's
parent node and deltas within the tree's
delta
chain.
In
a sense, each tree can be viewed as aINTRODUCTION TO TCS AND VERSION CONTROL
original version
being
that of the parent node.Figure
1-a
belowillustrates
the treestructure of a collection of versions of a file
called
"program.
c".Tree
names precede theirdelta
chains.
Each delta
is
shownin
theform
of r.dwith marks
separating
the
deltas.
Each
deltawas created
from
the versions representedby
deltasto the left of it along a chain.
The
maintree,
0,
has
4
releases, with thelatest
versionbeing
4.1.Trees: "treel," "treel_a," "tree_a," "tree_b"
each
have their own delta chains.
Deltas
for thesetrees
are appliedonly
when the user calls for aversion within the tree.
For
instance,
if
the usercalls
for
version "treel_a 1.1" thedeltas
0
1.1,
0
1.2,
treel1.1,
treel1.2,
and treel_a 1.1 areapplied and all other deltas are ignored. If
the
user called for version "0 2.1,"
then deltas 0
-1.1 1.2--1.3--2.1 are applied and all others are
ignored.
Any
node can have any number of subtrees or"children"
trees.
The
depth of any tree is limitedonly
by
certain"hard"
limits,
on the total numberof
trees,
imposedby
the system. Thatis,
alltrees are created equally. The only case
in
whichINTRODUCTION
TO
TCS
AND
VERSION
CONTROL
TCS
0 - 1.11213
2.1--23.1--3.2--3.3~3/43.5--4.1
I
I
treel
-1.11.22.1
tree_a - 1.1
tree_b
-1.12.1
trea1_a
-1.1
Figure 1-a
request
is
whenits
tree
table
is
full.
The
tree
table
cancurrently
accommodate100
trees.
There
can
be
any
number ofdeltas
within a release.The
concept of atree
as a path ofdivergence
within a
delta
chainis
anintegral
part of versioncontrol.
There
aremany times
whenit
is
necessary
to
insert
adelta
of a versionin
the
middle of adelta
chain.If
TCS
wereto
permitthis,
the
integrity
of subsequent versions withinthe
chainwould
be
corrupted since versions arebuilt
from
previous versions
along
the
chain.By
creating
atree
of the intermediate node,the
useris
nowfree
to
changethis
version ashe/she
chooses.Thus,
any
version withinthe
module canbe
changed andits
changes stored at anytime, withoutaffecting
INTRODUCTION TO
TCS
AND VERSION CONTROL
Trees also allow
for
concurrent changes to aversion.
In
order to make a change to thelast
version
in
adelta
chain,the
user must reservethe
version
for
change purposes.Once
reserved,any
attempt
by
another user to add a delta to thatchain
is
shut out untilthe
user who requested thereservation either cancels
the
reservation or addsthe new version to
the
chain.This
controlprotects the
integrity
ofthe
new version.However,
two
or more users can concurrently storetheir changes to a version
by
creating a tree ofthe node in question and reserving their respective
trees'
last version for change.
Thus
changes madeby
two or more users can be stored separatelywithout affecting each other.
Information regarding the module file is
always readily available to any user. TCS provides
the SHOW command for
tracking
the structure andstate of the delta tree for any module. SHOW
displays a tree's path name, will tell whether or
not a tree
is
reservedfor
change andby
whom, andshow the last revision date
for
a tree.It
willalso show the release chain for any tree and the
highest delta
in
each release.To
help
trackconcurrent development, the SHOW CHILD
facility
INTRODUCTION TO TCS AND VERSION CONTROL
any
node.SHOW CHILD
also tells whetherthe
childtree(s)
is
reserved for change. If the tree isreserved, SHOW displays the reserver's
ID,
and theCHAPTER
2
A
SURVEY OF
VERSION CONTROL SYSTEMS
This
chapter will consider severalcommercially
availableVersion Control Systems:
SCCS
(under
UNIX)
DEC'S
CMS
(under
VAX/ VMS)
RCS (under
UNIX)
Appollo's
DSEE
Softool's
CCC
SMDS,
INC.'s
Aide-de-Camp.
In
much ofits
internal
and externalstructure,
TCS
resemblesSCCS,
UNIX's
Source
Code
Control
System.
Both
allow the user to view thecollection of versions as nodes
in
atree,
operateon a single "Module" at a
time,
andincorporate
the
"release"
and "delta within the release"
idea.
TCS's
version storage mechanism, theinterleaved
file,
and accessing algorithms arebased
onthose
A
SURVEY
OF VERSION CONTROL
SYSTEMS
accessing
algorithms are explainedin
a laterchapter .
SCCS AND TCS
usethe
UNIX
"diff "program
to
isolate
differences.
Of
course,SCCS
differs
from TCS
inmany
respects.
SCCS
makes no provisionsfor
assigning
symbolic names to
any
node, whileTCS
providesthe
tree name capability.
Note
that if a TCS node istreated
as anempty
tree,
then
any
node canbe
assigned a symbolic name.
TCS
also encouragesextended change
documentation
by
accepting
acomment of
up
to1000
characters on a new version.Since comments are variable
length
and not accessedas
frequently
as the versionsthemselves,
they
arekept
in
a separatehistory
file.
This
savesthe
"GET"
program the time and
trouble
of readingthrough or around all comments to get to the
body
of the TCS file.
Rochkind's description of SCCS is significant
in that it provides a model for Version Control.
All version control systems store deltas rather
than entire versions.
All,
except the RCS system,manage the deltas through the use of the
interleaved
file,
which stores all versionsin
onefile. Deltas are interspersed throughout with
A
SURVEY
OF
VERSION
CONTROL
SYSTEMS
the version
that
createdthe
delta.
All
ofthe
above systems, at the
very
least,
providefor
concurrent
development,
record when a change wasmade and
by
whom, require thatonly
one person at atime check out a version
for
change purposes, andrequire a
descriptive
comment when a newdelta
is
installed
in
the
file.
In
addition,they
provide amechanism
like
the
"SHOW"command
that
display
information
onthe
structure of the revision treeand about each version. In short, all meet the
minimum requirements outlined earlier.
TCS,
SCCS,
CMS,
andDSEE
are similar intheir
user view. Revisions appear as incremental nodes
in delta chains with branches from any node
handling
paths of divergence. These operateprimarily on single files.
CCC and
Aide-de-camp
differdramatically
fromthe other version control sytems in their user
view. These handle collections of files in a
centralized data
base,
providing full configurationmanagement for an entire system of data.
In
general, version control systems differprimarily in the extent to which
protection
mechanisms are employed, in their facilities to
A
SURVEY
OF VERSION
CONTROL SYSTEMS
to
automatically
mergedivergent
versions, andin
their
the
facilities
tohandle
additionalinformation
about a versionbesides
adescriptive
comment at creation
time.
2.1
SCCS
(SOURCE CODE
CONTROL
SYSTEM)
Since
the original publication ofSCCS
C14D
inthe
early
1970's,
the
systemhas
undergone severalrevisions.
The
following
discussion
is takenprimarily
from
the
UNIX System
VUsers
Manual
[83.
A critique of
SCCS
(in
comparison toRCS)
is
found
in
C113.
SCCS
operates on a "module" at a time.A
module refers to a convenient unit of source code
usually
a subroutine or macroE143
that wouldnormally
be
stored in a singleASCII
file.
All
information about the module
is
stored in oneUNIX
file.
Tables,
protection information and usersubmitted comments form the "header". The
body
consists of the original version,
deltas,
andcontrol records used to recreate the versions.
Like
TCS,
versionsdevelop
along a main chainof
deltas
and are grouped into releases.When
anew
delta
is
added to the chain (Delta operation) ,A
SURVEY
OF
VERSION CONTROL SYSTEMS
delta
number withinthe
release.An
"administrator"over
the
moduledefines
the
next release.
SCCS
also allowsthe
administratorto
specify
the
initial
release number and whetheror not release numbers are skipped
in
the
releasesequence.
This
serves a valuablefunction
sincein
a
typical
engineering
environment,
all versions arenot
kept
online
for
alltime.
Once
a softwareproduct
is
released tothe
field,
it
is
thatversion and a
back
versionthat
are ofprimary
importance.
Obsolete
versions are stored ontape.
And
newSCCS
modules are createdfrom
the mostcurrent ones.
By
allowing the
user to number theinitial
release, the sequentialnumbering
system ofreleases
is
preserved.Note
that inTCS
andRCS
the
initial
release number is always1.
To allow
for
concurrentdevelopment,
theadministrator can create
branches
emanating
from
any node in
the
module tree.SCCS
automatically
numbers a new
branch
with the nexthigher
branch
number
for
its
parent node.Several
versions candevelop
along
any
branch,
andSCCS
willsequentially number
them,
with a "sequence" number.So
a version isuniquely
identifiedby
R.L.B.S.
A
SURVEY
OF
VERSION CONTROL
SYSTEMS
within
the
release;B
is
the
branch
number;
and Sis
the
sequence number withinthe
branch.
Figure
1-b
illustrates
anSCCS
revision(delta)
tree.
The
node
denoted
by
"Node
X"is
identified
as version2.1.1.2.
Node
Y's
identification
string
is
2.1.2.1.
SCCS
Node X
(
2.1.1.2Figure 1-B
When
retrieving
a version(GET
operation) ,for
read or change purposes, the user canspecify
that
one or moredeltas
be
included
or excluded.The
inclusion
mechanismforces
deltas
along
separate
branches
to
be
applied,causing
automaticmerging
of changes.The
"merged"version is
delivered
tothe
user, who can then store thisversion as
the
next onein
adelta
chain.The
A
SURVEY
OF
VERSION CONTROL
SYSTEMS
deltas
that
wouldnormally
be
appliedfor
the
version.
Excluding
deltas
is
handy
for
correcting
mistakes in a stored version.
When
a versionis
retrievedfor
editing
purposes,
the
user who madethe
reservationis
the
owner of a
lock
onthe
version.Before
someoneelse can add a
version,
this
usermust either
relinquish
the
lock
or add a new version.A
moduleadministrator can
break
the
lock
to
allowanother
user
to
addto
the
delta
chain,
or create abranch
for
concurrent work.Thus,
work onthe
modulecan
proceed
in
the
absence of the person who made theoriginal reservation.
It
is
important
to note thatthe
administratorbreaks
the
lock.
This
can serveto
insure
that the partiesinvolved
arein
communication
regarding
the state of the module andthat
deltas
are not createdfrom
the wrongversions.
An
administrator can enforce control over whomakes changes within a release.
SCCS
keeps a listof users who can add
deltas
to a release.If
thelist
is
empty, then anyone with write access to theSCCS module
file
can add deltas. The administratorcontrols additions and deletions
from
the list.A
SURVEY
OF
VERSION CONTROL SYSTEMS
further
changes canbe
madeto
any
nodein
the
release.
Additional
highly
usefulfeatures
include
retrieval
by
cut offdate
wherethe
system gets aversion
ignoring
deltas
made afterthe
cut offdate.
An
administrator canspecify
that
the
systemprompt the user
for
aModification
Request
Number
each time a
delta
is
created.This
helps
tojustify
the reasonfor
creating deltas
and trackits
effects.SCCS
will also compare two or moreversions within a module
(SCCS
diff
command).2.2
CMS
(CODE MANAGEMENT SYSTEM)
C4DDigital
Equipment
Corporation's
CMS
runs onthe
VAX
underVMS.
CMS
manageslibraries
ofrelated
files.
Each file
in
the
library
isknown
as a
CMS
ELEMENT.
To
facilitate
elementidentification,
the
user can subdivideLibraries
into
"GROUPS"of elements.
Within
each element,Versions
develop
along
amain
line
of descent. Asdeltas
are added, thesystem
sequentially
numbersthe
nodes.Paths
ofdivergence from the main
line
are givenby
avariant letter. A variant
letter
is
userA
SURVEY OF
VERSION CONTROL SYSTEMS
variants,
sothe
delta
tree
can reachany
depth.
Furthermore,
any
node canbe
placedinto
a "CLASS,"giving
the
node a symbolic name.Nodes
from
several elements can
belong
to
one class.Figure
1-c
shows adelta
tree
having
a node whose "CLASS"name
is
"baseline."(GENERATION
4
ofthe
mainline
of
descent).
BASELINE
has
a variantbranch
A
with2
deltas Al
andA2.
Node
BASELINE/A2
has
a variantA
also withdeltas
Al, A2,
andA3.
The
node withthe
class name 1proj002"is
version4A2A2
orBASEL
INE/A2/A2.
CMS
Figure l-C
In
orderto
add adelta
toany
branch,
a usermust "RESERVE" the
last
nodein
the
branch.
If
another user attempts to
Reserve
the same node,CMS
A
SURVEY
OF VERSION
CONTROL
SYSTEMS
options are to either quit or proceed with a
concurrent reservation.
Several
users can reservea node at a time.
However,
the
first
to
"REPLACE"the version creates
the
next generation.When
thenext person attempts
to
replace the modifiedversion, the system
informs
him
ofthe
previousreplacement.
His
options,in
this case, areto
create a variant node or merge his changes with the
latest
versionby
reserving
thelast
node using the/MERGE option.
When the user retrieves a version using the
/MERGE qualifier, CMS
automatically
merges theversions and delivers the merged version to the
user. Line conflicts are flagged in the merged
file. (A line conflict occurs when the two
versions changed the same
line
of text.)The
userreviews the
file,
resolves any conflicts and thenissues a REPLACE to permanently store the changes.
The /MERGE qualifier can also be used on a "FETCH"
(read only retrieval).
So,
it is not necessary toreserve an element before seeing the results of a
merger.
CMS relies on the VMS file protection
mechanism for
defining
who can makechanges to any
A SURVEY OF VERSION CONTROL SYSTEMS
actually
aVMS
directory
defined
by
the
user.Anyone with write access to a
file
on thisdirectory
can add deltas toany
version within theCMS ELEMENT (which is actually a VMS file).
Versions cannot be
selectively
write protected asunder SCCS.
2.3
DSEE
(DOMAINSOFTWARE
ENGINEERINGENVIRONMENT)
C5,73
DSEE
is
a collection of software engineeringtools
for
theAPOLLO
micro computer systems. DSEEruns under the APOLLO AEGIS operating system.
Version control is a major tool within this
engineering environment.
Like
CMS,
DSEE groups user files intolibraries. Each file is a
library
"element."
Protections are established at the
library
level,
not at the file or version level. Anyone with
"MEMBER"
privileges to the
library
can modify anelement.
In
DSEE,
the version tree evolves in a mannersimilar to CMS. Generations of nodes are
sequentially numbered starting with
generation
1
along any branch.
Any
node can begiven one or
A SURVEY OF VERSION
CONTROL
SYSTEMS
Variants
from
aline
ofdescent
arehandled
in
aslightly
different
way.If
aline
ofdescent
is
reserved
for
editing,any
other attemptsto
reserve
it are shut out.
If
a second user needsto
modify
the same version,
he
creates abranch,
giving
the
branch
a symbolic name.A
member can also render aline
ofdescent
"obsolete,"meaning
that
it
cannotbe
extendedbut
anyone with read privileges canstill read any version
along
thebranch.
To
further
facilitate
concurrentdevelopment
and cooperation among users,
DSEE
provides aMONITOR feature. When a user places a monitor on
an element, this user is notified of
any
modifications to the element. A person
issuing
a"RESERVE"
is also
informed
of the monitor.DSEE
provides a means of merging separatelines of descent. The merge operation is performed
interactively,
so that the user can see and controlthe results immediately. DSEE displays lines from
each version. The system cannot merge lines
without the user's permission.
To conserve space, as with other systems, DSEE
is delta based.
However,
it uses "blankcompression," for suppressing
leading
blanks on allA SURVEY
OF VERSION CONTROL
SYSTEMS
which manage versions via
the
interleaved
file,
the
time
to
retrieve a version isdirectly
proportionalto the size of the file.
All
versions areretrieved in equal time.
DSEE
assumes that thelatest
version will be retrieved most often.To
save retrieval time
for
this
version, it keeps acache of
the
latest
version of all elementsin
the
library.
That
is,
this
versionis
storedin
its
entirety outside of
the
interleaved
file.
This,
ofcourse, increases
the
use ofdisk
space,but
otherspace saving measures,
like
blank suppression,help
offset the effect.
An additional significant feature under
DSEE,
is a Configuration Management facility. The user
can define components of a system through
"configuration
threads."
These threads are lists of
user specified versions of each element composing a
system configuration.
This,
coupled with theability to give nodes a symbolic name (the nodes
belonging
to
a specific configuration within eachelement can be given the configuration name) and a
wildcarding capability which allows the user to
specify several versions
having
the same nameA
SURVEY OF VERSION
CONTROL
SYSTEMS
2.4
RCS
(REVISION
CONTROL
SYSTEM)
CI,
113
To
the
user,RCS
(whichis
implemented
underUNIX)
appears totreat
versions in the sameway
asSCCS and
TCS.
Like
these,
RCS
groups revisionsinto releases
along
the maintrunk
ofthe
revisiontree
(TCS allows releasesalong
any
branch)
.As
in
SCCS,
RCS numbersbranches.
Branch
nodes,themselves,
can havebranches.
As
inTCS,
the usercan assign a symbolic name to
any
branch as well asto individual revisions.
RCS
is uniquein
that it does not use theinterleaved
file
to store deltas.Rather,
deltasare stored as a series of edit commands known as
"Reverse"
deltas upon the latest version (of the
main branch) . Branches are stored as foreward
deltas. That
is,
versions along branches areconstructed
by
applying a series of edit commandsto the previous version.
Figure 1-d shows an RCS revision tree whose
main branch consists of versions
1.1,
1.2,
and 2.1.The arrows show the delta direction. RCS stores
the entire version
2.1,
the edit commands totransform 2.1 to
1.2,
and the commands to transform1.2
into version 1.1. Node 1.2 has two branhes:one named
"temp_fix"
A
SURVEY
OF
VERSION
CONTROL
SYSTEMS
RCS
/
...^
Figure 1-d
identified
by
the
system generated number"1.2.1.1".
The
branch
node "temp_fix" alsohas
abranch
identified
as "proj_l," orby
its
versionnumber,
"1.2.2.1.1."
Any
branch
nodeis
shown as aforeward
delta.
Along
any
branch,
a series of editcommands on the previous version
is
appliedin
order
to
generate a version.Reverse
deltas
provide an advantagein
accesstime
for
the latest version, the assumptionbeing
that
these are accessed the most.The
disadvantage
A
SURVEY
OF VERSION
CONTROL
SYSTEMS
takes
time
proportional tothe
number ofdeltas
applied.
As
in
the other systems,RCS
requires aversion to
be
reserved or "locked"for
editing
before
the
user can add adelta.
However,
RCS
provides a
flexible
commandfor
breaking
a lock sothat work can proceed uninterrupted
in
the absenceof the
lock
owner.SCCS
also providesthis
lockbreaking,
but
it mustbe
done
by
an administratorwith special privileges. No such privileges are
required under
RCS.
But,
unlikein
SCCS,
RCSnotifies a
lock
owner of a "break in"via a mail
message
containing
thebreaker's
identification anda commentary-
To
allowany
user this privilegedoes not seem to cause excessive conflict in
practice.
According
toTichey
C13,
"the automaticmail message attaches a high enough stigma to lock
breaking,
so that programmers break locks only inreal emergencies, or when a co-worker resigns and leaves locked revisions behind. "
RCS facilitates Configuration Management
by
allowing symbolic names on
any
node and awildcarding capability that causes retrieval of
several files at a time.
For
example, suppose thatA
SURVEY
OF
VERSION
CONTROL
SYSTEMS
RCS
directory
andthat
eachfile
contained aversion called "reL85_l."
The
RCS
"CHECK
OUT"command, CO -rrel85_l .C, would retrieve the
"reL85_l"
version from each .C file.
In
addition,RCS allows retrieval
by
cut-offdate
(as doesSCCS) .
RCS
provides a convenient MERGE commandthat
functions
in
a manner similar tothe
CMS
/Merge
facility.
In
addition,RCS's
"CHECK
IN"(equivalent to TCS's
PUT)
operation permits the useof a pathname on
both
theRCS
revisionfile
and theuser's
working
file
which contains the new verison.This convenience saves the user from the nuisance
of copying the working
file
into
afile
with thesame name as the revision
file
on the revisionfile's directory. Neither SCCS nor TCS provide
this
facility,
as yet.RCS keeps a list of users who are allowed to
update RCS files.
Thus,
a system administrator canset protections at the file level.
However,
RCS
does not have a provision for selectively
protecting specific versions.
2.5 CCC (CHANGE AND CONFIGURATION CONTROL) C2,33
A SURVEY
OF
VERSION CONTROL
SYSTEMS
configuraiton management
tool,
running
on severalmachines under several
operating
systems(among
them are:
VAX/VMS,
VAX/UNIX,
IBM/CMS,
IBM/MVS,
IBM
PC/MS_DOS,
APOLLO/AEGIS,
DG/MV_UNIX)
.CCC
controlsand
tracks
changesto
binary
as well as to ASCIIand
EBCDIC
files.
The
user sees ahierarchical
organization ofinformation
in
CCC.
The hierarchical
levels,
termed
DATA
BASE,
SYSTEM,
CONFIGURATION,
andMODULE,
areillustrated
in
Figure
1-e.CCC
0A1A QASL
system.1 system^ systemJi
config_1 config_2 config_n
sysrun
conFiGUR/fnon
module-1 module_2 module_m mODULE
FIGURE 1-e
The
data baseis
composed of"systems"
of
data. The configuration level represents the
versions of any given SYSTEM.
The
user can chooseto
further divide configurations into MODULESrepresenting the components of the
A
SURVEY
OF
VERSION CONTROL
SYSTEMS
Physical
data
entities stored underCCC
aretermed
"TEXT data
structures"and can
be
stored atany
level
within thehierarchy.
The
user cangroup
related
text
data
structuresby
defining
textTYPES.
A
version oftext
is
identified
by
a systemgenerated version number or
by
a U3er suppliedCHANGE NAME.
Version
controlis
provided onany
TEXT
data
structure atany
level
withinthe
hierarchy.
The
userhas
the
option ofstoring
changes either as a
delta
ofthe
last
version ofthe
TEXT
data
structure or as a separate versionin
its
entirety.CCC provides the usual
locking
mechanism for achange to a
TEXT
file. To effect concurrentdevelopment ,
the
user creates a new systemconfiguration or module data structure and inserts
the
TEXT structure into the new structure. Of allthe systems mentioned, CCC provides the most
powerful and elaborate protection mechanisms.
CCC
keeps a list of all users, which data structures
they
can access, and passwords to data structureswithin the hierarchy. In order to access any
information,
the user logs into a specific systemor configuration and,
in
doing
so, must supplyA
SURVEY
OF
VERSION CONTROL SYSTEMS
The
"cast
of characters"within a
CCC
environment are a
"Data
Ba3e
Administrator," "Managers,"and "Users."
The Data Base
Administrator
has
free
reign overthe
entiredata
base.
This
personinitializes
and maintainsthe
data
base,
has
read/write access(MANAGER
privileges) to
any
data structure at any level ofhierarchy,
anddefines
the
MANAGERS
andUSERS.
MANAGERS
have
special privileges to the system orconfiguration.
Managers
delegate
read/writeprivileges to
USERS
withintheir
domain.
They
determine
who can make changes to aTEXT data
structure and who can
physcially
delete
structures.The
"USER"can
insert
newTEXT
structures, makechanges, and
logically
delete
data
structures.Under
CCC,
the organization can create anenvironment that mimics the organization's chain of
authority.
In
addition to these protections, CCCprovides an encryption
facility,
in which TEXTstructures can be stored in up to 9 levels of
encryption.
So
that the organization can tailor its use ofCCC
to its individual environment, CCC has apowerful MACRO capability and an internal editor
which can
be
used to makehighly
controlledA SURVEY OF VERSION CONTROL
SYSTEMS
the
internal
editor givesthe
userthe
option ofmaking changes right within the
CCC
environment.Contrast this with the other systems where changes
are made using the operating system's editor
exclusively.
Under
CCC,
TEXT
files,
of course, canalso
be
"EXPORTED"(read
from
the
database),
edited within the user's environment, and
the
newversion "IMPORTED"
back
into
the
data
base.As
with
RCS,
the user canspecify
a namefor
theimported file other
than
the
data
base
textfile
name.
When
a user enters a new version into the database,
CCC requires a descriptive comment of thechange. Descriptions entered under
SCCS,
RCS,
CMS,
and DSEE are limited to one line. "One
liners" are
sometimes inadequate to describe the nature of a
change. Under
CCC,
the user enters a multi-linedescription (0 to 436 characters). TCS also allows
multi-line descriptions. The idea for line
prompting under TCS was taken
directly
from CCC.CCC prompts with the number of characters entered
on preceding lines.
2.6 AIDE-DE-CAMP CI 03
A
SURVEY
OF VERSION
CONTROL
SYSTEMS
environment,
from
Software
Maintenance
andDevelopment
Systems,
Inc.,
is
implemented
underthe
UNIX,
and VAX/ VMSoperating
systems.The
systemmanages configurations within a centralized
data
base.
Aide-de-Camp
capturesincremental
changes toindividual
files
through the
use of "CSETS" (changesets).
CSETS
are composed of relatedfiles
undergoing revision
by
anindividual
or projectteam.
In
practice, organizations often grouprelated changes
into
"projects."By
tagging
aCSET
with a project
identification
code, the user caneasily track all projects.
When
the user creates aCSET,
Aide-De-Camp requires that the user enter aremark
describing
the reasonfor
the CSET. Thisremark can serve to
further
facilitate
projecttracking.
Aide-De-Camp
provides a simple yet elegantuser view of changes to configurations. A version
of the system is defined via a "list equation"
which gives the relationship between an already
installed version and one or more CSETS. Suppose a
version (configuration) V exists and change sets A
and
B
contain changes to a file inV
and/or newfiles to be combined in
V,
a new version VI isdefined
by
the equation:A SURVEY
OF
VERSION CONTROL SYSTEMS
In
orderto
delete
changesfrom
a version,the
"-"operator is used.
The
equation:V2
= VI-B
would delete
CSET
B's changes inthe
new versionV2.
The
system supports concurrentdevelopment
by
allowing
CSETS
tohave
files
in
common.The
userwill place "conflicting" changes
into
separateCSETS and
later
mergethe
changesinto
a newversion.
Consider
a versionV
consisting
offiles
Fl,
F2,
F3,
F4,
F5.
CSET
A consists of changesmade
to
files
Fl
and F2, and a newfile
F6. CSET Bchanges files Fl and F3. If VI = V + A +
B,
thenVI consists of:
those files in V not changed
by
A or Bthe version of F2 from A
the version of F3 from
B
the line
by
line merger of versions of Fl fromboth
A
and BA
SURVEY
OF
VERSION CONTROL
SYSTEMS
Like
CCC
andTCS,
Aide-De-Camp
will store anextended
commentary
onthe
nature of each change.Whenever
a changeis
installed
within aCSET,
the
system requires
the
userto
submit an "abstract"describing
the
change.The
abstract is a filecontaining
the
documentation.
Thus,
the
systemencourages
full
documentation
of changes.Primarily
intended
for software engineeringand the source code storage,
Aide-De-Camp
recordsrelationships among entities in the
data
base.These relationships
help
the user toidentify
actions to be taken when object files are generated
from changed source. The user can assert that file
GT
"includes"file
RX
and/or define objectlibraries and assert the procedures (subroutines)
contained in the library. The system also stores
information such as, "file X
'contains'
procedure
Y"
and "Y calls procedure Z."
Such information
helps to
identify
calling trees and which files areaffected
by
abug
fix or enhancement. It alsohelps to avoid duplication of subroutine names when
a new file is added to a software system.
Relationships are stored in relationship tables.
The user can always read or make changes to these
tables. The system records changes to these tables
A
SURVEY
OF
VERSION CONTROL SYSTEMS
recorded.
So
a version can alsoinclude
changesto
these
tables.
Protections
are set atthe
data base
level.
Any
user with write privilegesto
the
data
base
canmake changes
to
any
file,
createCSETS,
assert andchange
relationships,
etc.In
other words,the
user cannot
selectively
protectindividual
entities.
2.7
CONCLUSION
While
version control systems (TCSincluded)
differ
from each other in howthey
define
their
user view of how
information
on one or morefiles,
within
their
domain,
is
stored all provide thebasic
functionality
neededfor
version control.They
provide an automaticway
oflogging
who made achange and when.
For
instance,
TCS
stores theuser's
login
ID
anddate
from
the
operating
system.Each
system storesincremental
changesbut
alsoprovides
for
paths ofdiversion.
Concurrent
changes to
the
same version arekept
separately.To
conserve space, all systems aredelta
based.
With
the exception ofthe
RCS
system, these systemsstore and retrieve
deltas
usingthe
interleaved
A
SURVEY
OF VERSION
CONTROL
SYSTEMS
described
later
in this paper.All
storeinformation on
the
nature of a change in theform
of a user
commentary
submitted when a new versionis stored.
While
the system cannot provideautomatic control over how
informative
thiscommentary
is,
itdoes
encourage thedocumentation.
The
important
elements ofrecording
who, when, why,and how a change was made are present in any
Version Control System.
Usually
versionidentification
is implementedvia an automatic sequential numbering system
like
that in TCS. In addition, most systems allow the
option of symbolic names for version
identification. A shortcoming of SCCS is the
absence of this feature. Without
it,
the user isforced to remember the meaning of each version
number.
SCCS,
RCS,
and TCS support releasegroupings of versions whereby specific incremental
changes can be related to milestones within a
project.
By
supplying the release number alone ona "get" type operation, the user can retrieve the
highest delta within the release. The user need
not remember all version numbers and their
meanings.
In
addition, TCS allows releases todevelop
along any branch in the versiontree,
sothat any node can
be
given a"milestone"
A
SURVEY
OF VERSION CONTROL
SYSTEMS
branch
is
then
viewed as a separate module withits
own main chain of deltas.
TCS,
CCC,
andAide-De-Camp
encourage fulldocumentation of changes
by
providing an extendedcomment
capability
when adelta
is added. Thesystem assumes the task of
associating
documentation text with its
corresponding
version.Other systems associate a one
line
comment witheach version.
In
all systems, thequality
ofthis
documentation (that
is,
how well it describes thenature of a change) is the responsibility of the
user.
TCS,
like most systems, relies on theoperating system's protections. Anyone with
read/write access priviliages to a TCS file can add deltas anywhere within the version tree. SCCS and
CCC provide their own. protections whereby
protections are set on selected versions within the
revision file. In large engineering environments, the extended protections may be mandatory
requirements of the system.
Without exception, all systems
"lock"
versions
undergoing change. This ensures that
changes are
incremental;
thatis,
each delta is created fromA
SURVEY
OF VERSION
CONTROL
SYSTEMS
versions,
however,
canhold
up
progress on aproject,
if
the
versionis
locked
for
an excessivelength
oftime
orin
the
absence ofthe
lock
owner.CMS
gets aroundthis
problemby
permitting
multiplereservations on a version, under controlled
conditions.
SCCS,
RCS,
andTCS
provide a meansfor
breaking
alock.
TCS
provides theCANCELC
command,but
this command must beissued
by
the
owner of thelock.
Making
lock
breaking
a conscious effort onthe
part ofthe
lock
ownerinsures
that
this personis
aware of the who, why, and what changes arebeing
made to a version that he intends to change.For extreme circumstances when the lock owner is
not available,
TCS
provides the XCANCEL commandwhich breaks a lock without asking any questions
about the breaker's ID. This command is intended
for use
by
some super-user who would takeresponsibility for
informing
the owner of the"break-in. "
A significant feature present in most systems
is
an automatic merging facility.TCS,
as yet,does not have this built-in feature. The merging
issue warrants a stern caution. The user must
always
keep
in mind this is strictly a clericalfunction of
blindly
merging lines. There is noA
SURVEY
OF
VERSION
CONTROL
SYSTEMS
knowing
whetherthe
merged version containsthe
functionality
that
the
user needs.For
this
reason, no system will
immediately
store amerged
version.
A
merged versionis
alwaysdelivered
to
the user
for
inspection
andediting
if
needbe.
DSEE
goes astep
further
by
requiring
the
userto
inspect
the
version asit
is
built.
While
merging
provides a convenience
for
the
user,
there
is
always
the
danger
that
the
user,forgetting
that
automatic propagation of
separately
stored changesis
purely
clerical,
willimmediately
store themerged version.
In
this
case,the
user isassuming
that the system
has
determined
that thefunctionality
of the separate versions arecompatible.
The author asked several software engineers to
comment on merging.
These
engineers work on alarge
software system consisting ofapproximately
8000
files of source code.Conflicting
changes isa central issue in this environment. Their
responses to the question, "Is automatic merging a
desirable
feature for a code control system?"ran
mostly
along the lines of: "I wouldn't trustit;"
"It would encourage sloppy
programming;"
"I'd
rather recode than unscramble merged
A
SURVEY
OF VERSION
CONTROL
SYSTEMS
Under
close scrutiny, automatic merging isnice,
but
usually
not necessary.The
authors ofSCCS saw fit not to make automatic merging
easy
for
the user. The
early
verisons of the CCC system donot provide this ability. It was
installed
into
CCC after its 2.0 release.
While
TCS
does notprovide
for
automatic mergers, theaccessing
algorithms are
implemented
in
such away
thatthis
feature could be added later.
Several of the systems
discussed,
provideother desirable features which could later be
incorporated into TCS.
Among
these features are:retrieval
by
cut off datean exclusion mechanism whereby the system
facilitates mistake correction
by
skippingdeltas that the user specifies.
. the ability to specify path names for
the user
file containing a new version to be added to a
module
. the ability for the user
to selectively lock
A SURVEY
OF
VERSION CONTROL SYSTEMS
the
ability
for
an administratorto
selectively
read/write protect specified versions,
releases, or trees
a built-in
wildcarding
capability thatfacilitates
the
retrieval of related versionsfrom several
files
TCS
containsthe
absolutely necessary features for
version control.
That
is,
it meets the minimumrequirements outlined earlier.
However,
mostimportant,
theTCS
programs store the informationnecessary for the enhancements listed above. The
programs are structured in such a way that these
CHAPTER
3TCS
COMMANDS
This
chapter contains two major sections:TCS
USER
COMMANDS
andTCS
SUPER-USER
FUNCTIONS.
The
first
ofthese
sections containsdetails
for eachTCS
commandthat
the
general userissues.
Each TCS
user command
is
presentedin
alphabetical order, ona separate page, so that the user can
easily
reference any command.
The
last
section, SUPER USERFUNCTIONS,
outlines those commands issued
by
someadministrator or the
TCS
programmer.Details
for
these are found in the command files (shell
scripts)
in
Appendix F.3.1
TCS USER COMMANDSGET
Retrieve a version for read only or changepurposes.
PUT
Store a new version along withinformation
about the version.
CREATMOD Create a
TCS
module filefrom
the
original version.CREATREE
Create a child tree of a nodein
the
TCS
module.
TCS
COMMANDS
SHOW
CHILDShow
(display)
the
children of a nodein
the
module.CANCELC
Cancel
the
change reservation on atree.
3.1.1
GENERAL FORM OF A USER COMMAND
The
syntax of a user commandis
similar toUNIX
commands with
the
exception that required argumentsare submitted
first,
followed
by
optionalarguments.
In
general, a command is ofthe
form:
command <argl> <arg2> . . . <argN>
C-optl
-opt2 ... -optN3Required
arguments are shown within < > marks.These
directly
follow
the command, are positionalarguments, and are separated
by
white space (blankor tab) .
Options are shown within C 3. Note: the user
does not type the C
3
marks on the command line.An
option is givenby
an option letter precededby
a "-".These can be submitted in any order.
. Options requiring an
argument are shown as: -1
<arg> where
1
is the option letter and <arg> isTCS
COMMANDS
Option
arguments mustdirectly
follow
theoption
letter.
Any
string
of charactersfollowing
the
option letteris
assumed tobe
the required argument.
GET
currently
requires that its options befollowed
by
white space.See
details ofthe
GET
command.
SHOW allows
for
optional white spaceseparating its option letters and any option
arguments.
Options
NOT
requiring an argument maybe
catenatedinto
an option string precededby
a