Curious if there any API wrappers for Git and Subversion for Java?
I want to be able to pullup the changesets and souce code (and diffs) from Subversion and Git repos.
Is this possible? Any pre-built APIs?
A quick google search found some results, although I can't say I've used them so their usefulness is unknown
jGit is an implementation of git in Java.
SvnClientAdapter will connect to SVN using various different methods.
JGit is an implementation of Git, so if you are looking for just an API which routes to the native git implementation, it will not do the trick.
JavaGit just does not work. I tried it under win64 with msysgit 1.8.1 and,... well it just does not work. Probably it was tested under another OS and older version of git.One can go ahead and fix JavaGit for their purposes - the code is far from complex. The maturity of the source is not impressive though - there are unimplemented stubs, exception swallowing etc. I'd say it's an unfinished project by otherwise well-intended people.
Maybe another alternative is to take the git command class from http://plugins.jetbrains.com/plugin/3033 and decouple it from intellij infrastructure. That is something I would pursue.
It's always an option, if your usecases are simple, to implement your own API, perhaps reusing a commandline abstraction library such as http://commons.apache.org/proper/commons-cli/
Hope this helps.
Check out svnkit for a java-based subversion implemention. There are also subversion bindings to java distributed with subversion at http://subversion.tigris.org/
jgit has a java implementation for git.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With