Heilan' Coo :: MacCVSClient :: User Guide | |
CVS Add and Storage Formats |
When putting a file in CVS revision control with MacCVSClient, you have the choice to use one of three different storage formats. Why do we have storage formats and why doesn't CVS on UNIX? The reason is the way resources are stored in resource forks in Mac OS files. Using the different storage formats, you can store resource forks of your Mac OS files in different ways depending on how you want to work with them. This is important for "CVS Add" and "CVS Import" commands which both add files to your repository. The moment they are added to the repository, some decision has to be made about how the files should be stored. |
Storage Formats |
In MacCVSClient, you have the choice of three storage formats:
|
Data Fork |
If you use CVS to store your software development sources or your web pages, most of your files probably are TEXT files. For these, the "data fork only" storage format is the best choice. You are also free to CVS enable keyword substitution for text files. Depending on the editors you're using, CR/LF conversion can be disabled as well. When keeping a set of web pages under CVS revision control, you might want to store your graphics like GIF or JPEG files in the CVS repository. These files and all other files that don't use the resource fork can be stored as "data fork only" as well. If redundant information (like custom icons that show the contents of a graphics file in the finder) is held in the resource fork, the "data fork only" storage format can be used as well. Keep in mind though that resources are not stored in the repository. When a "data fork only" file is updated with new data from the CVS server, it's existing resource fork is kept unchanged. This is useful for e.g. TEXT files where cursor and window positions are stored in the resources by different editors. Be sure that you disable CVS keyword sustitution and CR/LF conversion when adding a non-TEXT "data fork only" file to your CVS module. If you forget this, your binary data is quite likely to get corrupted by unwanted string replacement and/or CR/LF conversion.
|
AppleSingle |
If you have files that contain important data in both resource and data fork, you can add them to your CVS module in data and resource fork storage format. Here, in AppleSingle format, both data and resource forks plus finder information like e.g. file type and file creator are stored in the CVS repository. This format is supported by MacCVS Pro and MacCVS as well. Be sure disable CVS keyword substitution and CR/LF conversion here as well. See also the last paragraph in Data Fork Only above. |
RBL |
If you have a file that uses the resource fork only, you can store it in RBL format in CVS repositories. Files in RBL format are CVS diffable and CVS mergeable. Suppose in your Mac OS software developement project, you have e.g. PPOB or RSRC files storing the resources for your applications menus, windows, dialogs, etc. Wouldn't it be useful to have the same diff and auto merge functions for these resource files as CVS offers for source code files? This is where RBL comes in. It does that very job. When adding a file as mergeable resources in RBL storage format to your CVS module, you can even enable CVS keyword substitution. If you put any CVS keyword string like "Id", "Revision", etc. between dollar signs into a resource's name and then commit the file, you have the keyword expansion result available in the resource name. The resource data is encoded as text in a robust way. Robust here means that keyword expansion can not corrupt it. Note also that the RBL storage format does not only work for PPOB or RSRC files. Almost any resource only file should be storable in RBL, no matter what resource types are used. Three restrictions apply to the RBL format:
All three restrictions are minor issues that shouldn't really affect your choice here. In particular, I don't think the fact that RBL only supports resource forks is a real restriction. If I am wrong here, please let me know and we can discuss the issue, see what can be done and possibly extend RBL so it supports data forks as well. |
CVS Add |
When you want to add files to your module, you have to select them in your module window. The files you select to be added need to be unknown to CVS. (Otherwise they already are part of your module and obviously don't need to be added anymore.) There are some minor restrictions to the "CVS/Add" command in MacCVSClient:
None of these result in major inconveniences during the work with MacCVSClient. At times, you might just have to run several "CVS/Add" commands instead of a single one. |
![]() |
When adding files, you should use the "Automatic" setting which then uses to the Import Translators you have set in your MacCVSClient preferences. If you really feel you can't resist, you can also use the manual settings. I discourage this, though and recommend you maintain the Import Translators well and use the "Automatic" setting. Well then, if you can't go with the "Automatic" setting, the following settings are recommended in the "CVS Add" dialog:
|
CVS Import |
The "CVS/Import" command takes the Import Translators into account as well. Instead of running a "real" import, you can alternatively import new and non empty modules "by hand". |
![]() |
How does an "import by hand" work? If you haven't got any files in your project, the procedure is obvious. You simply import an empty folder. If you already have files, "import by hand" means:
The advantage of "import by hand" is, that your files' revisions all start at "1.1". If you import in the "automatic" way, you'll get "1.1.1.1" as initial revision for the imported files. Some people don't like this. I personally don't care very much, though. |
Add and Import Pre-flight |
You will have noticed that the commands "CVS/Add" and "CVS/Import" have quite a far reaching impact. They insert new files and folders into the repository. Undoing these commands is difficult. So you want to be sure to run them with the correct settings. To help you with this, neither dialog (add and import) has an "OK" button. There ara "Check" buttons instead. This is so you are forced to do a short pre-flight simulation of the CVS command before actually changing the repository contents. This shows how your files would be added/imported if you did add/import them now. After this check, the Add/Import results window will be shown displaying the storage format and keyword substitution settings of all items. After double checking the results window here, you can invoke the CVS Add or Import command from here. How do you check that files are added/imported OK? Select an item in the list and you'll be shown a short comment on the item's settings. If an item is shown in red colour in the list, that signals a problem. To find out more about the problem, select the file in question and you'll be shown the explanation. To correct the error, you would usually cancel the CVS add or import dialog and thus abort the current add or import command. Then you open the Import Translators list in the preferences to adapt them to the problem files. |
Rev. 1.14 | Copyright © 1998 Fontworks Ltd., © 2000 Jörg Bullmann |