wiki:UsingTortoiseCVS
Last modified 11 years ago Last modified on 05/08/06 13:34:26

/!\ NOTE: This page assumes you have read the SIG UsingCVS page, and thus have a working knowledge of both CVS and its usage within SIG.

TableOfContents?

Checking out Modules/Directories?

Assuming that TortoiseCVS is already installed, if you want to check out a module to work on, just right-click in the directory to hold the working repository and select 'CVS Checkout' (it should be at the top, with a cuddly tortoise icon to the left). Here's what you should see:

http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/checkout.jpg

TortoiseCVS Checkout Dialog

Don't bother editing the 'CVSROOT' field directly, it will fill itself in automatically. Just fill in the fields as they are in the above image, exept, of course, the 'User name' field, which should be your username on our Linux systems, noting that this may be different from your Windows log-in name. Note that if you have checkout out a module before, their will be selectable presets in the larger field of the window, and the individual fields should be pulldowns with preset values in them. If that was confusing, ignore it...

Most likely, you will not have to deal with the 'Revision' or 'Options' tags. The Revision tab is for selecting a certain revision/version/branch/tag/what-have-you, and the Options tab has some miscellaneous options such as 'export' (as opposed to the normal 'checkout' mode), which will not create the CVS directories. Export is for snagging a copy of the module/directory you want from CVS, but you will not be able to use any CVS functions on the directory.

Now, as far as modules go, if you don't know what you are looking for, you can try 'Fetch list' to snag a list of named modules from the server. Not all of our 'modules' have proper names that server knows about, and these are accessed by their path below $CVSROOT. For example, the Digital Anatomist client source is named 'DA-5.2', but it can be accessed, like anything in CVS, by its path below $CVSROOT, namely, 'src/atlas/client/cgi_c/DA-5.2'. Now do you see why there are proper names for modules? ;) In any case, enter the module name or path into the 'Module' field. The SIG website is in the module 'sigweb'.

When you are ready, clicking 'OK', should prompt you for your Linux password, and a nice little CVS directory will appear on the Desktop (unless you specified otherwise in the preferences.

Running CVS Update

Make sure that CVS Update is run before commits. CVS Update will show you where someone else has changed and committed code in the area you have been working on since your last commit or checkout. This is bad, and generally means that people have not been communicating with each other and have been trying to fix the same thing. Running update will give you a chance to locate and correct these incongruencies. TortoiseCVS will give you a list of files that have conflicts in them, so that you can go and fix them. The files themselves should now contain diff-like indicators showing you were you have issues. The version of the file you were working on should reside safely in something like '.#<filename>.<revision>' if you need to refer to it.

TortoiseCVS Spots a Conflict! http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/conflict-dlog.jpg

The Original and Diff'ed Files

http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/conflict-files.jpg

Committing to CVS

Ok, so now you've saved SIG with your uber-ingenious changes to whatever it is that you were working on, and now you want to commit them back into the repository. The first thing i am going to tell you is to RUN CVS UPDATE. Read that again, until it sinks in. Then actually do it. Now, to commit, you can just right-click in or on the directory which contains the file(s) you want to commit, or, if you want, select the files manually, and right-click 'CVS Commit'. If you have files in your selection that you don't want to commit, or that you want to have a separate commit message, you will be able to deselect them from the list TortoiseCVS will present. Running 'CVS Commit' again should allow you to commit those files deselected previously.

Committing Only Certain Files http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/commit.jpg

Success!

http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/success.jpg

Understanding Those Nifty Little Icons

Since you've made it this far, you've probably noticed those nifty little status icons TortoiseCVS overlays on relevant CVS files. But what the heck are they trying to tell you!? Hopefully they are somewhat intuitive, but perhaps not. So here ya have it:

Conflict

http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/conflict.jpg Modified http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/modified.jpg

OK

http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/ok.jpg Read-Only

http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/readonly.jpg New File/Directory?

http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/new.jpg

Now, note that, by default, a status on a file or directory other than 'OK' will not show up on the parent directory, but this is generally more desirable. This means that if any file is modified below a given directory, that directory itself will show the "modified" icon. To enable this feature, right-click anywhere and select CVS->Preferences and check the box entitled "Icon overlays:" ("Show changed directories").

Opening the Preferences Dialog http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/prefs-menu-mini.jpg

Enabling Parent Directory Status Indicator

http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/prefs-dlog-mini.jpg

Visualizing a File's Evolution; Revisions

TortoiseCVS will let you view the revision history of a given file by right-clicking on it, selecting Properties (non-TortoiseCVS item), and selecting the "CVS" tab therein. This is a nice little way to view version numbers, authors, commit dates, etc., but even more powerful is accessing the file's weblog. Separate from TortoiseCVS is "CVSWeb", a web-based browser for the entire CVS repository. TortoiseCVS is intelligent enough to figure out the corresponding URL for a file, and open a browser window with CVSWeb's information for that file. Why is this better than the Properties dialog interface? CVSWeb will show you the commit description messages, allow you to view any revision of a file, and what's more, create a "diff" between arbitrary versions of a file. This can be very useful, for example, in trying to track down where a bug was introduced into a given file.

The CVS Tab of the Properties Dialog http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/revisions-mini.jpg

The CVSWeb Log of a File

http://sig.biostr.washington.edu/local/sigdoc/images/tortoise/weblog-mini.jpg

(Advanced) "Passwords!? We Don't Need No Stinking Passwords!"

/!\ The following functionality is "not supported" in the sense that I'll tell you how to do it yourself, but don't come asking for help if you can't figure it out!

So you have mastered TortoiseCVS, and you use it so frequently that entering your password all the time is driving you nuts! Well, if you have some patience and techno-know-how, you can be on your way to never having to enter your password again!

Detailed instructions can be found at http://www.tortoisecvs.org/faq.shtml#sshkeys

{X} Warning: allowing passwordless login means that anyone with access to your private key can access all your files without a password!

Make sure that you connect to cvs.biostr.washington.edu (or whatever you have specified as the CVS server) at least once before trying to use it with TortoiseCVS, to establish the host key; OpenSSH will request confirmation of host keys based on the given hostname, so make sure that the hostname of the machine you connect to beforehand is exactly the same as that in TortoiseCVS's setup (eg, cvs.biostr != cvs.biostr.washington.edu). That's it. If for whatever reason it doesn't work, you can always enter "TortoisePlink" as the SSH client in the TortoiseCVS prefs to get you back to normal.

Originally by Chris Grierson, 2002-04-30