CVS guidelines

من ويكي عربآيز
اذهب إلى: تصفح، ابحث

The following are some simple rules of thumb and guidelines regarding all CVS-related activities on Arabeyes. Please do observe them as they make everyone's life easier. Violation of the following guidelines may result in the temporary suspension of your CVS account until the issue is resolved.

New Directories

Before creating any new directory, please always consult the CVS administrator. This is particularily important to avoid redundancy and maintain an ordered organization.

This does not apply to those who are module owners. For instance, if the author of X decided to add X/yz/ to his X/ directory, it does not require any approval from the CVS administrator.

Commit Logs

It goes without saying that it is very important to enter a useful and meaningful comment on commits.

Translation (PO's)

When committing .po file(s) always make sure the comment includes the output of:

$ msgfmt --statistics file.po

This is to avoid commit logs such as "translated a little", which mean very little if anything at all.

Development Source Code

Comments on source code commits may be a little easier (as the types of changes will vary). Always make sure you keep track of the changes you make AS you make them, so you remember what they are before committing. An example of a bad log is: "I made a few fixes". What fixes? If you can't remember what you did anymore, then do a diff of the changes, go through it and note the changes you made.

Documents

Generally documentation comments are inevitably going to be vague. If the document is small, that's not a problem. If it is not, point to the location you made the changes to. For example: "Chapter 3, Section 4 - Re-wrote the second paragraph for clarity" is a good comment.

Commiting Multiple Files

When you have made changes that span across multiple files it is best to commit them in one batch, as opposed to doing so one at a time. That is for 2 main reasons:

  • Minimizes on the amount of cvs notification mail that goes out to everyone on the 'cvs' list, whenever a commit is made.
  • Most of the time the multiple files changed involve the same issue. For example, if the two files test.cc and test.h were changed, it is unnecessary to commit them individually.

There are two ways of committing multiple files.

$ cvs commit file1 file2 file3

Or you can simply let it recursively do it:

$ cvs commit

The first gives you more flexibility in what the files are exactly, whereas the latter simply commits any file that has changed in the current directory and all subdirectories.

Importing a New Project

There is a very simple rule to follow on this one. Any file that is generated by a program from another file that resides on CVS should not be put on CVS. That is unnecessary redundancy.

Compressed files (gzip/bzip2/Z/etc) should not be put on CVS in their compressed/tarred forms.

Generally the only binary type of files acceptable on CVS are graphics images and audio files. Every other file type is expected to be text.