0 Replies Last post: Aug 31, 2002 3:04 PM by Joey Edelstein  
Joey Edelstein Novice 122 posts since
Aug 29, 2002
Currently Being Moderated

Aug 31, 2002 3:04 PM

How to get started writing a VCS plugin



I am considering writing a VCS plugin for AccuRev, which is our revision control system.


I have gone over all the documentation I could find on Wiki and the StarTeam and ClearCase plugins, and read all the posts I can find in the forum.  I am left with a number of questions most arise around how to adapt the AbstractVcs interface to the way AccuRev works. 


I guess I should start by describing the AccuRev way of doing VCS.   AccuRev is like CVS that it doesn’t force a checkout and has personal workspaces like ClearClear when using UCM.


Every user has his/her own workspace in which files are edited freely with no need to check out.  At any given time a user can "Keep" a version of a modified file this is like checkin but only in the users workspace creating a backup on the server and a checkpoint for the users work. 

When the user is done he can "promote" his work to a common stream making it available to everybody.   

At any point a user can "Update" to get the latest changes to any files he hasn't edited and "Merge" any files he has. 

Deleting, moving or renaming a file are all done in AccuRev this is a one step action that both changes the files name/path and "Keeps" this to the users workspace.  Again this remains local until user promotes the changes.

Finally all actions in AccuRev are Transactions but there is no begin / end transaction rather each command is a transaction so:

Keep a.java

Keep b.java

Would be 2 transactions

But Keep a.java b.java would be a single transaction.



This leads me to a number of questions regarding implementing AbstractVcs and AbstractVcsCapabilities


1.     Should the AbstractVcsCapabilities declare it supports transactions?  As a rule I would like commands that can be grouped together to be one AccuRev command to minimize the number of transactions.  I guess I could have all commands just store the action in a list and have commitTransaction do the actual calling of AccuRev to perform the commands grouping them together when at all possible.  This seems a little complex is there any other way to go at this?

2.     What do I do with commands like renameAndCheckInFile .  AccuRev expects to make the change to the file itself, if the file has already been physically renamed the AccuRev command will fail. 

3.     AccuRev has no create directory command directories are created automatically when you add a file or move a file to a directory that wasn’t declared earlier.  What do I do with addDirectory and removeDirectory?


Finally while it is evident that just like with the rest of IDEA a lot of thought and effort has gone in to the VCS API, to a large extent an API is only as good as its documentation.  I really would like to seem some serious documentation if only on what the intent of every function is and when it gets called. 




More Like This

  • Retrieving data ...