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.

You might need to resolve conflicts when merging changes between branches, getting<br />

files into your workspace, or checking in new versions of files. There are three conflict<br />

types:<br />

• Version – The file has evolved along divergent paths. This could be the result of a<br />

file edit, rename, delete, or undelete operation.<br />

• File Name Collision – Two or more items are trying to occupy the same path.<br />

• Local Overwrite – Only occurs during a get operation, if you are trying to<br />

overwrite a local, editable file.<br />

Most conflicts can be resolved automatically; version conflicts are the only conflict type<br />

that might result in a manual merge operation. Manual merge is most common in the<br />

following scenarios:<br />

• A file has been edited in both branches, <strong>with</strong> changes to the same lines of code.<br />

• A baseless merge is being conducted in which the branch file relationships are not<br />

known to TFS.<br />

The merge tool shows you the details for each conflict and allows you to choose which<br />

change you want to keep in the final merged file. You can choose to keep the source<br />

change or the destination change, integrate both changes, or manually modify the final<br />

version by typing directly into the file.<br />

After resolving every conflict in the file, save the final version as a pending change to be<br />

checked into the target branch.<br />

Be careful when merging because it is easy to make mistakes that may result in build<br />

instability. After you have finished merging, compile the resulting source and run unit<br />

tests to test for major breaks.<br />

Additional Resources<br />

• For more information about resolving conflicts, see “How to: Resolve Conflicts” at<br />

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

Builds<br />

• How to use TFS to perform Continuous Integration builds<br />

How to Use TFS to Perform Continuous Integration Builds<br />

To perform continuous integration and rebuild your project every time a file is checked<br />

in, you need to use a Web service to trigger the build process. You subscribe the Web<br />

service to check-in events so that the build is triggered each time someone checks in a<br />

file. To trigger the build, you also need to use an appropriate build type that determines<br />

what configuration is built, what post-build steps and tests are executed, what drop<br />

location is used, and so on.

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

Saved successfully!

Ooh no, something went wrong!