When was cvs tag created




















Does ES6 make JavaScript frameworks obsolete? Podcast Do polyglots have an edge when it comes to mastering programming Featured on Meta. Now live: A fully responsive profile. Linked 1. Related 9. Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings. 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. It had very strict requirements for standards compliance, and frequent change requests to answer. We developed a range of potential solutions together, and the one thing all the solutions had in common was floating tags. At every release, the person in charge of the release would check out a sandbox for testing. Once it was found satisfactory, the sandbox would be tagged with the release number via cvs tag -c.

This also ensured that no one had to remember which release number was current—they could simply use the floating tag to get the most current production version of the project. 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, as this refers to the most recent revision of the trunk in the repository. 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 " Freezing a Repository " in Chapter 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.

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. Example shows a cvs status report that lists a sticky branch. Sandbox directories can also have sticky states, and a directory with a sticky state applies that state as the default to any file added to that directory. Sticky states in a directory can be seen in the Tag file in the CVS subdirectory of that directory.

Example shows a Tag file. Stickiness is created or changed using the -k , -D , or -r options to cvs checkout or cvs update. It can be removed with cvs update -A , which retrieves the current HEAD revision from the trunk of the repository, resets the state to the default for the appropriate files, and clears any directory stickiness.

To clear stickiness from a directory, you must run cvs update -A on the directory. Using cvs update -A files , where files refers to a file or files, does not clear directory stickiness or affect other files in the directory. In the introduction to this chapter, I defined a branch as a forked line of development in your project, with the line that has been forked off called the branch, and the main line the trunk.

CVS builds the branch and the trunk from the same source data, up until the point at which they diverge, which is called the base of the branch. From that point, CVS stores the changes made to the branch separately from the changes in the trunk.

Revisions on the branch are given their own revision numbers, based on the revision number of the base of the branch. You can branch a single file, any group of files, or a whole project, just as you can tag individual files or any group of them.

I usually recommend branching a project. In my experience, if you branch one file, you will eventually need to branch others in the project for the same reason.

It is much easier to keep track of a single branch over the whole project than a group of unrelated branches of individual files. In contrast, a branch creates revisions that can be edited, committed, checked out, updated, and tagged independently of the revisions on the trunk. In many ways, a branch can be treated as an independent development line of a project.

You can tag a file with any number of tags, as long as each tag name in that file is unique, including any tags on the branch. CVS relies on each tag and branch name to be unique within each file, so it considers the branch name to be a tag name when determining tag uniqueness. A branch is an ongoing line of development, and any tags on the branch are used to mark the specific revisions when significant events occur.

Though branches are created with the cvs tag command, branches and tags are different things. A branch represents multiple revisions and a tag represents a single revision. For some commands, such as cvs diff , CVS needs a branch to resolve to a single revision. In these cases, CVS resolves to the most recent revision on the branch.

Branches are often used when a public release of a project is due, to allow testers to work on the release candidate while new development goes on independently of the testing.

Branches can also keep major changes or experimental work, such as a complete rewrite of a code library, separate from the main line of development. Sometimes you realize after making changes that your work is experimental or will require a section of the project to be redesigned. Retroactive branching can be more difficult than standard branching, so try to plan branches in advance.

Figure shows how a branch is developed from a trunk. Revision 2. The branch has independent revisions from the trunk, starting with revision 2. The trunk continues with revision 2. The branch is dependent on the main trunk. However, the trunk and the branch are stored in the same file in the repository, and commands that operate on that file at the repository level can affect both trunk and branch. For example, the same tag cannot be used twice in the same file, even if one use is on the trunk and the other is on the branch.

Also, the cvs status and cvs log commands show the overall state of the file, including the trunk and the branch. Changes from the trunk can be merged onto a branch, and changes from a branch can be merged back into the main trunk.

The branch can either be abandoned or continued, depending on the purpose for the merge. Branching has many uses. In programming projects and content management, branches are often used for experimental work, candidates for product releases to the users, refactoring code or content, or bug fixes.

For configuration management, the trunk can be used for the default configuration, and branches can be the standard variants—one branch for web servers, one for mail servers, and so on. Use long branches, and occasionally nested branches, for variations on similar themes.

