0

I am using Mercurial.NET and I need to get the status of one or more files (commited, modified, etc).

How can I use Mercurial.NET or at least Mercurial to do this?

Basically, I need to provide the paths of the desired files to the status command somehow.

I don't want to get a list of all the files and their status and filter them based on their path.

I see that TortoiseHG does this, but I can't figure out how to do this in cmd-line or from within Mercurial.NET.

4

1 回答 1

0

我现在看到:

hg status <path_to_file_in_the_repo>

似乎做我想做的事。在 Mercurial.NET 中是:

        var repo = new Repository(path);
        var s = new StatusCommand();
        s = s.WithInclude(FileStatusIncludes.Modified)
            .WithAdditionalArgument("\"" + file + "\"")
            .WithTimeout(1000);
        s.Validate();
        var ret = repo.Status(s);
于 2013-11-14T13:03:22.597 回答