| | |
| | | .format("Can not rename repository ''{0}'' to ''{1}'' because ''{1}'' already exists.",
|
| | | repositoryName, repository.name));
|
| | | }
|
| | | File parentFile = destFolder.getParentFile();
|
| | | if (!parentFile.exists() && !parentFile.mkdirs()) {
|
| | | throw new GitBlitException(MessageFormat.format(
|
| | | "Failed to create folder ''{0}''", parentFile.getAbsolutePath()));
|
| | | }
|
| | | if (!folder.renameTo(destFolder)) {
|
| | | throw new GitBlitException(MessageFormat.format(
|
| | | "Failed to rename repository ''{0}'' to ''{1}''.", repositoryName,
|
| | |
| | | }
|
| | | return scripts;
|
| | | }
|
| | |
|
| | | |
| | | public List<String> getInheritedPreReceiveScripts(RepositoryModel repository) {
|
| | | Set<String> globals = new HashSet<String>();
|
| | | for (String script : getStrings(Keys.groovy.preReceiveScripts)) {
|