CWCVS FAQ


Index.

  1. Configuration.
    1. How can I automate the configuration process?
    2. Why is it so slow?
    3. Why does it just sit there when I try to connect?
  2. Commands.
    1. Checkout
      1. This is CVS! Why do I have to check out files?


Q & A.

Configuration

Q. How can I automate the configuration process?

A. The VCS Setup and VCS Environment panels are AppleScriptable, but the IDE is not recordable, so you will need to issue some Get Preferences to determine exactly what your settings are.

The following AppleScript is what we use to configure the CWCVS project:

tell application "CodeWarrior IDE 3.2"

Set Preferences of panel "VCS Environment" to {Variables:{"CVSROOT", ":pserver:hawkfish@tuna:/home/hawkfish/cvsroot", "IC_ON_TEXT", "1", "ISO8859", "1"}}

with timeout of 10 seconds

Set Preferences of panel "VCS Setup" to {VCS Active:true, Connection Method:"CWCVS", Username:"hawkfish", Password:"password", Auto Connect:true, Store Password:true, Always Prompt:false, Mount Volume:true, Database Path:{name:":", origin:project relative}, Local Root:{name:":", origin:project relative}}

end timeout

end tell

Two things to note: One is that the IDE requires a timeout value for the VCS Setup panel, the other is that you need to enter a non-empty Password even if you are not using one. An empty password will cause garbage to be entered in to many of the panel fields.

Q. Why is it so slow?

A. CWCVS is not particularly slow, but some older versions of MacCVS used a 10 second sleep time when waiting for the network. When MacCVS was in the background, this often meant that even simple operations could take at least 10 seconds. This was fixed in MacCVS 3.1.7.


Return to the Index.


Q. Why does it just sit there when I try to connect?

A. The AppleEvent suite was broken in MacCVS Versions 3.1.3 through 3.1.6. As of 3.1.7 everything is working again and I have been adding regression testing to the MacCVS project to make sure this (and many other problems) never happen again.


Return to the Index.


Commands

Checkout


Q. This is CVS! Why do I have to check out files?

A. There are three reasons why you need to check out files: one CVS reason, one IDE reason and one philosophical reason.

  1. The CVS reason for the Checkout command is that CVS does support exclusive locking via watched files and such files need to be reserved with a cvs edit command. Even if you don't use this feature, the plugin must support it.
  2. The IDE reason has to do with the fact that the VCS API was designed for a system that uses exclusive locking, namely Visual Source Safe. The IDE will only enable operations for files depending on the Checkout state. Specifically, files that are marked as unmodified cannot be edited in the IDE. I could report all files as unlocked, but this would give users no feedback as to what had been modified.
  3. The Philosophical reason is that I personally feel that leaving files unlocked is a bad practice. If you are going to make a change to a file, you should be deliberate about it. Hopefully, the time you take to make that decision swamps the short time spent checking out the file. I think that the Concurrent part of CVS is really cool, but I also appreciate the virtue of not touching everything just because you can.

While I appreciate that not everyone agrees with #3, the reason that it is not an option is because of #1 and #2. By making the plugin extremely baroque I could probably make everyone happy, but the time and energy involved seems like a waste. More time is saved by not having to switch to the client than is wasted by the Checkout process.

Return to the Index.


This page was last updated on 9 August 2000 by Richard Wesley.
Copyright © 1997-2000 by Electric Fish ,Inc. All Rights Reserved.