26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

lines of code. Conflicts on the same lines of code require manual conflict resolution,<br />

which complicates the merge operation. Effective team communication is the key.<br />

Before starting work on a file, make sure that you have the latest version from source<br />

control and check to see if anyone else has the file checked out before you begin work. If<br />

a colleague has the file checked out, ask your colleague what he or she is working on and<br />

then decide if you can wait until they complete their changes or if it is safe to continue to<br />

work in parallel on the same file because you are working on separate functionality in<br />

separate source code regions <strong>with</strong>in the file.<br />

To check if someone else has a file checked out<br />

1. In the <strong>Team</strong> Explorer window in <strong>Visual</strong> <strong>Studio</strong>, double-click Source Control.<br />

2. Browse to the folder containing the file you want to check in the source control folder<br />

hierarchy.<br />

Any pending changes are listed together <strong>with</strong> the username of the user who owns<br />

those changes.<br />

To check which files people currently have pending changes for, run the following<br />

command from a <strong>Visual</strong> <strong>Studio</strong> 2005 command prompt window.<br />

Tf status /format:detailed /user:*<br />

When you do begin working on a source file that you know others will work on in<br />

parallel, let other team members know that you are working on the file and which aspects<br />

you will be updating.<br />

Additional Resources<br />

• For more information on viewing pending changes in your workspace, see “How to:<br />

View and Manage All Pending Changes in Your Workspace” at<br />

http://msdn2.microsoft.com/en-us/library/ms181400(VS.80).aspx<br />

• For more information on viewing pending changes in other workspaces, see “How to:<br />

View Pending Changes in Other Workspaces” at http://msdn2.microsoft.com/enus/library/ms181401(VS.80).aspx<br />

Checkout, Get, and Lock<br />

• Get the latest source before making changes.<br />

• Use the lock command <strong>with</strong> discretion.<br />

• Communicate <strong>with</strong> your teammates when locking files.<br />

Get the Latest Source Before Making Changes<br />

To make sure that you have the latest versions of all the source files for the project you<br />

are working on, run a get latest command before you check out a file for editing. The<br />

danger of not doing so is that locally building your code against non-current source files

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!