Re cvs how to commit a binary file
If you do not first add the file, CVS does not recognize it. You can then move existing files into new subdirectories with the " cvs move " command. More about committing changes More about adding files and directories Importing existing code? If you have existing files to add to the project, you can import these into CVS using the following command: If you want to preserve these files and directories in their original state, you may want to tag or archive this set of original files before you or any other developers begin checking out working copies of project files.
If your existing files are already under versioning control -- either in another CVS repository or in a versioning different system such as RCS -- there is no automated method for importing existing files that retains file histories. Using the cvs import command, copying files over, or creating them as new files does not retain these histories. Neither cvs import nor cvs copy preserves the RCS revision histories of existing files brought in to CVS, but there is a way to do this by using: But you should be aware of at least two critical differences in adapting CVS: One of the central principals in RCS is file locking, which prevents other developers from checking out or modifying a file when you have checked it out.
The benefit to file locking is that developers never have to deal with conflicting modifications within files. RCS protects files by only allowing them to be modified by one person at a time. Therefore, the drawback to RCS is: The central tenant of CVS is to allow developers to check out, modify, and commit files concurrently, truly a benefit to projects with remote, geographically dispersed developers. The tradeoff is that on a CVS version controlled project, you can count on dealing with merge conflicts in files.
The only method for resolving such conflicts is by hand-editing the file. Thus, project workflow with CVS ends up being a little different. Keywords essentially let you embed version information permanently in source files. A string containing the full version information associated with a particular keyword is substituted whenever the file is subsequently revised. As an example, including: Keyword substitution is a method for tracking file versions once the files are no longer part of a CVS repository.
Keyword substitution can also be configured and suppressed. More about keywords including a list of common keywords Keeping your working files up to date with the repository If you want to look before you leap, you can get a list of all files in your local directory not up to date with the project repository by using the following command: This means that you need to update.
To go ahead and actually perform an update to make your working directory up to sync with the repository, the command is: Or, to include any new directories when updating, do: Locally modified Your version has not yet been committed. Needs patch Your version needs to be updated because someone else has made changes. File had conflicts on merge CVS could not resolve changes made to this file and committed. For example, when it's working between a Unix repository and a Windows or Macintosh working copy, it converts file line endings appropriately for each platform.
Thus, the files in a working copy on a Windows machine will have CRLF endings, but a working copy of the same project on a Unix machine will have LF endings the repository itself is always stored in LF format. Another trick is that CVS detects special strings, known as RCS keyword strings, in text files and replaces them with revision information and other useful things. This string expansion is a very useful feature in text files, as it allows you to see the revision number or other information about a file while you're editing it.
But what if the file is a JPG image? Or a compiled executable program? In those kinds of files, CVS could do some serious damage if it blundered around expanding any keyword string that it encountered.
In a binary, such strings may even appear by coincidence. Therefore, when you add a binary file, you have to tell CVS to turn off both keyword expansion and line-ending conversion.
To do so, use -kb: