2013-04-25 13 views
1

특정 svn 하위 디렉토리가 업데이트되었는지 확인하려고하고 있는데, 그렇다면 전체 작업 디렉토리를 업데이트하십시오.svn에서 특정 디렉토리의 업데이트 확인 C#

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/local/trunk/somefolder 디렉토리의 개정을 SVN에 전체 디렉토리의 최신 개정 번호로 설정되지 않는 것입니다 : 여기

내가 할 것입니다.

아이디어가 있으십니까?

+1

무엇을 찾으시겠습니까? 서버의 최신 개정판이나 최신 버전의 작업 카피? 변경된 사항이 있는지 확인하는 대신 업데이트 할 수없는 이유가 있습니까? –

답변

1

당신은 특정 디렉토리의 최신 개정 번호 얻기 위해 이것을 사용할 수 있습니다 다음과 반대로,

SvnInfoEventArgs info; 
client.GetInfo(RemotePath, out info); 
return info.LastChangeRevision; 
이것은, remotePath가 검사 할 폴더의 디렉토리입니다

(예를 https://svn.exmaple.com/local.../somefolder합니다.) 저장소의 경로.