The cvs admin -kb command sets the default keyword substitution method for this file, but it does not alter the working copy of the file that you have. If you need to cope with line endings that is, you are using CVS on a non-unix system , then you need to check in a new copy of the file, as shown by the cvs commit command above. On unix, the cvs update -A command suffices. Note that you can use cvs log to determine the default keyword substitution method for a file and cvs status to determine the keyword substitution method for a working copy.
However, in using cvs admin -k to change the keyword expansion, be aware that the keyword expansion mode is not version controlled. New files are added, and old files disappear. Still, you want to be able to retrieve an exact copy of old releases.
When you commit the removal of the file, CVS records the fact that the file no longer exists. It is possible for a file to exist on only some branches and not on others, or to re-add another file with the same name later. Command: cvs remove [options] files Schedule file s to be removed from the repository files which have not already been removed from the working directory are not processed.
This command does not actually remove the file from the repository until you commit the removal. For a full list of options, see section Quick reference to CVS commands. For example, the above example could also be done like this:.
If you execute remove for a file, and then change your mind before you commit, you can undo the remove with an add command.
If you realize your mistake before you run the remove command you can use update to resurrect the file:. When you remove a file it is removed only on the branch which you are working on see section Branching and merging. You can later merge the removals to another branch if you want see section Merging can add or remove files.
In concept removing directories is somewhat similar to removing files--you want the directory to not exist in your current working directories, but you also want to be able to retrieve old releases in which the directory existed. The way that you remove a directory is to remove all the files in it. You don't remove the directory itself; there is no way to do that. This way CVS will be able to correctly create the directory or not depending on whether the particular version you are checking out contains any files in that directory.
Moving files to a different directory or renaming them is not difficult, but some of the ways in which this works may be non-obvious. Moving or renaming a directory is even harder.
While the need to manage binary files may seem obvious if the files that you customarily work with are binary, putting them into version control does present some additional issues.
One basic function of version control is to show the differences between two revisions. For example, if someone else checked in a new version of a file, you may wish to look at what they changed and determine whether their changes are good.
For text files, CVS provides this functionality via the cvs diff command. For binary files, it may be possible to extract the two revisions and then compare them with a tool external to CVS for example, word processing software often has such a feature. If there is no such tool, one must track changes via other mechanisms, such as urging people to write good log messages, and hoping that the changes they actually made were the changes that they intended to make.
Another ability of a version control system is the ability to merge two revisions. For CVS this happens in two contexts. The first is when users make changes in separate working directories see section Multiple developers. In the case of text files, CVS can merge changes made independently, and signal a conflict if the changes conflict. With binary files, the best that CVS can do is present the two different copies of the file, and leave it to the user to resolve the conflict.
0コメント