Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apply specific changeset from one TFS instance to another

What is the easiest way to apply the changes from a specific changeset from one TFS instance on another instance?

What I want is to get some sort of patch file from instance A that I can apply to instance B. Since there are two different instances, a traditional branch/merge approach cannot be used. And as far as I know, TFS has poor support for patch files in the traditional Unix-sense.

Do I really need to inspect a changeset on instance A and manually zip the relevant files which I can then extract into the source tree of instance B?

like image 907
Tormod Fjeldskår Avatar asked Sep 26 '12 12:09

Tormod Fjeldskår


2 Answers

Turns out that the "patch" route was a dead end due to lack of support in TFS. The solution we ended up with was to perform a nightly job which basically does the following:

  1. Get all code from remote repo with a read-only user.
  2. Overwrite all content of a separate branch in our repo with the content from the other.
  3. Perform a merge from that separate branch to the main branch whenever we want to bring their changes into our main branch.
like image 180
Tormod Fjeldskår Avatar answered Sep 28 '22 01:09

Tormod Fjeldskår


This answer explains how to create a patch file using the tf diff command. However, there is no built-in way to apply that patch file to another instance or branch. I have not seen any third-party tools to do so either.

like image 29
Holistic Developer Avatar answered Sep 27 '22 23:09

Holistic Developer