简体   繁体   中英

TFS Merge: Cannot discard a changeset

We have a changeset where the developer has checked in changes to both source and target branch, many changes including renames in both branches. The merge of the the changeset from source to target branch goes fine, but the changeset remains in the list of changesets to be merged.

When I now try to merge the changeset again, it says "There are noe changes to merge.". And the changeset remains in the queue.

We have tried to use the command line tool to discard the changeset like this:

C:\\src\\project\\sourceBranch>tf merge /discard /recursive /version:C8137~C8137 $/Project/sourceBranch $/ Project/targetBranch

This did not help. We have also tried using other options like /force and /baseless with no luck.

What other possibilities are there of getting rid of the changeset among the merge candidates?

Ok, so basically you have a changeset with items that belong to two branches that are directly related. Which makes the merge of such changeset using the "partial changeset" subcomponent of the changeset.

Let me explain with a better way:

  • CS1234 (your changeset)
    • Partial CS1234A for branch A (say the source branch)
    • Partial CS1234B for branch B (say the target)

You did a merge from A to B, which merged CS1234A to B.

Now when you attempt a new merge still from A to B, you still have CS1234 as a candidate, right ? Then if you select it, nothing is done, which is totally understandable due to the fact you already merged CS1234A and CS1234B does not belong to the source branch (A).

Looks like a bug from TFS to me that I already ran into, I thought Microsoft fixed it with the TFS 2010 RTM, apparently not.

Basically TFS gives you CS1234 as a candidate because only a partial part of it was merged, but as the other partial part can't be merge, it doesn't make sense to give it as a candidate.

What about:

You initiate a merge from B to A (in the reverse way), does CS1234 is given as a candidate ? My assumption is if you merge CS1234 from B to A then you won't be bother again with this changeset when you'll display the candidates from A to B. But I don't know if it's something you're willing to do.

Anyway you should fill a bug at the Microsoft Connect site

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM