How does TFs merge unchecked files across branches?

Source: Internet
Author: User

Last night, I had a nightmare. Ruined2A set of weapons, eat countless medicines and pills, and use up coins. Finally, Hua Xiong was killed.
At the same time, I also thought about how to transfer a large numberCodeA proper transfer method.

1.Get file list

FirstVSOpenPending changesWindow: View->Other windows->Pending changes
Select the text conditions to be transferred, and then clickShelve, EnterShelve Set NameAnd then removeRetain pending changes locallyOption, PointShelveConfirm.
Note that the local pending changes have been revoked.

 BackPending changesWindow, selectCancel Shelving, InCancel ShelvingWindowResultSelect the shelving set in the list and clickCancel ShelvingConfirm.

Now, the files that have been shelved are returned to the local machine.

 

Then, openOutputWindow: View->Output
InExplicit output belowSelectSource codeManagement-Team Foundation
You can see a string like:

Cancel$/Project/... /*.*Change Shelving

File List, cut all these lists to the text editor you are familiar with, remove the first and last parts, only keep the directory in the branch

For example, the orange part:

Cancel$/Project/sources-brch-0.0.62/Gameengine/FSM/State. cppChange Shelving

Cut the entire list and paste it for backup.

 

2.Merge code

Obtain the target branch to be transferred (it is recommended that you obtain the latest code to avoid merging multiple times)

UseBeyond compare 3Compare two branch directories.

InBeyond compareSelectFile Filters
Paste the file list on the clipboardInclude filesInternal
Beyond compareInternal SelectionShow no orphans,Only compare files

In this case, only all pending change files are listed.

Manually confirm and merge your modifications.Please note that you need to be very careful here!
Because yes2Code of different branches,BeyondcompareThe differences listed are not only the changes you need to make.
 

3.Check out target code

Create under the target codeCheckout. batFile, the content is as follows

Call "% vs80comntools % vsvars32.bat"

For/F "" % I in (Filelist.txt) Do TF checkout % I

CreateFilelist.txtThe content is the list of clipboard files.
Double-clickCheckout. batCheck out all the files in the list after running.
 

4.Last check-in

We suggest you try againReviewAll the files to be checked in.

 

Thank you for reading the entire process!
Kaikai

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.