Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing svn:mergeinfo via SharpSvn

Tags:

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

like image 629
Akash Avatar asked Dec 30 '25 02:12

Akash


1 Answers

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.

like image 71
HakonB Avatar answered Jan 02 '26 02:01

HakonB