Construction of a VCS plugin for Mercurial Follow
I am in the process of attempting to build a plugin for Mercurial. I was wondering if there is any documentation that explains the functionality of the various providers that need to be implemented for it and how those providers interact with Idea. A high level overview would be extremely useful, as trying to imply the functionality from the code of the existing plugins is proving to be time consuming and rather VCS specific. Especially without knowing what the purpose of each component is to Idea.
I have got some basic functionality working (namely add) but I feel as though I am missing the bigger picture and that I am just creating a huge refactoring job once I figure out what really should be going on...
Please sign in to leave a comment.
What version of IDEA are you targeting? The VCS API has undergone through
quite a lot of changes in Selena, and I would recommend that you target Selena
rather than 6.0. I'll try to make a write-up of the different parts of the
VCS API soon.
"Develop with Pleasure!"
I had exactly the same problems when trying to patch the VSS plugin.
So I would appreciated an overview of the VCS API, too.
There's a lot to be learned from looking at the sources of the SVN and VSS
plugins, but esp. the VSS sources aren't that pretty either.
I was just trying to teach the VSS plugin to supply version numbers, but I
don't really get where (if?) Idea locally caches/stores them.
Best one I found was the Starteam plugin. It is simpler and is commented The others (Perforce and svn) are not commented at all. I have also been looking at the MKS plugin at http://ideamksplugin.googlecode.com/svn/trunk/src/main/java/org/intellij/vcs/mks/ which is also helpful.
I am using 7065 at the moment.
A write up of the various components would be really useful. I spent most of a day trying to figure out which parts plugged where. A written explanation would save a lot of time and effort.
Be warned that the MKS plugin is under heavy work :)
Also, it is quite constrained by the fact that it was intially made from Eclipse plugin AFAIK, and since then had to overcome changes in the VCS api from 5.x to 7
That's actually turned out to be quite useful. The approach is different and provides a good way of illuminating the API functionality when contrasted to the other plugins.
Just so that someone says it, it's really great to hear that someone is looking to support one of the new "no central repository required" flavors of VCS in IDEA. Very sexy, high tech, high touch. Best of luck!
As far as I can tell, the new "master component" is the ChangeProvider.
It has the ability to group changes using "change lists", which you are able to interact with using the ChangeListManager (com.intellij.openapi.vcs.changes.ChangeListManager)
Your plugin can also contribute CheckinEnvironment which will handle checking/commits.
There seem to be a good more number of integration points but I didn't use them (yet)
Totally agreed, I'd love to be using one (we have a distributed team) but lack of IDEA integration was one thing holding us back.
there is no licensing information on the MKS plugin. I'd like to use your BasicAction/MultipleTargetAction code as it will save me some time implementing the update method for the AnAction and your solution is elegant. What is your policy?
i'd be honored if my code was reused :)
Just to be be honest, the initial work for this plugin was done by Eric Sheffer (not this part though ;) )
And AFAIK Eric was ok for it to be "free" code, and i'm fine with it too
Thx. That saves some time.
Gary - is there anything worth showing off to the public yet? I'm
playing more with hg (and just discovered the hg maven vcs plugin as
well) and thought it'd be cool see what you've got going (i'm going to
be off line for awhile overseas so having something to play with might
Gary Evesson wrote:
Are you planning to create a google code project for it? I think I would
take a look.
I have add, revert, commit and bits of diff working so far. I would point out that this code base is only four working days old, and it is potentially dangerous to use.
I have not released anything into the public yet because people expect VCS stuff to look after their code and not break - nothing more nerve racking that trying to recover the class that you just spent all day working on...
That said, I could provide you with a zip to test only. Extra testing feedback would be welcome.
If I upload it to the plugin system, then someone will download it and complain when it breaks... so email me at gary at evesson dot com, and we can set it up.
OK. I have created the Google code project. It is at: