SOP for using Subversion

From Wikipedia

Jump to: navigation, search

Standard Operating Procedure for using Subversion to commit and retrieve files from the server


For Windows


Installing Subversion


1. Install Tortoise SVN

a. You will have two options as follows, select the one depending upon your OS settings

i) 32 Bit - Click on .msi link

ii) 64 Bit - Click on .msi link

Note: After installing Tortoise SVN, you will need to restart your machine.

2. Open Windows Explorer

Right-click anywhere

3. Select "SVN Checkout..."

4. In the new window that appears,for "URL of repository:", type: svn+ssh://user@117.121.241.160/var/svn-repos/duke

5. Click on OK. If it asks to create the new directory, click on OK.

6. After that, when you right-click in Windows Explorer, TortoiseSVN options should appear.


Basic commands:


A. To view the repository:

1. Right-click anywhere on Windows Explorer and select TortoiseSVN > Repo-browser.

2. In the new window, you will be prompted for your password.

3. The Repository Browser will show the folders on the left and the files on the right, along with the Author name, revision number and other details.


B. To create a new folder:

1. In the Repository Browser window, right click on the folders that appear on the left.

2. Select "Create folder..."

3. When prompted, write the new name of the folder.

4. Click on OK twice. It will prompt for your password again.

5. The new folder will appear on the left.


C. To upload/commit the new folder:

Note: Upload = Commit (in SVN terms)

1. In the Windows Explorer, right-click on the new folder and select "SVN Checkout".

Note: The new folder will have a question mark against it suggesting that it is not committed to the repository.

2. Specify the "Checkout Directory"

3. Click on "OK".

4. Type in your password.

5. A confirmation message will be seen. The directory will appear with a green tick mark against it.


D. To add a file in the new folder:

1. In the Repository Browser window, click on the folder name that you created. Currently no files will be present.

2. Right-click on the right-side of the window and select "Add file..."

3. Browser your computer and select the file you want to upload.

4. Click on "Open" and "OK".

5. Type in your password again.

6. The file will appear in the repository.


E. To export files from the repository:

1. In the Repository Browser, right-click on the folder/file you want to export.

2. Select "Export...".

3. Specify the "Export directory".

4. Click on OK. Type in your password again.

5. The file will be exported to the location specified, and it will show a confirmation message.


F. To update files:

Note: Download = Update (in SVN terms)

1. In the Windows Explorer, right-click on the file to be updated to the repository.

2. Click on "SVN Update".

3. Type in your password.

4. A confirmation message will appear after the file is updated.



For Linux


Installing Subversion


1. Open the terminal and type: sudo apt-get install subversion

2. It will prompt for the root password.

3. Subversion will get installed.


Installing GUI


1. Select "Applications" from the Main Menu.

2. Select "Add/Remove Applications".

3. Select "All" and "Show: 'All available applications'" in the menu on top.

4. Search for 'svn' and you will see a number of GUI tools .

5. Select "kdesvn" (or any other) and click on "Apply".

6. kdesvn will get installed.

7. Launch the application.

8. Select "File > Open".

9. Enter the URL for the repository: svn+ssh://user@117.121.241.160/var/svn-repos/duke

10. Type in the password, when prompted.


Basic Commands


A. To create a new folder:

1. Select "Subversion > General > New folder" from the menu.

2. Type in the name of the new folder.

3. Type in the password, when prompted.

4. The new folder will appear in the repository.


B. To checkout a repository:

1. Select "Subversion > General > Checkout a repository" from the menu.

2. Specify the target directory.

3. Type in the password, when prompted.


C. To export a repository:

1. Select "Subversion > General > Export a repository" from the menu.

2. Specify the target directory.

3. Type in the password, when prompted.


D. To import/commit/upload a folder or file:

1. Select "Subversion > General > Import folders into current" from the menu.

2. Select the folder. Hit OK.

3. Type in the password, when prompted.

Personal tools