public struct LockedFileMetaData
{
public string FilePath { get; set; }
public string LockOwner { get; set; }
}
public List GetListOfAllLockedFiles()
{
List lockedFiles = new List();
SvnTarget target = SvnTarget.FromUri(RepositoryUri);
System.Collections.ObjectModel.Collection ListEventArgs;
SvnListArgs args = new SvnListArgs();
args.RetrieveLocks = true;
_svnClient.GetList(target, args, out ListEventArgs); //lock doesn't get populated
if (ListEventArgs != null)
{
foreach (var fileStatus in ListEventArgs)
{
if (null != fileStatus.Lock)
{
lockedFiles.Add(new LockedFileMetaData() {
FilePath = fileStatus.Lock.FullPath,
LockOwner = fileStatus.Lock.Owner
});
}
}
}
return lockedFiles;
}