The Open Design Foundation

CVS Howto: Adding a file (file types)

Before we add a new file to the CVS repository it is important to understand the difference between ASC and binary files. Since CVS finds its roots in software development it is a very orient towards program code. Basically any pure text file is an ASC. This is not the same as a say a Microsoft Word file, which would be binary. There are some big advantages to using text files with CVS when it comes to comparing differences between file versions (hence the title: Concurrent Versioning System). The other thing that CVS does with ASC files is that converts the format to the type of system you are checking out to, which is different depending on your platform.

In general if you are writing software code or html type docuements you are dealing with ASC files. In most other cases, e.g. CAD files, images, spreadsheets, etc. you are dealing with binary files. There are two ways CVS knows how to treat the files that are submitted. First is with an explicit declaration, which is the safest. The second is with what are called the cvswrappers settings that are in the CVSROOT module of every repository. If you go to CVS Web you can browse these files. Basically the CVS administrator declares what file types are binary.

Because this is not flawless I recommend that you always explicitly declare your file type.; If you don't and it's not in the wrappers file they will default to ASC II, which will corrupt binary files! The process for added each type of file is essentually the same, but they are illustrated separately for clarity. Before you go forward you need to have write promission to the portion of repository that you are working on.

Adding binary files Adding Binary

Adding ASC files Adding ASC

Comments on these web pages to
Copyright (C) 2000.
Updated: April 19, 2000