Stickiness
Stickiness is an important concept in CVS, especially when talking about tagging and branching. Stickiness is primarily internal to CVS, but it affects what can be done in a sandbox.
When a file in a sandbox has a persistent state that is not the
default state in the repository, the persistent state is said to be
sticky. A sandbox copy of a file can be set to a
specific revision, belong to a branch, or have specific keyword
options. Any of these things can cause a file to be sticky.
A file can be set to a specific revision by being retrieved from the
repository with a tag, revision number, or date. If the file is
retrieved with a date, it is said to have a sticky
date. If it is retrieved with a tag, it is said to have a
sticky tag
, and if it is retrieved with a revision
number, it is said to have a sticky revision.
Along the same lines, a sandbox file that belongs to a branch is said
to have a sticky
branch
, and a sandbox file with
sandbox-specific keywords has sticky
keywords
.
A sticky state applies to all commands run on the file. A file with a sticky date, revision, or nonbranch tag will not be updated to a more recent copy; nor can such files be committed. A file with a sticky branch is always committed to or updated from the branch in question.
Sticky states on a file can be viewed with cvs
status. For example, use the command cvs status
index.htm to see the status for the
index.htm file. Example 4-8
shows a cvs status report that lists a sticky
branch.
Example 4-8. Viewing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access