Question

I have created an SVN repository. I am committing the files using api's available in SVN Kit.

ourClientManager.getCommitClient().doCommit(paths, keepLocks, "", force, recursive);

Before doing this, i want to know if the file was modified by somebody else. I was trying to get the latest revision number or date from svn and compare with that on the file. But i am not able to get it. Can any one please let me know how i can identify the file was modified by some when else while i was working on it.

Était-ce utile?

La solution

You could combine:

repository.setAuthenticationManager(authManager);
SVNDirEntry entry = repository.info(".", -1);
System.out.println("Latest Rev: " + entry.getRevision()); 

with:

logEntry.getRevision();
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top