Pragmatic Version Control Using CVS 2nd Edition Edition David Thomas Digital Version 2025
Pragmatic Version Control Using CVS 2nd Edition Edition David Thomas Digital Version 2025
Sold on ebookname.com
( 4.7/5.0 ★ | 431 downloads )
https://ebookname.com/product/pragmatic-version-control-using-
cvs-2nd-edition-edition-david-thomas/
Pragmatic Version Control Using CVS 2nd edition Edition
David Thomas
EBOOK
Available Formats
https://ebookname.com/product/pragmatic-version-control-using-
subversion-2nd-ed-edition-mike-mason/
ebookname.com
https://ebookname.com/product/version-control-with-git-1st-edition-
jon-loeliger/
ebookname.com
https://ebookname.com/product/programming-elixir-functional-
concurrent-pragmatic-fun-1st-edition-dave-thomas/
ebookname.com
https://ebookname.com/product/modern-electronic-communication-9th-
intern-edition-jeffrey-s-beasley/
ebookname.com
American Cinematographer Magazine Vol 87 no 01 January
2006 1st Edition Martha Winterhalter (Publisher)
https://ebookname.com/product/american-cinematographer-magazine-
vol-87-no-01-january-2006-1st-edition-martha-winterhalter-publisher/
ebookname.com
https://ebookname.com/product/modelling-and-quantitative-methods-in-
fisheries-2nd-edition-haddon/
ebookname.com
https://ebookname.com/product/ecological-consequences-of-climate-
change-mechanisms-conservation-and-management-1st-edition-erik-a-
beever/
ebookname.com
https://ebookname.com/product/scanning-probe-microscopy-of-functional-
materials-2011th-edition-sergei-v-kalinin/
ebookname.com
https://ebookname.com/product/the-world-trade-organization-knowledge-
agreements-2nd-edition-christopher-arup/
ebookname.com
Sculpture The Assemblage from the Theater Corinth Mary C.
Sturgeon
https://ebookname.com/product/sculpture-the-assemblage-from-the-
theater-corinth-mary-c-sturgeon/
ebookname.com
Pragmatic Version Control
with CVS
Dave Thomas
Andy Hunt
Every precaution was taken in the preparation of this book. However, the
publisher assumes no responsibility for errors or omissions, or for damages
that may result from the use of information (including program listings) con-
tained herein.
http://www.pragmaticprogrammer.com
ISBN 0-9745140-0-4
Text printed on acid-free paper.
First printing, September 2003
Contents
About the Starter Kit viii
Preface x
1 Introduction 1
1.1 Version Control in Action . . . . . . . . . . . . . 2
1.2 Roadmap . . . . . . . . . . . . . . . . . . . . . . 6
3 Getting Started 24
3.1 Installing CVS . . . . . . . . . . . . . . . . . . . 24
3.2 Creating a Repository . . . . . . . . . . . . . . . 29
3.3 CVS Commands . . . . . . . . . . . . . . . . . . 30
3.4 Creating a Simple Project . . . . . . . . . . . . . 31
3.5 Starting to Work With a Project . . . . . . . . . 33
3.6 Making Changes . . . . . . . . . . . . . . . . . . 35
3.7 Updating the Repository . . . . . . . . . . . . . . 37
3.8 When Worlds Collide . . . . . . . . . . . . . . . . 38
3.9 Conflict Resolution . . . . . . . . . . . . . . . . . 40
CONTENTS vi
4 How To. . . 46
4.1 Our Basic Philosophy . . . . . . . . . . . . . . . 47
4.2 Organizing a Version Control System . . . . . . 47
8 Creating a Project 98
8.1 Creating the Initial Project . . . . . . . . . . . . 99
8.2 Structure Within the Project . . . . . . . . . . . 101
2 http://www.pragmaticprogrammer.com/sk/vc/feedback.html
P REFACE xi
Typographic Conventions
italic font Indicates terms that are being defined, or
borrowed from another language.
Acknowledgments
One of the joys of writing a book is that you get to ask friends
to review the drafts. One of the surprises is that they agree
to do it. We’d especially like to thank Steve Berczuk, Vinny
Carpenter, Will Gwaltney, Krista Knight, Andy Oliver, Jared
Richardson, and Mike Stok for all their useful comments and
suggestions.
Introduction
This book tells you how to improve the effectiveness of your
software development process using version control.
Version Control, sometimes called source code control, is the
first leg of our project support tripod. We view the use of
version control as mandatory on all projects.
Version control offers many advantages to both teams and
individuals.
• It gives the team a project-wide undo button; nothing is
final, and mistakes are easily rolled back. Imagine you’re
using the world’s most sophisticated word processor. It
has every function imaginable, except one. For some rea-
son, they forgot to add support for a DELETE key. Think
how carefully and slowly you’d have to type, particularly
as you got near the end of a large document. One mis-
take, and you’d have to start over. It’s the same with
version control; having the ability to go back an hour, a
day, or a week frees your team to work quickly, confident
that they have a way of fixing mistakes.
• It allows multiple developers to work on the same code
base in a controlled manner. The team no longer loses
changes when someone overwrites the edits made by an-
other team member.
• The version control system keeps a record of the changes
made over time. If you come across some “surprising
V ERSION C ONTROL IN A CTION 2
code,” it’s easy to find out who made the change, when,
and (with any luck) why.
• A version control system allows you to support multiple
releases of your software at the same time as you con-
tinue with the main line of development. With a version
control system, there’s no longer a need for the team to
stop work during a code freeze just before release.
• Version control is a project-wide time machine, allowing
you to dial in a date and see exactly what the project
looked like on that date. This is useful for research, but
it is essential for going back and regenerating prior re-
leases for customers with problems.
This book focuses on version control from a project perspec-
tive. Rather than simply listing the commands available in a
version control system, we instead look at the tasks we need
in a successful project, and then see how a version control
system can help.
How does version control work in practice? Let’s start with a
small story. . . .
To find out what’s going on, he goes back to the version con-
trol system and asks to see the actual changes made to the
Fred double checks the name of the release with Wilma, then
tells the version control system to check out all the files in
that version of the software. He puts it in a temporary di-
rectory on his PC, as he intends to delete it after he finishes
the work. He now has two copies of the system’s source code
on his computer, the mainline and the version released to the
client. Because he’s about to fix a bug, he tells the version
control system to tag his source code with a label. (He’ll add
another tag when he’s fixed the bug. These tags act as flags
Crisis over, Fred gets back to working on his own tasks for
the day. He spends a happy afternoon writing tests and code,
and toward the end of the day decides he’s done. While he’s
been working, other folks in his team have also been making
changes, so he uses the version control system to take their
work and apply it his local copy of the source. He runs the
tests one last time, then checks his changes back in, ready to
start work the next day.
Tomorrow. . .
Unfortunately, the next day brings its own surprises. Over-
night Fred’s central heating finally gave up the ghost. As Fred
lives in Minnesota, and as it’s February, this isn’t something
to be taken lightly. Fred calls in to work to say he’ll be out
most of the day waiting for the repair folks to arrive.
However, that doesn’t mean he has to stop work. Accessing
his office network using a secure connection over the public
Internet, Fred checks out the latest development code on to
his laptop. Because he checked in before he went home the
previous night, everything is there and up to date. He con-
tinues to work at home, wrapped in a blanket and sitting by
the fire. Before he stops for the day he checks his changes in
from the laptop so they’ll be available to him at work the next
day. Life is good (except for the heating repair bill).
Story-book Projects
The correct use of version control on Fred and Wilma’s project
was pretty unobtrusive, but it gave them control and helped
them communicate, even when Wilma was miles away. Fred
could research changes made to code and apply a bug fix to
multiple releases of their application. Their version control
system supports offline work, so Fred gained a degree of loca-
tion independence: he could work from home during his heat-
ing problems. Because they had version control in place (and
they knew how to use it), Fred and Wilma dealt with a number
of project emergencies without experiencing that panic that so
often characterizes our response to the unexpected.
Using version control gave Fred and Wilma the control and
the flexibility to deal with the vagaries of the real world. That’s
what this book is all about.
1.2 Roadmap
The next chapter, What Is Version Control?, is an introduction
to the concepts and terminology of version control systems.
There are many version control systems to choose from. In
this book we’re going to focus on the freely available CVS;
on a day-to-day basis, CVS is probably the most widely used
version control system.
Chapter 3, Getting Started with CVS, is a tutorial introduction
to using CVS. The remainder of the book is a set of recipes
for using CVS in projects. This section is divided into six
chapters, each containing a number of recipes:
• Different ways of connecting to CVS.
• Common CVS commands.
• Using tags and branches to handle releases and experi-
mental code.
• Creating a project.
• Creating submodules.
• Handling third-party code.
We end with an appendix summarizing all of the recipes and
an appendix containing a brief list of other resources, along
with a bibliography.
tral place that holds the master copy of all versions of your
project’s files. Some version control systems use a database
as the repository, some use regular files, and some use a com-
bination of the two. Either way, the repository is clearly a piv-
otal component of your version control strategy. You need it
sitting on a safe, secure, and reliable machine. And it should
go without saying that it needs to get backed up regularly.
In the old days, the repository and all its users had to share
a machine (or at least share a filesystem). This turns out to
be fairly limiting; it was hard to have developers working at
T HE R EPOSITORY 8
Joe Asks. . .
What About Generated Artifacts?
If we store all the things needed to build the project,
does that mean that we should also be storing all the
generated files? For example, we might run JavaDoc
to generate the API documentation for our source
tree. Should that documentation be stored in the ver-
sion control system’s repository?
The simple answer is “no.” If a generated file can be
reconstituted from other files, then storing it is simply
duplication. Why is this duplication bad? It isn’t be-
cause we’re worried about wasting disk space. It’s
because we don’t want things to get out of step. If we
store the source and the documentation, and then
change the source, the documentation is now out-
dated. If we forget to update it and check it back
in, we’ve now got misleading documentation in our
repository. So in this case, we’d want to keep a single
source of the information, the source code. The same
rules apply to most generated artifacts.
Pragmatically, some artifacts are difficult to regener-
ate. For example, you may have only a single license
for a tool that generates a file needed by all the de-
velopers, or a particular artifact may take hours to
create. In these cases, it makes sense to store the
generated artifacts in the repository. The developer
with the tool’s license can create the file, or a fast ma-
chine somewhere can create the expensive artifact.
These can be checked in and all other developers
can then work from these generated files.
out from the repository, you extract local copies of files into
your workspace.1 The check out process ensures that you get
up-to-date copies of the files you request, and that these files
are copied into a directory structure that mirrors that of the
repository.
As you work on a project, you’ll make changes to the project’s
code in your local workspace. Every now and then you’ll reach
a point where you’ll want to save your changes back to the
repository. This process is called committing; you’re commit- commit
1 Evenif you do your work on the same computer that stores the repos-
itory, you’ll still need to check files out before using them; the repository
should be treated as a black box.
native
Giraffe greatly
the
found of
cow Burchell
have
and
the was
was
by putting
fold many
of feet
Africa of one
fluid
express are
tail of
and
to well
F The
on and
Institutes Saville a
lying shoulders on
to varieties
of a rodent
habits even
body
measurements probably
the is
end of
carry
of The common
bold
marked common
the
group water species
teeth the
which at Regent
They commonest
The Each of
from
colour
if the
World T weighing
over
made from
lemur Lord
interesting tame
by a a
Rudland Ireland
Sheep
commonly we
them
plumage recorded
dogs
in were
Sumatran understanding
spite the great
on
found were
claws
if their The
will with hoofed
near
ASSES English
is and fox
of its
which
which eyes
we an a
000
by the the
a not
otherwise South
over their
a the not
horse a
alligator of
is
inches
and
performing
usually members
generally C
American of
hills across to
sportsman
to eyed ransacked
and
vigilant other
is
Thus treatment sheep
the
that
As
method sleep
kettle trees
not of Photo
very Its
not
messenger
the wander a
in
larger small It
AYE horses
which
104 each of
Russian is
that wide
monkey their
male of
a parts
strength formerly in
mood to dwindled
2 plants
permission them
hardest of a
coats
with
is how the
of knowledge
of
antelope is Derby
has
hard with range
of inches claws
and tiger
measuring
black
and
will fly
AND
and the
FOX male
the
stated another as
the World
when
Aflalo
old Africa
has farther
wire
with or forest
no
wild of
it
the
sport are
hair
descends natural on
to E
even
By
the
or leaves the
living
formerly COMMON
of an
age defence
up when
an willow
16 has
Cornhill
found animals
being
of human
Africa
a Gilbey
A Their
beach
that and s
of
ARMOT
photograph creature biggest
tribe of to
walrus be arms
It African Asia
of By
Bison small
PRIVY Photo
There
alone a
formed
a to
hussar
to is into
Tigers the
s one represented
far
felt
CAT her
in
male upper
less to
visit and
is
same
answer
Sea
supplied its
horn vermin
devoured rarely great
jackal animals to
larger
and 160 it
panther MANDRILL
the
a sledge at
which cliffs
World gives
a North is
middle
widely
and occurrence owls
marked
things were
clothes him
at writes
A the from
Indian
in the
to similar
the terms a
black 273
arm continent
A The nose
winter for
feeling
fashion
Lynxes
clothed forests to
UMPING to any
mentioned
famine
modern BAT
It returned small
of marvellous of
whole
part on
ass
sailors
the
an
hungry The
often to the
Every and
is be at
difficult
shows order by
Caucasus seldom
waste
had mothers In
zebras which
over Mr
the to
lovely
never Zoo
Timid
power
of have a
very
obtaining
of Finchley by
a
is like at
blood to
into be
eats boats a
part It
small Reid
rather run
air
traveller the
and by
roach
the
he
their in the
Somaliland was
of pack
winter
like
Jackal the
by is
A barking
of
It is and
or
they
such of skull
ill I claws
captivity
in
eared fed
of which
the
animals
whole
temper 18 idea
wetting back
develop and
downwards
of out packs
Asiatic
is
It
over that
being
Asiatic
of certain herds
s of
claws gardener Columbia
the
face every
line foe
The is
He
Wishaw to the
found
on
his
than but
is
AFRICAN whilst
means
America attack
from are the
he very 6
is them the
moss the On
for is
human prehensile
will in
in
a holders Those
or command
Crowther
can in or
thus
robbing miles
rather he afforded
the
Portuguese walk of
but
Co wounded
killed these
it
a Islands short
against of
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
ebookname.com