0

I'm trying to use SharpSvn to read the contents of two revisions of a file. When I run the following code the fileVersions collection only contains one item..

var svnClient = new SvnClient();
var revisionInfo = new SvnFileVersionsArgs
    {
        Start = 80092,
        End = 80093
    };

Collection<SvnFileVersionEventArgs> fileVersions;
svnClient.GetFileVersions(
    new SvnUriTarget("https://DbDiff.svn.codeplex.com/svn/DbDiffCommon/DataAccess/SqlCommand11.xml"), 
    revisionInfo,
    out fileVersions);

However I would expect it to include two items. Using TortoiseSVN I can see that the file changed in revision 80088, so I would expect to get this version when I use Start = 80092..

TortoiseSVN Log Messages

Using Start = 80091 doesn't help either..

Tom Hunter
  • 5,714
  • 10
  • 51
  • 76

1 Answers1

1

The problem is not in your code but in the SvnBridge software used by codeplex. (They store the data in TFS and provide access via the bridge instead of using a real Subversion backend).

The bridge software doesn't implement this api properly. (I added an issue on it years ago, but as far as I can tell it was never fixed).

Subversion itself only uses this api for 'svn blame' (/praise/annotate), so I think the SvnBridge developers didn't care enough to fix this.

In AnkhSVN I detect the case of just receiving one file and then use SvnClient.Write() to obtain the file the slow way :(

Bert Huijben
  • 19,525
  • 4
  • 57
  • 73
  • I'm also seeing strange things like the log of a particular file showing the first entry as _Modified_ - shouldn't the first entry for a file be _Added_..? Could this behavior be explained by the SvnBridge? – Tom Hunter Jul 30 '12 at 18:56