Question

Is it possible to get the author of the current commit of a folder with SharpSVN. So doing this without retrieving the log file of the svn server. I tried:

client.TryGetProperty(folder, SvnPropertyNames.SvnAuthor, out AuthorStr);

but the AuthorStr string is null.

Was it helpful?

Solution

The 'svn:author' property is a revision property, not a normal versioned property so you can not use the normal property api on it.

The easiest way to get that info in a working copy is to call SvnClient.Info() (or .GetInfo()) on your target. (You can also get it via .Status(), but that is slower then .Info() as it also checks if the file is changed)

OTHER TIPS

If you don't mind getting the commit object itself and grabbing the property, you can do something as simple as:

using (SvnClient client = GetClient())
{
    client.GetLog(RemotePath, args, out collection);
}
return collection.First().Author;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top