public void removeVersion(@Nonnull VersionHistoryDelegate versionHistory,
@Nonnull String oakVersionName) throws RepositoryException {
// perform operation on fresh storage to not interfere
// with pending changes in the workspace.
Root fresh = sessionDelegate.getContentSession().getLatestRoot();
VersionStorage storage = new VersionStorage(fresh);
String vhRelPath = PathUtils.relativize(VersionStorage.VERSION_STORAGE_PATH,
checkNotNull(versionHistory).getPath());
versionManager.removeVersion(storage, vhRelPath, oakVersionName);
}