문제

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.

도움이 되었습니까?

해결책

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)

다른 팁

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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top