1

I have a branch created some time ago in TFS of our main trunk branch. I've periodically been merging trunk->branch to keep it up to date and now I'm ready to push back to trunk.

I have modified about 10 files in 3 projects, however when doing the merge TFS marks 7000 files as modified, seemingly every file in the branch. I can see that the files are nor modified in every case I check but I don't dare check them in without checking every file and clearly that's no good in this case!

In the Source Control Explorer view, all these files and folders are marked as "merge" in the "Pending Change" column.

Can I fix things somehow or do I need to undo the merge and manually merge only the files I know I actually modified, breaking the whole point of merging?

Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
  • Did you move the files around in your branch? – Lukkha Coder Oct 24 '14 at 16:49
  • No, the two branches are almost identical. At one point I rolled my branch back to an earlier state and then merged from trunk again (undoing that roll-back) which is all I can think of, but I can't be sure. If I could undo checkouts on all files that are identical it might help – Mr. Boy Oct 24 '14 at 16:51
  • Sounds similar to http://stackoverflow.com/questions/13369310/how-do-i-avoid-having-to-merge-every-file-in-our-repository-after-a-baseless-mer – DaveShaw Oct 24 '14 at 16:58
  • Yeah it does, except it isn't a baseless merge, I can verify the branch is a direct child of trunk by viewing it's hierarchy in VS/TFS – Mr. Boy Oct 24 '14 at 17:01
  • Was the trunk project structure modified? – Lukkha Coder Oct 24 '14 at 17:22
  • Are they pended as **merge**, or are they marked **merge, edit**? – Edward Thomson Oct 24 '14 at 17:27
  • I have the same issue, most of the files are marked as **merge** (some are **merge, edit** but these are the ones I editted), and when diff'ing them they are identical... – Philippe Dec 02 '15 at 16:06

1 Answers1

0

Reasons for this might be one of the listed items in Why are all files marked with 'merge' in TFS?

But there are other cases as well:

  • Another branch of the target branch had itself a branch that was renamed then merged to the child branch then that child branch was merged to your target branch;
  • There was a move or rename of your branch and it was rolled back (but you can see it in the changesets still);

The way I solved it was to do a merge using the "Selected changesets" instead of "All changes up to a specific version". Then in the following dialog, exclude the renaming attempts.

Once this is done, you will still have these changesets in the history bugging you for every merge, so you might want to discard them with "tf merge /discard".

Community
  • 1
  • 1
Philippe
  • 3,945
  • 3
  • 38
  • 56