SvnClient.GetStatus (path, args, statuses) returns 0 for the version file?

I wrote a simple C # application using SharpSVN to query file status before trying to add. Examples that I saw in different places for this very purpose include calling the GetStatus method for SvnClient, passing the full path and out parameter to the SvnStatusEventArgs collection.

I understand that for a file, GetStatus must be returned using the SvnStatusEventArgs collection, which has an account of exactly one, with a status among NotVersioned, Missing, Normal, etc.

In my application, my call to GetStatus in a source file returns a collection counter of zero.

        SvnClient foo = new SvnClient();
        Collection<SvnStatusEventArgs> statuses;
        foo.GetStatus("C:\\Temp\\svnu\\Program.cs", new SvnStatusArgs {Depth = SvnDepth.Empty}, out statuses);

The value of status.Count is zero when I expect 1 with the status [0]. LocalContentStatus is Normal. Is this expectation wrong? To call a path that refers to a file not in the source control, the call works with the status [0]. LocalContentStatus of the value NotVersioned.

The path is checked as a working copy, and the Program.cs file is, in fact, credited to Subversion. I am running SharpSVN version 1.7005.2163.13448 and VS2010.

Many thanks in advance for clarifying my apparent confusion.

EDIT . Additional information: after changing, but not fixing, Program.cs, the same code fragment now returns the same status value with LocalContentStatus "Modified". After committing the file, the original behavior is returned (there is no return status value).

+5
source
1

, . FYI .

GetStatus RetrieveAllEntries SvnStatusArgs ( :)) 1, a.LocalContentStatus "Normal", .

foo.GetStatus("C:\\Temp\\svnu\\Program.cs", new SvnStatusArgs {Depth = SvnDepth.Empty,
                                                               RetrieveAllEntries = true}, out statuses);

.

+5

All Articles