How to read each revision of file using sharpsvn client using c#?

前端 未结 1 540
鱼传尺愫
鱼传尺愫 2021-01-19 02:43

How to read each revision of file using sharpsvn client using c# ? Not the revision numbers but the content of the file in each revisions............

相关标签:
1条回答
  • 2021-01-19 03:10

    You can use SvnClient.FileVersions for this like described in a similar question

    public void WriteRevisions(SvnTarget target, SvnRevision from, SvnRevision to)
    {
        using(SvnClient client = new SvnClient())
        {
            SvnFileVersionsArgs ea = new SvnFileVersionsArgs 
                {
                    Start = from,
                    End = to
                };
    
            client.FileVersions(target, ea,
                delegate(object sender2, SvnFileVersionEventArgs e)
                    {
                        Debug.WriteLine(e.Revision);
                        e2.WriteTo(...);
                     });
        }
    }
    
    0 讨论(0)
提交回复
热议问题