Let us say you are pulling up the changes between foo.c
1.19 and 1.21.
(Nota bene: the idea of "pulling up to 1.21" is meaningless -- you are always applying diffs between two versions. One of them might be the base tag, but in any case, since you are pulling up diffs, you always need to know the two versions between which the changes occurred.)
First, and foremost, make sure you are starting with a clean
foo.c
cvs update -rnetbsd-1-4 foo.c(See note at the end about the effect of this command.)
Then, you need to patch up foo.c to add the changes you want to pull
up. There are two ways of doing this. You can create a patch file and
apply it, or you can use cvs update's -j
flag to avoid
needing that.
The incantation:
cvs diff -kk -c -r1.19 -r1.21 foo.c >/tmp/patchwill produce a patch file which you can then apply by doing
patch </tmp/patchor by feeding it directly to patch via a pipe. The command
cvs update -kk -j1.19 -j1.21 foo.cis essentially equivalent to the two steps listed above, and will similarly patch your file.
Now manually examine the file to make sure What You Wanted Done Is
Done. If you are trying to make foo.c
identical to the
head (presumably 1.21 is the head and 1.19 was the branch point or
some such), you can do a
cvs diff -kk -r1.21 foo.cand this should produce no diff (-kk prevents the expansion of RCS IDs). If
foo.c
isn't supposed to be identical to the
head, you are going to have to make sure things are okay manually or
use creative sets of cvs diffs to assure that what you wanted done was
done.In any case, once done, do a:
cvs commit foo.cThe format of the commit message on a release branch has over time been formalized to ease tracking and maintenance. The format of the first line of the commit message should be one of the following:
If the pull-up fixes a formally reported problem, this should be noted as Fixes PR#nnnn at the end of the commit message text.
The fact that we want exact revision numbers recorded in the commit message means, BTW, that you must not do a bunch of pull-ups in the same directory and then commit them with a message like "sync with trunk," because that won't say what versions you pulled up.
Note that the command
cvs update -rnetbsd-1-4 foo.cwill glue
foo.c
to "netbsd-1-4" (see what happens to
CVS/Entries
), and subsequent CVS commands will thus apply
to this release until you unstick this "glue" with
cvs update -A foo.c
|
|