|
CVS Commands |
|
|
|
Most CVS commands are executed in a similar and straightforward way. You select the files
or folders the command is supposed to work with in the module window. Then
you simply choose the proper menu item in the "CVS" menu.
In some cases a dialog box will show up and you'll be able to enter options
or additional parameters for the issued command. For some CVS commands, these
dialogs are optional. To get the optional dialog boxes, hold down the OPTION key
while selecting the CVS command from the "CVS" menu.
This document is no complete list of all CVS commands. Instead, it describes
special MacCVSClient features of some CVS commands.
|
|
|
|
|
If you commit source files, you probably want to enter proper comments
stating what you changed for what reason. Use the "Comment" window
to type in all your comments. Then select the files you want to commit
and chose menu item "CVS/Commit".
When the "CVS/Commit" menu entry is selected all or parts of the
comments currently in the "Comment" window
can be automatically copied to the "Commit" dialog. Here you
can apply last changes to them before really committing. Note that all
the comments in the "Commit" dialog will apply to all files (or folders)
currently selected. So, be
sure to have selected only those files (or folders) that you want to commit with
the current comments.
In the Preferences dialog you can select
your favourite auto-comment-copy behaviour.
- Copy the entire contents of the "Comment" window to the "Commit" dialog.
In this mode all changes made to the comment in the "Commit" Dialog will be copied
back to the "Comment" window, if the dialog is OKed.
- Copy the "Comment" window's selection only.
- Don't copy anything automatically.
|
|
|
|
|
To be able to write proper comments for the commit, it's very useful
to check the difference between the last committed version of your sources
and the current version. To do that, you use the CVS diff command. Select all
files that you are interested in (or simply select the module folder's entry;
this is the topmost line in the module window's file/folder list) in the
module window and chose menu item "CVS/Diff". You'll then see
the "CVS Diff" dialog.
|

Make sure the check box "Full Context" is marked and press
OK. Now a CVS diff command is run and the diff output is parsed by MacCVSClient.
Every file that has a difference will be marked with the letter delta left to
its version number. You can check the diff output in two different ways.
The first would be to look at the "Console window". That's the
hard way. Here you see the diff output but often you cannot really determine
the context of all diff pieces. To find that, you would have to refer to
the source file to find the correct line numbers and so on...
The second way to check the diff is by double clicking the file in question
in the module window. Alternatively, you can select the file and press the RETURN key.
Remember that a files' diff information is only available
if the file is marked by the letter delta. So double clicking only works for those
entries in the module window's file list. Alternatively, you can select
the file in question and chose menu item "Special/View/Diff".
Again, this only works for files that are marked with delta. Either way
you will get a diff window like this. [I got this diff window by double
clicking line "CConflictBozo.h" in the example module window in section The Module Window.]
|

Here you see exactly where your changes have been made. E.g. you can
easily find out which functions or methods your changes have been done in.
Use the menu items
"Special/Previous Diff" and "Special/Next Diff"
to jump from diff line to diff line. Shortcut keys for this are COMMAND-[
and COMMAND-].
There are two more search functions: "Special/Previous Full Line" and
"Special/Next Full Line". With these (or their shortcuts SHIFT-COMMAND-[
and SHIFT-COMMAND-]) you can scroll up/down to the next text line that starts
in the first text column. In a C source file this might be the head of a
C function. If you work with indented paragraphs in HTML source, these functions
get you to the beginning/end of the current paragraph.
The diff window's contents is marked by colour and a prefix to make the
differences easily recognizable.
- Removed Lines
- Drawn red, prefixed by "<".
- Added Lines
- Drawn black, prefixed by ">".
- Unchanged Lines
- Drawn light grey, unprefixed.
The text in the diff window is selectable. So, cut and paste between
the diff window and the comment window (or any other text window) works.
That's how the comment window is supposed to be worked with. Open the appropriate
diff window, compose the commit comments, then select "CVS/Commit"
and commit your commented changes.
See also: More Details: Info Windows.
|
|
|
|
|
If CVS detects conflicts during a CVS update operation, MacCVSClient
marks the affected files for you. These marks then will be stored in MacCVSClient's
"CVS" files, so that even after a restart confilct ridden files
will still be known "dirty" to MacCVSClient.
Suppose you just ran CVS update and got a conflict like the one in the
line "CConflictBozo.cp" of the example module window in section The
Module Window. You select that entry and chose menu item "Special/Check
Conflict". CONTROL-click on the file or CONTROL-RETURN do the same job.
Now a conflict window opens. Have a look at this example.
|

Like in the diff window, you can jump from conflict to conflict using
the "Special/Previous Conflict" and "Special/Next Conflict"
menu entries (shortcuts: COMMAND-[ and COMMAND-]). The commands
"Special/Previous Full Line" and "Special/Next Full Line"
are available here as well. For an explanation, see
Collecting Comments and CVS Diff above.
The conflict window is READ ONLY, like the diff window. You cannot resolve
the conflicts here.
Supposedly, you'll be going to resolve any conflict you find in your
files as soon as possible. You'll use your compiler's IDE or whatever editor
to get things clean. Afterwards, you start MacCVSClient again (or switch back
to it in the multifinder) and want to commit your clean sources now.
To reset the conflict marks, MacCVSClient has set, you select the (previously)
conflict ridden file and then simply chose menu entry "Special/Check
Conflict" again. The check conflict function actually does several
things:
- It scans the file for tokens "<<<<<<<",
"=======", and ">>>>>>>". If at
least one of those is found, the file is recognized to have a conflict.
Otherwise the file is considered clean.
- In case of a detected conflict, the file is opened and displayed in
a conflict window.
- In case no conflict has been detected, the conflict flag in MacCVSClient's
corresponding "CVS" file is reset. Then the file can be committed again.
So if you have resolved all conflicts properly, MacCVSClient won't complain
and re-enable the "commit" command for the file in question. If you missed some
conflicts, you are reminded of that and can go on editing the file.
Now suppose, you have got a file that contains one of those three tokens
above that MacCVSClient interprets as conflict signs. But in your case they
might not be conflict signs at all. They might be perfectly OK in your file.
Only MacCVSClient complains and deprives you of committing.
In this case you can override MacCVSClient's opinion and force a reset
of the conflict mark. To do that, you select the file in question and chose
menu item "Special/Reset Conflict". You'll then see a confirmation
dialog and by OKing that, you reset the conflict mark. Be careful with this
function. I recommend not to use it unless you have got the problem mentioned
above, where MacCVSClient erroneously treats your conflict free files as
conflict ridden.
The reset conflict function for safety reasons only works on single file
selections.
See also: More Details: Info Windows.
|
|
|
|
|
When RBL encoded resource files
are merged by CVS, there can be conflicts, like in
TEXT files. Some of these conflicts can be automatically resolved by MacCVSClient.
You'll see messages in the console window if this happens.
This automatic conflict resolution is safe! MacCVSClient does not base this resolution
on guesses. Conflicts are only resolved automatically by MacCVSClient, if it can make
clear decisions.
If there are conflicts that cannot be resolved automatically like two people adding
or changing the same resource independently, MacCVSClient leaves these conflicts in
several files:
- The updated file with your local changes and the "local" half of the
conflicts is kept in name.
- The "repository" half of the collisions is kept in the file
name-repo.
- The original (before the update) working file is kept in name-work.
To resolve the collisions, you use the resource editor of your choice. You might have to
use ResEdit or another low level resource editor because the file name-repo
contains only the conflicts. That might not be enough data for e.g. Metrowerks Constructor
to work on the file.
After you have resolved the conflicts, you need to use the "Special/Reset Conflict"
command to reset the file's conflict flag.
Conflicts in RBL encoded files can currently not be viewed in MacCVSClient. The
"Special/Check Conflict" command does not work with RBL encoded files.
|
|
|
|
|
After running the CVS log command on files, the log output is stored in temporary files
as long as the module is open. It can be viewed using the "Special/View/Log"
command. This command opens a window similar to diff and conflict windows which allows
for browsing and searching.
Log output is available for a file if it is marked by the ® sign.
When recieving CVS log output from the server, MacCVSClient looks for the string "Working file:"
(at the beginning of a line) to find out which file the log output belongs to. This mechanism
is somewhat fragile for two reasons:
- The string "Working file:" might occur in the log text.
- When issuing a CVS log command on a whole module, the CVS server sends the logs of
attic files as well. These attic files might not exist in the working copy of the
CVS module.
In both cases, MacCVSClient writes the log output it can't find out a file for to the console
window. In everyday's work, log output parsing works quite good and normally all logs
go where they are supposed to go.
You can specify in the Preferences that log output
is also echoed to the console window. Then the log information shows up in both places:
log and console window.
See also: More Details: Info Windows.
|
|
|
|
|
If you want to check out an old revision of a file in CVS, you can do
that in two ways. One would be to update that file and specify the proper
revision or date. In this case the file will not be updated to newer revisions
as it has a sticky tag or date. To get new and updated versions of that
file, you have to reset the sticky tag/date. Also, an existing version of
the file in your working directory would be overwritten by this newly checked
out old revision. If you want to have it that way, fine!
But if you just want to have a copy of that old revision handy and still
want to keep your checked out (or even already modified) revision of the
file, you would tell CVS to copy that old revision of the file to stdout
and redirect this to a file of your choice.
MacCVSClient has a special command to retrieve old revisions of files:
"CVS/Retrieve".
|

State what old revision you want to get in the "CVS retrieve"
dialog. When retrieving an old revision, the revision number is appended
to the retrieved file's name.
|
|
|
|
|
Rev. 1.24 - Copyright © 1997-1998 Fontworks Ltd.
|
|