This gives you local modifications, i.e. Don't look at things that have been changed in the repository that are not in your working copy.
static def isModded(SvnConfig svn, File path, SVNRevision rev) { SVNClientManager mgr = newInstance(null, svn.username, svn.password) logger.debug("Searching for modifications beneath $path.path @ $rev") mgr.statusClient.doStatus(path, rev, INFINITY, false, false, false, false, { SVNStatus status -> SVNStatusType statusType = status.contentsStatus if (statusType != STATUS_NONE && statusType != STATUS_NORMAL && statusType != STATUS_IGNORED) { lmodded = true logger.debug("$status.file.path --> lmodded: $statusType") } } as ISVNStatusHandler, null) lmodded }
The code I have for this is in groovy, but hopefully using svnkit api is pretty obvious to work. SvnConfig is only a local value object containing various information about the repository itself.
source share