Which has better .NET implementation, Mercurial or git?
I need to access some DVCS from my .NET code and because I'm familiar with Mercurial and Git, which one of that two has better .NET client library? And I don't mean just a wrapper, I mean a full .NET implementation not requiring any command line calls in the background.
Note: If the answer was Bazaar or some other DVCS that I'm not 开发者_如何学Gofamiliar with, it's OK, the actual DVCS is not that important.
Edit: I'm looking for answers from people that have actually tried some .NET clients and can judge their quality.
I can't speak for Git, but Mercurial has no API in any language - everything is intended to be done via the command line.
NGit is not a wrapper. https://github.com/slluis/ngit
It is based on JGit and makes a lightweight access library for .NET world.
It drives e.g. monodevelop source control integration and can do everything you can do with the commandline tools, except "Look ma, no external binaries"
Both have native .NET support:
- Git - Git#
- Mercurial - Mercurial.NET
The choice is yours.
There are no "native" implementation of Mercurial (and there will likely never be). Your best bet would be the hglib project, which uses the cmdserver mode of Mercurial (part of a GSoC project).
To sum up what was gathered in the answers: it looks that Mercurial doesn't have and probably won't have a .NET port any time soon while for Git, at least these two ports seem usable:
- NGit (automated port of JGit)
- GitSharp
精彩评论