Editing SVN-linked Projects

<< Click to Display Table of Contents >>

Navigation:  More Advanced Procedures > Using Version Control Systems > Subversion (SVN) >

Editing SVN-linked Projects

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.

Have clear guidelines on who is responsible for specific project parts

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.

Synchronize before and after your work

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!

Click to expand/collapseOpening and synchronizing your project
Click to expand/collapseEditing your project and synchronizing your work
Click to expand/collapseResolving conflicts with the diffing editor
Click to expand/collapseThe Refresh Project tool in SVN projects