Pages

Tortoise SVN Installation and Configuration

What is TortoiseSVN?

TortoiseSVN is a free open-source client software for the Subversion version control system. The TortoiseSVN manages files and directories over time. Files are stored in a central repository. The repository is like an ordinary file server, except that it remembers every change ever made to your files and directories. This allows you to recover older versions of your files and examine the history of how and when your data changed, and who changed it.

Download the TortoiseSVN-1.5.5.14361-win32-svn-1.5.4.msi software from this link.

Installation of the Tortoise SVN software


TortoiseSVN comes with an easy to use installer. Double click on the installer file and follow the instructions. The installer will take care of the rest.

You need Administrator privileges to install TortoiseSVN.


 1. Click Next in the Tortoise SVN Setup dialog box.


2. Click I Accept the terms in the License Agreement and then Click Next.



3. Click Next in Location page of Tortoise SVN setup dialog box.



4. Click Install of Tortoise SVN setup dialog box.


  

5. Remove the Check mark of Show Changelog and then Click Finish.


6. Click Yes to restart Tortoise SVN setup dialog box


 To Checkout

TortoiseSVN Checkout to make a fresh checkout in an empty folder. You can check out to any location on your local Hard disk

ü      Checkout the entire tree, including all child folders and sub-folders.

ü      Checkout the specified directory, including all files and child folders, but do not populate the child folders.

ü      Checkouts the specified directories, including all files but do not checkout any child folders.

ü      Checkout the directory only. Do not populate it with files or child folders.

ü      Retain the depth specified in the working copy. This option is not used in the checkout dialog, but it is the default in all other dialogs, which have a depth setting.




1. Click the Red color marked button of the Checkout dialog box



2. Which project you need choose your path and then click OK


3. Ensure that your project path which we will going to checkout and then click OK

4. Click Yes of the TortoiseSVN dialog box.



5. Downloading all the content from SVN Server to our local system



6. Click OK of the SVN Checkout dialog box.



7. You can see green color mark icon of the project checkout





8. Open the checkout folder of green icon the project



Add a file/folder to svn repository

  1. Happening some changes that’s why folder is displaying Red color and creating new document.


2. Creating new sample document files



  1. Type the file name is Sample Document


Add file to svn repository
Assuming you already have a repository, and you want to add a new folder structure to it, just follow these steps:

1. Use the repository browser to create a new project folder directly in the repository.

2. Checkout the new folder over the top of the folder you want to import. You will get a warning that the local folder is not empty. Now you have a versioned top-level folder with unversioned content.

3. Use TortoiseSVN Add... on this versioned folder to add some or all of the content. You can add and remove files, set svn:ignore properties on folders and make any other changes you need to.

4. Commit the top-level folder, and you have a new versioned tree, and a local working copy, created from your existing folder.





1. Ensure that check mark is enabled which file we can add and then click OK


2. File is successfully added and then click OK


SVN Commit

Normally you update your working copy using TortoiseSVN Update. But if you only want to pick up some new files that a colleague has added without merging in any changes to other files at the same time, you need a different approach.

1.File is added that’s why it is plus sign displayed.



2. Select the file and click SVN Commit



3. Type message box to your comments, verify the check mark is enabled in the file name and click OK.


 4. Type the Username, password and then click OK

  
5. Verify the files added to svn Repository.


6. Now file is committed displaying green mark icon



7. Now some changes happen this document that’s why it is colored in red mark.


SVN update


1. Right click the selected file and click SVN Update.



2. Click OK to SVN updated dialog box.


Committing Your Changes to the Repository


Sending the changes you made to your working copy is known as committing the changes. However, before you commit you have to make sure that your working copy is up to date. You can either use TortoiseSVN Update directly. Alternatively, you can use TortoiseSVN Check for Modifications first, to see which files have changed locally or on the server.

The Commit Dialog
If your working copy is up to date and there are no conflicts, you are ready to commit your changes. Select any file and/or folders you want to commit, then right click the file and then click TortoiseSVN Commit....
  



1. Type the message box to your comments, verify the check mark is enabled in before the file name and then click OK.



2. Type the Username, password and then click OK.


3. Verify the files are committed in svn and then click OK.


Show log


1. Select the file or folder in which you need to revert the changes. If you want to revert all changes, this should be the top-level folder.

2. Select TortoiseSVN Show Log to display a list of revisions. You may need to use Show All or Next 100 to show the revision(s) you are interested in.

3. Select the revision you wish to revert. If you want to undo a range of revisions, select the first one and hold the Shift key while selecting the last one.

4. Note that for multiple revisions, the range must be unbroken with no gaps. Right click on the selected revision(s), and then select Context Menu Revert changes from this revision.

