I'm trying to check if a certain svn subdirectory was updated, and if so, update my entire working directory.
Here is what I do:
SvnClient svnClient = new SvnClient();
SvnWorkingCopyClient workingCopyClient = new SvnWorkingCopyClient();
SvnInfoEventArgs svnInfo;
SvnWorkingCopyVersion workingCopyVersion;
Uri svnRepository = new Uri(m_svnAddress + /local/trunk/somefolder");
svnClient.GetInfo(svnRepository, out svnInfo);
workingCopyClient.GetVersion("C:\\Workspace\\somefolder", out workingCopyVersion);
int recentSvnRevision = unchecked((int)svnInfo.Revision);
int currentVersion = unchecked((int)workingCopyVersion.End);
if (recentSvnRevision != currentVersion)
// Do stuff
The problem is that recentSvnRevision
is set to the latest revision number of the entire directory on the svn, and not the revision of the /local/trunk/somefolder
directory.
Any ideas?