Search code examples
sharpsvn

Accessing svn:mergeinfo via SharpSvn


I'm using SharpSvn to get the log for a repository. For each log entry I can access useful info about the files that have changed (via SvnLogEventArgs.ChangedPaths), but I can't figure out how to get the svn:mergeinfo property.

Any ideas? Thanks


Solution

  • It is just a regular Subversion property. You can extract the value using the following bit of code:

    string mergeInfo;
    var client = new SvnClient();
    bool success = client.GetProperty(
                            SvnTarget.FromString(fileName), 
                            "svn:mergeinfo", 
                            out mergeInfo);
    

    Note that the result of GetProperty does not indicate whether or not a mergeinfo property was available but rather if the method call was a success. The mergeInfo string variable may be null even if success is true.