Plugin that performs CVS operations

I'd like to write a plugin that hooks into the CVS commit (similar to the the CommitLog plugin) and (optionally) performs additional CVS operations (specifically cvs tag operations) once the commit is completed.

I know the CVS plugin is the only VCS plugin that is not open-sourced (any chance of changing that, BTW), but would it be possible to include the netbeans CVS library in my plugin distro and use it as sort of a standalone library?

Thanks!

Todd

0
3 comments

The netbeans CVS library is part of the CVS integration plugin with IntelliJ. Therefore, if you make your plugin dependent on the CVS integration plugin, then you are guaranteed to have the netbeans CVS library available to use at runtime. For development compile time, just add the CVS integration plugin jars (cvsIntegration.jar and javacvs-src.jar) to your IntelliJ SDK. The reason to do this instead of adding it as a regular jar dependency is so that it won't be copied into your plugin jar for distribution.

My CVSRevisionGraph plugin is opensource and does some tagging operations down at the netbeans library level. You can look at its source to get some help.

I am not sure how to hook into the CVS commit, though. I decompiled the CVS integration plugin to figure out how to do what I wanted. I would suggest that.

0

Thanks, Shawn. That's exactly the info I was looking for.

I'll take a look at CVSRevisionGraph. I've got the CVS commit hook working, so I just need to clean up my code a bit and change the dependency as you described.

Todd

0

I finally got around to adding the dependency to the CVS Integration plugin. I added the plugin jars to my project as described (cvsIntegration.jar and javacvs-src.jar). However, not all of the NetBeans CVS library appears to be included. Specifically, the following imports can not be located:

import org.netbeans.lib.cvsclient.connection.PasswordsFile;
import org.netbeans.lib.cvsclient.Client;
import org.netbeans.lib.cvsclient.CVSRoot;
import org.netbeans.lib.cvsclient.event.CVSAdapter;
import org.netbeans.lib.cvsclient.event.MessageEvent;
import org.netbeans.lib.cvsclient.event.FileUpdatedEvent;
import org.netbeans.lib.cvsclient.event.BinaryMessageEvent;
import org.netbeans.lib.cvsclient.event.FileAddedEvent;
import org.netbeans.lib.cvsclient.event.FileToRemoveEvent;
import org.netbeans.lib.cvsclient.event.FileRemovedEvent;
import org.netbeans.lib.cvsclient.event.FileInfoEvent;
import org.netbeans.lib.cvsclient.event.TerminationEvent;
import org.netbeans.lib.cvsclient.event.ModuleExpansionEvent;
import org.netbeans.lib.cvsclient.admin.StandardAdminHandler;

When I had a dependency to the NB CVS library jar that I downloaded from NetBeans, all of these imports were available.

Thanks!

Todd

0

Please sign in to leave a comment.