我正在尝试检查某个 svn 子目录是否已更新,如果是,请更新我的整个工作目录。
这是我所做的:
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
问题是recentSvnRevision
设置为svn上整个目录的最新修订号,而不是/local/trunk/somefolder
目录的修订。
有任何想法吗?