Most of the options to cvs tag can be used the same way with cvs rtag. The -l and -R options control recursion, and the -r , -D, and -f options specify revisions as they do with cvs tag. The -c option to cvs tag is not used with cvs rtag. To list the tags on a file, use cvs status -v in a sandbox that includes the file. This command also provides information, such as the current sandbox or working revision, the current repository revision, and any sticky information in the current sandbox.
The tags are listed at the bottom of the report. Example shows the use of cvs status to show tags for main. To retrieve a tagged file or set of files, use the -r tagname option to cvs checkout or cvs update. Use checkout to create a new sandbox, and use update to modify an existing sandbox. If you retrieve a set of tagged files into an existing sandbox, any existing files will be overwritten with the tagged revisions, but changes you have made since the files were last synchronized with the sandbox will be merged forward into the new revisions.
Example shows a checkout of a tagged sandbox. When you check out or update a sandbox using a nonbranch tag or a date branches are explained later in this chapter , the tag or date is sticky on the files in that sandbox. A sandbox checked out with a date or a nonbranch tag is a static representation of the project at that point.
You cannot commit changes to a file checked out as static. Stickiness applies only to the sandbox copy of a file and does not affect the repository. See Section 4. Normally, tags are intended to remain fixed, to mark a specific moment in time. Sometimes, you do need to remove, rename, or move a tag.
Do this with caution, as these actions may discard historical information and may be impossible to undo. There are special tags called branch tags , explained in Section 4. If you try to remove or move a branch tag, CVS returns an error message and will not delete or move the tag, though you can force CVS to remove or move the branch tag with the -B option.
Do not delete, move, or rename a branch tag without an extremely good reason and a very recent backup of the repository, as doing so can cause data loss. There usually is no need to remove a correctly placed tag from a file. However, if you make an error when tagging, you may want to remove the tag and try again. To remove a tag, use the -d option:. If you use the rtag command outside a sandbox, you need to specify the repository path. The tag command must be used within a sandbox, and by default acts on the files in the current sandbox directory and its subdirectories.
Example shows the use of cvs tag to remove a tag. The most common reason to move a tag is to correct a tagging mistake. Some project teams also like to have a mobile tag that marks the most recent version that is ready for release or the current bugfix version of the project, and they move that tag when they finish a new version.
To move a tag from one revision to another revision in the same file or set of files, use the -F option to cvs tag and cvs rtag. Use -r to designate the revision to move the tag to and -F to designate the tag to move. Example shows the use of cvs rtag to move a tag, from within a sandbox. The status report for the file is shown before and after the move.
Because I am using rtag rather than tag , I need to specify the full path from the repository root directory to main. Files that have been removed from the main trunk using cvs remove , or that were never on the trunk, are stored in an Attic subdirectory in the repository.
These files may be associated with old tags that should be removed, moved, or renamed. There is no easy way to perform these tasks for files in the Attic directory using cvs tag , but cvs rtag provides the -a option, which applies -d and -F to tags in removed files i.
If you are using the -r revision option with tag or rtag , CVS searches Attic files to determine whether the revision existed in those files. The -a option is unnecessary if -r is specified. If you or one of your development team has added a tag that does not conform to your tag-name standards, or that is inaccurately named, you can rename it.
CVS does not include a command to rename a tag, but the -r option to tag and rtag makes it easy to add a new tag to the revisions that were tagged with an existing tag. Then you can remove the old tag. Do not try to use this approach with branches. Example shows how to rename a tag. You can use dates to determine which is the case, or you can issue the command cvs rdiff -s -r tagname project. The -s option to rdiff provides a summary report that lists files that have been changed, added, or removed.
To tag a removed file as well as existing files, use the -r option to cvs tag and cvs rtag. Using -r HEAD is typical. If you are tagging against the HEAD , you may want to find a way to prevent others from changing the repository between the time you decide the files are ready to be tagged and the time you actually tag them. Some suggestions for doing this are included in Section 6.
Tagging makes it easier to retrieve snapshots of a project. The basic rule is to tag every time you reach a significant stage of a project. At an absolute minimum, tag every time you branch and tag on completion of each release of a project. Devise your own in-house tagging strategy. The following list of times to consider tagging is heavily biased toward programmers:. Use meaningful tag names in a fixed format, including all the essential information in the tag name.
This is one possible, but very detailed, format for tag names:. Remember, this format is just an example. Most project teams prefer a shorter format than the one shown here. Skip to main content. Essential CVS by. Start your free trial. Chapter 4.
Tagging and Branching. Tip Section 7. Tagging by Sandbox. Example Using cvs tag bash Collectives on Stack Overflow. Learn more. Asked 13 years, 3 months ago.
Active 7 years, 11 months ago. Viewed 83k times. Is there any way to list all the files that have changed between two tags in CVS? It would also work if I could find all files that had changed between two dates. Improve this question. Add a comment. Active Oldest Votes. You can find a little more information on cvs diff command here plus it should be fairly simple to create a script to make report more suitbable for your needs, ex: number of files changed, created deleted etc.
Hope it helps ;. Improve this answer. Kevin Panko 8, 19 19 gold badges 48 48 silver badges 60 60 bronze badges. Decio Lira Decio Lira 1, 1 1 gold badge 17 17 silver badges 24 24 bronze badges. There's a perl script called cvs2cl which can produce nice formatted versions of logs, either as the finished report or as text or XML to post-process: red-bean. Just found this via Google and it saved me a load of work, thanks a lot! I was trying to find out via the 'history' command, forgot about diff.
Sally Sally 4 4 silver badges 13 13 bronze badges. I tried most other options here, and with the others I couldn't catch all the changes. This one is good. Michael Michael 7 7 silver badges 18 18 bronze badges. Taufiq Taufiq 1 1 gold badge 4 4 silver badges 11 11 bronze badges.
This is good for file changes. Same flags work with cvs rlog. You can use 'cvs -q log -NS -rvxxxx::' to show changes since last tag which is handy.
For files added after tag you get a "warning: no revision " and you do not get shown the cvs add or commit comments.
New Alexandria 6, 4 4 gold badges 51 51 silver badges 72 72 bronze badges.
0コメント