public GetBinaryFileContent ( |
||
changeset | ||
path | string | |
return | byte[] |
public override byte[] GetBinaryFileContent(RevisionId changeset, string path)
{
try
{
using (var stream = GetSVNFileStream(new SvnRevisionId(changeset), path))
{
return stream.ToArray();
}
}
catch (SvnFileSystemException ex)
{
throw new VersionControlException(String.Format("Subversion exception: {0}", ex.Message));
}
}
public void GetBinaryFileContent() { using (var s = new Subversion(GetLocalRepositorySettings(), ObjectFactory.GetInstance <ICheckConnectionErrorResolver>(), ObjectFactory.GetInstance <IActivityLogger>(), ObjectFactory.GetInstance <IDiffProcessor>())) { byte[] content = s.GetBinaryFileContent(3.ToString(), "readme.txt"); Assert.AreEqual(Encoding.UTF8.GetBytes("Test repository to verify subversion integration."), content); } }