SharpSVNを使用してテキスト比較を行うファイルの以前のリビジョンを取得する効率的な方法を見つけようとしています。SharpSVN - 以前のリビジョンを取得するには?
using (SvnClient c = new SvnClient())
{
c.Authentication.DefaultCredentials = new NetworkCredential(
ConfigurationManager.AppSettings.Get("SvnServiceUserName")
, ConfigurationManager.AppSettings.Get("SvnServicePassword")
, ConfigurationManager.AppSettings.Get("SvnServiceDomain")
);
c.Authentication.SslServerTrustHandlers += new EventHandler<SvnSslServerTrustEventArgs>(Authentication_SslServerTrustHandlers);
Collection<SvnFileVersionEventArgs> fileVersionCollection = new Collection<SvnFileVersionEventArgs>();
SvnRevisionRange range = new SvnRevisionRange(0, this.hooks.Revision);
SvnFileVersionsArgs args = new SvnFileVersionsArgs();
args.RetrieveProperties = true;
args.Range = range;
foreach (SvnChangeItem item in log.ChangedPaths)
{
string path = this.repositoryPath + item.Path;
bool gotFileVersions = false;
try
{
if (item.NodeKind == SvnNodeKind.File)
gotFileVersions = c.GetFileVersions(SvnTarget.FromString(path), args, out fileVersionCollection);
上記のコードはリクエストの実行例ですが、非常に効率が悪いです。私の目標は、リビジョンと以前のリビジョンを選択できるようにすることです。例えば、私のリポジトリがr185にありますが、リビジョン100のファイルを見たいと思っていて、同じファイルの以前のリビジョン(私は何が分からないでしょうか)を見たいのですが、これはどのようにすることができますか?
私はc.GetInfo()を見てきましたが、これは以前のリビジョンを最新のコミットだけにしているようです。
ありがとうございます!