On Server side... svnadmin & svnserve command.
1. Start with creating repository.
svnadmin create <SOME_EXISTING_PATH>/<DESIRED_REPO_NAME> #asuming reponame as repo1 and path as home directory.
cd ~/repo1/conf
2. Change configurations for repository. edit svnserve.conf file #Change to something like this.
anon-access = none
password-db = passwd
authz-db = authz
realm = repo1
3. Add users who will be using this repository. edit passwd file #add line under [users] section as follows.
[users]
rohit=rohit@1
4. Set authorization level for users. edit authz file #add [/] section as follows.
[/]
rohit=rw
5. Start svn server. default port for svn is 3069. Port should be opened in case of secured networks. test using telnet command on client.
svnserve -d --listen-port 8078 -r ~/repo1 #This would start svnserver to listen on port 8078 for repository "repo1"
On Client side... svn command
1. Username and password if supplied to svn command is by default stored in ~/.subversion/auth/svn.simple/<ENCRYPTED_FILE> for user ease, allowing further access without supplying creds. To turn this feature off need to edit ~/.subversion/servers under [global] section as follows.
store-passwords = no
2. List contents on repo url.
svn ls svn://<IP_OF_SERVER>:<PORT>/ --username <SVN_USER> #password will be prompted later.
3. Create/Add a project folder in repo.
svn mkdir svn://<IP_OF_SERVER>:<PORT>/<DESIRED_PROJECT_NAME> -m "<MESSAGE ABOUT COMMIT>" --username <SVN_USER>
4. Checkout existing project or entire repository. .svn folder is created by default that holds info about repo and user in checked-out directory.
svn co svn://<IP_OF_SERVER>:<PORT>/<DESIRED_PROJECT_NAME> --username rohit
##change to checked-out directory and make any change..
5.List out changes done by you.
svn status
6.
Stage changes for commit.
svn add * #use * or specific file name to add.
7. Commit your changes for others.
svn commit -m "Initial Commit.."
Todo- Merge conflicts, branch management, revert commits, unstage changes, remove files..