Mercurial API for .NET

I want to create a .NET client for mercurial. Nothing unusual, just basic material.

+3
source share
3 answers

I started writing a wrapper class library in .NET 4.0 for the Mercurial command-line client. It's too early to use anything else, but you can follow it. I hope this will be useful to more people than to me.

The code is released as open source on a bitbucket, here:

http://bitbucket.org/lassevk/mercurial.net

You can currently do a basic log search. Full syntax support for viewing reverses is not performed, but you can do things like:

var repo = new Repository(@"c:\dev\some\project\repo");
var log = repo.Log(verbose: true, set: RevisionSet.FromRevision(10)); // 10:tip

var changesByMeThatModifiesIgnoreFile =
    from changeset in log
    where changeset.AuthorName == "Lasse V. Karlsen"
       && changeset.PathActions.Any(pa =>
           pa.Path == ".hgignore" &&
           pa.Action == PathActionType.Modify)
    select changeset;

, , , , , , ..

+6

, . API. , , . . , , , Mercurial.

- API . .Net, Mercurial.Net Lasse Karlsen.

+4

, : Mercurial API Java?.

Basically, I think you just need to call the command line functions. The official API seems to be for Python only.

+2
source

Source: https://habr.com/ru/post/1708115/


All Articles