On Premise Private Subversion (SVN) Server setup

0
Trying to understand how this process works and if someone can point out how to make it easier for my developers to use.  I deployed a private Apache Subversion server on CentOS 7.  I am able to create repositories with command: sudo svnadmin create testrepo I checked the setting under preferences “ enable private version control” Here are some errors I encountered and how I fixed them At first I was getting an error when trying to upload to version control server. “Project is already version controlled” Fix: Go to project folder, delete the .svn folder and try again to upload to version control server. Error to upload to version control folder “Trunk folder does not exist”, I was not able to create branches either Fix: checkout repo into an empty folder, create “trunk” and “branches” folders and commit. Then try to upload your project to version control folder again Questions: How can I allow the developers that don’t have sudo access to the server to create their own repositories? Once a repository has been created, is there a better way to add the trunk and branches folder?
asked
1 answers
0

Disable online services when creating a new project if you want to use a private version control repo. Or delete .svn folder from existing project

 

Here is the script to create a new repo in a CentOS server with Apache and subversion installed.

 

#!/bin/bash
echo "Please enter the project name: "
read -e projectName

while [ -d "/u1/svn/repos/$projectName" ]
do
        echo "There is a project with this name already, please choose another project name: ";
        read -e projectName
done

echo "Creating new repository $projectName"
svnadmin create "/u1/svn/repos/$projectName"

echo "Changing repository permissions"
chown -R apache:apache "/u1/svn/repos/$projectName"

echo "Initializing folder structure"

svn mkdir -m "new trunk,tag and branches dir" "http://127.0.0.1/$projectName/tag" "http://127.0.0.1/$projectName/branches" "http://127.0.0.1/$projectName/trunk"

#echo "New Repository $projectName has been created successfully"

 

answered