Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 89b1d25

Browse files
committed
Update FAQ_DEV.
1 parent ea4f08e commit 89b1d25

File tree

1 file changed

+104
-4
lines changed

1 file changed

+104
-4
lines changed

doc/FAQ_DEV

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,26 @@
2929
13) What is CommandCounterIncrement()?
3030
14) Why don't we use threads in the backend?
3131
15) How are RPM's packaged?
32+
16) How are CVS branches handled?
3233
_________________________________________________________________
3334

3435
1) What tools are available for developers?
3536

3637
Aside from the User documentation mentioned in the regular FAQ, there
3738
are several development tools available. First, all the files in the
3839
/tools directory are designed for developers.
39-
RELEASE_CHANGES changes we have to make for each release
40-
SQL_keywords standard SQL'92 keywords
40+
RELEASE_CHANGES changes we have to make for each release
41+
SQL_keywords standard SQL'92 keywords
4142
backend description/flowchart of the backend directories
4243
ccsym find standard defines made by your compiler
4344
entab converts tabs to spaces, used by pgindent
4445
find_static finds functions that could be made static
45-
find_typedef finds a list of typedefs in the source code
46+
find_typedef finds typedefs in the source code
4647
find_badmacros finds macros that use braces incorrectly
4748
make_ctags make vi 'tags' file in each directory
4849
make_diff make *.orig and diffs of source
4950
make_etags make emacs 'etags' files
50-
make_keywords.README make comparison of our keywords and SQL'92
51+
make_keywords make comparison of our keywords and SQL'92
5152
make_mkid make mkid ID files
5253
mkldexport create AIX exports file
5354
pgindent indents C source files
@@ -530,3 +531,102 @@ stance. IMHO, of course.
530531

531532
Of course, there are many projects that DO include all the files
532533
necessary to build RPMs from their Official Tarball (TM).
534+
535+
16) How are CVS branches managed?
536+
537+
This was written by Tom Lane:
538+
If you just do basic "cvs checkout", "cvs update", "cvs commit", then
539+
you'll always be dealing with the HEAD version of the files in CVS.
540+
That's what you want for development, but if you need to patch past
541+
stable releases then you have to be able to access and update the
542+
"branch" portions of our CVS repository. We normally fork off a branch
543+
for a stable release just before starting the development cycle for the
544+
next release.
545+
546+
The first thing you have to know is the branch name for the branch you
547+
are interested in getting at. Unfortunately Marc has been less than
548+
100% consistent in naming the things. One way to check is to apply
549+
"cvs log" to any file that goes back a long time, for example HISTORY
550+
in the top directory:
551+
552+
$ cvs log HISTORY | more
553+
554+
RCS file: /home/projects/pgsql/cvsroot/pgsql/HISTORY,v
555+
Working file: HISTORY
556+
head: 1.106
557+
branch:
558+
locks: strict
559+
access list:
560+
symbolic names:
561+
REL7_1_STABLE: 1.106.0.2
562+
REL7_1_BETA: 1.79
563+
REL7_1_BETA3: 1.86
564+
REL7_1_BETA2: 1.86
565+
REL7_1: 1.102
566+
REL7_0_PATCHES: 1.70.0.2
567+
REL7_0: 1.70
568+
REL6_5_PATCHES: 1.52.0.2
569+
REL6_5: 1.52
570+
REL6_4: 1.44.0.2
571+
release-6-3: 1.33
572+
SUPPORT: 1.1.1.1
573+
PG95-DIST: 1.1.1
574+
keyword substitution: kv
575+
total revisions: 129; selected revisions: 129
576+
More---q
577+
578+
Unfortunately "cvs log" isn't all that great about distinguishing
579+
branches from tags --- it calls 'em all "symbolic names". (A "tag" just
580+
marks a specific timepoint across all files --- it's essentially a
581+
snapshot whereas a branch is a changeable fileset.) Rule of thumb is
582+
that names attached to four-number versions where the third number is
583+
zero represent branches, the others are just tags. Here we can see that
584+
the extant branches are
585+
REL7_1_STABLE
586+
REL7_0_PATCHES
587+
REL6_5_PATCHES
588+
The next commit to the head will be revision 1.107, whereas any changes
589+
committed into the REL7_1_STABLE branch will have revision numbers like
590+
1.106.2.*, corresponding to the branch number 1.106.0.2 (don't ask where
591+
the zero went...).
592+
593+
OK, so how do you do work on a branch? By far the best way is to create
594+
a separate checkout tree for the branch and do your work in that. Not
595+
only is that the easiest way to deal with CVS, but you really need to
596+
have the whole past tree available anyway to test your work. (And you
597+
*better* test your work. Never forget that dot-releases tend to go out
598+
with very little beta testing --- so whenever you commit an update to a
599+
stable branch, you'd better be doubly sure that it's correct.)
600+
601+
Normally, to checkout the head branch, you just cd to the place you
602+
want to contain the toplevel "pgsql" directory and say
603+
604+
cvs ... checkout pgsql
605+
606+
To get a past branch, you cd to whereever you want it and say
607+
608+
cvs ... checkout -r BRANCHNAME pgsql
609+
610+
For example, just a couple days ago I did
611+
612+
mkdir ~postgres/REL7_1
613+
cd ~postgres/REL7_1
614+
cvs ... checkout -r REL7_1_STABLE pgsql
615+
616+
and now I have a maintenance copy of 7.1.*.
617+
618+
When you've done a checkout in this way, the branch name is "sticky":
619+
CVS automatically knows that this directory tree is for the branch,
620+
and whenever you do "cvs update" or "cvs commit" in this tree, you'll
621+
fetch or store the latest version in the branch, not the head version.
622+
Easy as can be.
623+
624+
So, if you have a patch that needs to apply to both the head and a
625+
recent stable branch, you have to make the edits and do the commit
626+
twice, once in your development tree and once in your stable branch
627+
tree. This is kind of a pain, which is why we don't normally fork
628+
the tree right away after a major release --- we wait for a dot-release
629+
or two, so that we won't have to double-patch the first wave of fixes.
630+
631+
Also, Ian Lance Taylor points out that branches and tags can be
632+
distiguished by using "cvs status -v".

0 commit comments

Comments
 (0)