merge /discard reports 'No Pending Changes' when /candidate shows them

拜拜、爱过 提交于 2019-12-07 08:35:32

问题


I'm trying to run a merge /discard command (tfs merge /discard /version:nnn:yyy $/sourceproj $/targetproj /recursive) but it says there are no pending changes.

If I run a tfs merge /candidate $/sourceproj $/targetproj it shows the relevant changesets as candidates.

any ideas why this happens and how to get round it?

Thanks.


回答1:


If you know the exact changeset number try:

tf merge /discard /version:C111~C111 BranchX BranchY /recursive

This assumes you know the changeset number (in this case 111).

If that doesn't work, then can you update your question to give the exact values you are entering along with the output for the candidate check?




回答2:


You may have cloaked/not mapped some of the target paths that are affected by the merge candidate. As there is no file that could be checked out for the merge, those files will ignored, resulting in the strange behaviour. Consider this structure:

/branch-A
   /SomeFolder
   /OtherFolder
/branch-Main
   /SomeFolder
   /OtherFolder [CLOAKED]

When the changeset contains /branch-A/SomeFolder and /branch-A/OtherFolder and you try to merge from branch-A to branch-Main in this workspace, only SomeFolder will be merged, resulting in a partial merge of the changeset and thus appearing again as candidate. You will never be able to merge (or merge/discard) the changes for OtherFolder until you map /branch-Main/OtherFolder in your workspace.

BTW: Generally only the merge TARGET paths must be mapped in a workspace when merging, so you could very well merge /branch-Main/OtherFolder to /branch-A/OtherFolder in the sample workspace above.



来源:https://stackoverflow.com/questions/6897031/merge-discard-reports-no-pending-changes-when-candidate-shows-them

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!