Search code examples
c#svnsharpsvn

SharpSvn GetFileVersions revision range, only one file version returned


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..


Solution

  • 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 :(