* @param repositoryRoot repository root location
* @throws SVNException
* @since 1.2.0, SVN 1.5.0
*/
public void doUpgrade(File repositoryRoot)throws SVNException {
FSFS fsfs = SVNAdminHelper.openRepository(repositoryRoot, true);
try {
if (myEventHandler != null) {
SVNAdminEvent event = new SVNAdminEvent(SVNAdminEventAction.UPGRADE);
myEventHandler.handleAdminEvent(event, ISVNEventHandler.UNKNOWN);
}
File reposFormatFile = fsfs.getRepositoryFormatFile();
int format = fsfs.getReposFormat();
SVNFileUtil.writeVersionFile(reposFormatFile, format);
fsfs.upgrade();
SVNFileUtil.writeVersionFile(reposFormatFile, FSFS.REPOSITORY_FORMAT);
} finally {
SVNAdminHelper.closeRepository(fsfs);
}
}