@Override
public Repository transaction() throws Exception {
// Attempt to create the repository directory if it does
// not already exist (it shouldn't).
if(repo.getFile().exists()) {
throw new DuplicateRepositoryException("Repository " +
"already exists (file=" +
repo.getFile().getAbsolutePath() + ", id=" +
repo.getRepoId() + ")");
}
// Create the new directory (and any required parent