Editing a project that is versioned in a Subversion repository is much more straightforward than one versioned in Visual SourceSafe. Unlike VSS, SVN allows you to edit everything without any restrictions at any time. No files or other components are ever locked for you. Also, you do not have to have a connection to the SVN server to edit your local working copy. This means that you can always work on your project. For example, you can work on it at home, or when you are flying across the Atlantic in a plane.
As always, however, there is no free lunch. This freedom comes at a cost: You also need to be aware that you are going to have to synchronize your work with the master copy in the SVN repository. If you have edited the same text as someone else, there will be a conflict and you will have to decide which version is going to be kept, yours or theirs. This won't happen if you edit different parts of the same topic that don't conflict with each other; those will be merged silently. You will only get conflicts if you both edit exactly the same text, so that there are different versions of it.
This is all actually less daunting than it may sound at first. In the majority of cases all team members' work will be merged into the master version without problems. The easiest way to avoid conflicts is to have clear guidelines in your team defining who is responsible for which sections of your project.
If you have access to the SVN server, always synchronize with the master copy before you start working. And always synchronize again after you have finished. However, don't synchronize until you are finished! Otherwise other team members could get confused by seeing your half-finished edits and might even try to correct them!
You open an SVN versioned project in exactly the same way as any other project. The only difference you will notice is the version control overlay icons in the table of contents, which show the current synchronization status of your topics.
Green icons mean your changes have been synched – but there may still be updates on the server!
When all the icons are green it means that all your changes in your local working copy have been synchronized with the SVN repository. However, if you are starting work it is quite possible that other authors have made changes to the master project in the meantime. So if you have access to the server, you should always select Synchronize SVN in the Project tab to get all the latest updates before you start work. (See further below in this topic for information on the Refresh Project tool in SVN versioned projects.)
If all the icons are green when you start synchronizing they will stay green afterward, because everything will still be up to date.
Editing an SVN versioned project is exactly the same as editing a normal project. Unlike a Visual SourceSafe project, you will never experience that a topic is locked for editing. The only difference you will see is that the SVN overlay icons in the TOC will change as you edit and add topics.
At the end of your editing session you should synchronize your work with the SVN server again so that the other authors in the team have access to your changes. Of course, this is only possible if you have access to the server, but you should always do it as soon as you can.
When you synchronize your project with the repository on the server, the sysetm checks whether there are any conflicts between your changes and the master version. If there are, the diffing editor will be displayed so that you can resolve the conflicts.
The topic highlighted in red contains a conflicts that the has found. This means that two authors have changed exactly the same text in different ways in those topics or other files.
Right-click on the conflicted file to display the conflict context menu:
Resolving the conflict quickly with the context menu:
If you are sure about whose changes are correct, you can resolve the conflict directly with this menu:
•Revert will eliminate all your changes and return to the original version from the repository.
•Resolve using Theirs replaces the conflicted text with the version from the repository. Any other changes you have made in the topic will be preserved.
•Resolve using Mine replaces the conflicted text in the repository with your version. Any unconflicted changes made by other authors will be preserved.
Checking and resolving individual conflicts with the diffing editor:
Usually, however, you will want to check the conflict with the diffing editor. To do this select Edit Conflicts, which displays the editor:
The editor is set up to show the version in the repository on the right (Their File) and your version on the on left (My File).
Important: You can only copy from right to left!
1.Scroll through the file and compare the server versions (right) of each conflict with your version (left).
2.Click the yellow arrow to the left of the server version conflict to overwrite your local copy with the server version for that conflict.
3.If you want to keep your version of a conflict, do nothing. It will overwrite the server version in the final step when you re-synchronize.
4.When you have checked all the conflicts click on the green Accept left side button at the top left to confirm that your modified local version is the version that should now be used to resolve all the conflicts.
5.Close the diffing editor. The status of the file will be changed from "Conflicted" to "Modified".
6.Repeat for all conflicted files. You can then synchronize again and the synchronization will go through without conflicts.
•Lines containing conflicts are highlighted in pink. The actual conflicts are shown in red. If you click on a conflict in the right box you will see a small yellow arrow in the left margin. Clicking on this arrow copies the server version of the current conflict to the left, overwriting your version.
•If there are multiple conflicts you can step through them with the Up/Down arrows in the toolbar.
•You can copy ALL the server versions of the conflicts to the left side with the yellow Left arrow in the toolbar.
•When you are satisfied with your changes click on Accept left side to complete the conflict resolution.
The Refresh Project tool next to the Synchronize SVN tool is not directly relevant for SVN versioned projects:
This tool does not have any effect on synchronization with SVN. It is only relevant if multiple users are editing the SAME project using Help+Manual's normal multi-user editing mode. Then the Refresh Project tool updates the changes made by other users editing the same project.