Make changes on the trunk and merge them to the branch if the branch needs those changes. Depending on how major the rewrite is, you can use long branches merged to the trunk, long branches merged in both directions, or short branches.

Use long branches, and merge changes to the trunk. You can convert the branch to a bugfix-management branch after release. Some development standards require that the production line of a project be kept separate from ongoing development.

Branching the project complies with all of such standards that I am aware of. You can make a branch with the -b option to the cvs tag or cvs rtag commands. This option can be combined with any of the other tag-creation options of those commands. You can use a date, existing tag, or revision number to specify the revision to be branched from. If you use cvs tag , you can also make a branch from the most recently synchronized sandbox revision.

Doing so acts like tagging from the sandbox revision, as shown earlier in this chapter, under " Tagging by Sandbox. Example demonstrates the creation of a branch from an existing tag using cvs tag.

The output from the cvs update command can be used to confirm that no files have changed. Figure shows branch creation in Cervisia. Branch creation occurs in the repository, not the sandbox. To edit the branch revisions of the files, check out a branch sandbox or use update to alter the current sandbox to the branch. It is good practice to tag the trunk just before splitting off a branch, because this makes it easier to merge the changes back later.

To be absolutely certain that the revisions tagged with the prebranch tag the tag you are basing the branch on are the revisions used as the base of the branch, use cvs rtag -r prebranch-tag -b branch-tag project to create the branch. This command uses the prebranch tag to specify the revisions the branch is created from.

Example shows how to create a prebranch tag and then the branch. Then, cvs status is run to show the tag status of one of the files. If you have not committed any of the changes, you can retroactively create a branch from the current sandbox using the following process:. Do not commit your changes until after you have made the branch. This is important, because you are using a feature of the tag command to make the branch point before the latest set of changes.

Copy the whole sandbox to a temporary directory until after the changes have been successfully committed into CVS. Use the command cvs tag -b branchname to create the branch. The tag command tags the last revisions that were committed to the repository or updated from the repository, which hopefully are the revisions before the changes you want to branch off of. The cvs tag command does not modify your sandbox. Use the command cvs update -r branchname to change your sandbox to a branch sandbox.

This command causes CVS to try to merge the branch revisions into the files currently in the sandbox, but because the sandbox files are based on the branch revisions, this merge results in unchanged files.

CVS sets sticky branch tags on the files in the sandbox, marking them as belonging to the branch. Issue cvs commit to upload your changes in the files to the repository as the next revision on the branch. This technique relies on the fact that cvs tag marks the repository at the point when the sandbox was last synchronized with the repository.

The branch is created at that time, so when you update the sandbox to your branch, CVS tries to merge the base files your sandbox was created from with the files in the sandbox, leaving your sandbox unchanged. Example shows an example of retroactive branching. If you have committed changes, you can retroactively make a branch from a date with the method shown in Example , but use the -D date command option to the cvs tag command. 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. Every time you commit a file to CVS it increments a revision number.

The first commit is 1. I don't know if it ever gets to 2. To revert to an old version of a file you can use the version number as a tag as in. To see what version number the current file is do. To see what user tags have been created do. You may also use commands that uses the revision differences -j for join and merge them into your current code.

Let us say that you have version 1. What you would need to then is to. The order of the versions are very important here. What you've asked cvs to do in the above command is to take the difference between versions 1. Because you apply to the current directory the differences between 1.

Usually, we do not use this feature in STAR so everyone works from the same code base. Besides, if too many branches are created, re-merging code may create conflict that will take time to sort see the above note on code conflict while merging. Sticky tags are used to create branches. To create a branch named BranchName , simply go into a working directory having all code that are in the repository and issue the command:. If unspecified, the whole code tree will be tagged. What this latest form will do is create a normal tag Revisionname first, then attach the branch named BranchName to that tag.

This method may later facilitate merging or seeing differences made since a tagged version otherwise, you may have a hard time to figure out the changes you made since you created the branch. To work with branches, it is simple From this point on, you have nothing else to do. Just modify your code and cvs commit as usual. By default, the checkout command with a branch specification will create a "sticky tag" in your working directory, that is, cvs will persistently remember that you will be working from that branch.

You may alos use " cvs update -r BranchName Dir " for similar effects you would essentially update your working directory Dir and make it move to the branch BranchName.



0コメント

  • 1000 / 1000