开发者

Using the method SVNClient.Diff Diff (SvnTarget target, SvnRevisionRange range, Stream results)

Given two different revisions need to get the differences between them, I intend to use the method duvuelve Diff but I anything as a result, it could be? Thanks. My code is as follows

using (SvnClient client = new SvnClient())
using (MemoryStream result = new MemoryStream())
{
    client.Authentication.DefaultCredentials = new NetworkCredential("asdf", "asdf/*");
    try
    {
        //SvnUriTarget is a wrapper class for SVN repository URIs
        SvnUriTarget target = new SvnUriTarget(textBox1.Text);
        if (client.Diff(target, rango, result))
            MessageBox.Show("Successfully para" + rango.ToString() + ".");


        StreamReader strReader = new 开发者_StackOverflow社区StreamReader(result);

        string str = strReader.ReadToEnd();
    }
}


The stream that is returned from the Diff() function is positioned at the end of the stream, so before creating your stream reader, you need to reposition it at the beginning of the stream:

result.Position = 0;
StreamReader strReader = new StreamReader(result);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