5. Or if you want to make an earlier revision the new HEAD revision, right click on the selected revision, then select Context MenuRevert to this revision. This will discard all changes after the selected revision.

You have reverted the changes within your working copy. Check the results, and then commit the changes

1. Verify the green mark is displayed, select the file to right click, and then click show log


  1. Verify the who are the users editing this document


3. If you want old version of this files you can select which version you need right click the version and click save to your local hard disk or open.


1. Select the file click revert changes from the version. To publish your changes to others, you can use Subversion's commit command.



2.If click YES you can reverted by reversese merging the revision into your working copy.





3. Click OK to Merge dialog box.


Resolving Conflicts

1. You will get a conflict when you update your files from the repository. A conflict occurs when two or more developers have changed the same few lines of a file. that time it will conflicted and displayed yellow color triangle symbol.As Subversion knows nothing of your project, it leaves resolving the conflicts to the developers. Whenever a conflict is reported, you should open the file in question, and search for lines starting with the string <<<<<<<. The conflicting area is marked like this:

<<<<<<< Filename your changes ======= code merged from repository >>>>>>> revision

Also, for every conflicted file Subversion places three additional files in your directory:

filename.ext.mine

This is your file, as it existed in your working copy before you updated your working copy - that is, without conflict markers. This file has your latest changes in it and nothing else.
filename.ext.rOLDREV

This is the file that was the BASE revision before you updated your working copy. That is, it the file that you checked out before you made your latest edits.

filename.ext.rNEWREV

This is the file that your Subversion client just received from the server when you updated your working copy. This file corresponds to the HEAD revision of the repository.

You can either launch an external merge tool / conflict editor with TortoiseSVN Edit Conflicts or you can use any other editor to manually resolve the conflict. You should decide what the code should look like, do the necessary changes and save the file.

Afterwards execute the command TortoiseSVN Resolved and commit your modifications to the repository. Please note that the Resolve command does not really resolve the conflict. It just removes the filename.ext.mine and filename.ext.r* files, to allow you to commit your changes.

If you have conflicts with binary files, Subversion does not attempt to merge the files itself. The local file remains unchanged (exactly as you last changed it) and you have filename.ext.r* files. If you want to discard your changes and keep the repository version, just use the Revert command. If you want to keep your version and overwrite the repository version, use the resolved command, then commit your version.

You can use the resolved command for multiple files if you right click on the parent folder and select TortoiseSVN Resolved... This will bring up a dialog listing all conflicted files in that folder, and you can select which ones to mark as resolved.



2. This time we will select the uploaded files and delete the files


3. Now select the files and click svn update.



Lock/Unlock


ü      You are using “unmergeable” files, for example, graphics files. If two people change the same file, merging is not possible, so one of you will lose their changes.

ü      Your company has always used a locking revision control system in the past and there has been a management decision that “locking is best”.

Avoid Breaking and Stealing Locks

If you break or steal someone else's lock without telling them, you could potentially cause loss of work. If you are working with unmergeable file types and you steal someone else's lock, once you release the lock, they are free to check in their changes and overwrite yours. Subversion does not lose data, but you have lost the team-working protection that locking gave you.

 1. Verify the files green color mark icon displayed and you can lock your files another user cannot edit, read, and delete.


 2. Type Username, Password and then click OK



3. Verify the files are getting lock symbol now.



4. Right click the files click Release Lock


5. Verify the check mark is enabled in file name of Unlock dialog box and then click OK





6. Type Username, Password and then click OK



7. It is getting Error because trying to another user unlock the files.


8. Type Username, Password and then click OK


9. Right now unlocked the files because file owner has unlocked.



10. Verify the files have been unlocked and green color mark icon displayed.


.11. If not reachable owner of the file, we can Break Lock file


12. Verify the checkmark is enabled of the file name of Unlock dialog box.


13. Type the Username, password and then click OK



14. Verify the file has been Unlocked successfully.


Cleanup


1.If a Subversion command cannot complete successfully, perhaps due to server problems, your working copy can be left in an inconsistent state. Files it will showing getting lock and you Clean Up after try it.

ü      In that case, you need to use TortoiseSVN Cleanup on the folder.
ü      It is a good idea to do this at the top level of the working copy.
ü      Cleanup has another useful side effect. If a file date changes but its content does not, Subversion cannot tell whether it has really changed except by doing a byte-by-byte comparison with the pristine copy.
ü      If you have many files in this state, it makes acquiring status very slow, which will make many dialogs slowly to respond. Executing a Cleanup on your working copy will repair these “broken” timestamps and restore status checks to full speed.



Repo Browser


  1. Right click anywhere in the windows explorer select Tortoise svn and click Repo Browser


  1. You can browse SVN Repository


Posted in |

0 comments: