3

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 StreamReader(result);

        string str = strReader.ReadToEnd();
    }
}
Sander Rijken
  • 21,376
  • 3
  • 61
  • 85
Luismel
  • 31
  • 1
  • 2
  • You don't get results? Is it possible that the file didn't change in the range you supplied? Does the MessageBox show up? – Sander Rijken Jan 17 '11 at 11:09

1 Answers1

5

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);
Brandon Wood
  • 5,347
  • 4
  • 38
  • 31