Editing TFS-linked Projects

<< Click to Display Table of Contents >>

Navigation:  More Advanced Procedures > Using Version Control Systems > MS Team Foundation Server >

Editing TFS-linked Projects

Editing a project that is versioned in Team Foundation Server is very straightforward. Unlike local multi-user editing and some other version control systems, you can edit anything in the project 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 TFS 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.

Caution with deleting and renaming topics when working with TFS!!

TFS never forgets. If you delete or rename a topic (by changing its Topic ID), TFS retains the former version of the topic file with its original name in its repository. Not only that, it also blocks the original name for reuse permanently, even though no topic with that name exists in your project any more. If you then try to use that Topic ID again for a topic, you will no longer be able to synchronize that topic with the TFS repository. If this happens with multiple topics your users will have working copies that are increasingly different from the main copy in the repository.

Because of this, you need to be extremely careful when deleting and changing the IDs of topics in your projects when they are versioned in TFS. Ideally, you need to make a note of all IDs that you have changed, because the old versions should never be used again in that project.

You need to synchronize your work with the server

You need to synchronize your work with the master copy on the server. Synchronizing simultaneously gets new material from the server (download) and adds your edits to the server version (upload).

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 less daunting than it may sound at first. In most 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 TFS 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 TFS projects