문제

I have already delivered 3 changesets for given work item. Anyway I believe that it should be one changeset only. How can I merge these changesets into one changeset?

도움이 되었습니까?

해결책 2

If those change sets are already delivered to the stream, you can't.

If by "deliver", you mean "change set associated to a work item, but not yet delivered to the stream, then you can move files and directories from two of those change sets to the third, and then "discard" those two (now empty) change sets.

That means those change sets aren't "completed" (they haven't yet a green tick as an overlow on their triangle-shaped icon).
A change set gets completed when it is part of a baseline, or delivered to a stream.

다른 팁

Re: "I believe that it should be one changeset only". It isn't necessary, but I understand the desire to have one change set encapsulating all the work. It makes it easier to deliver from stream to stream, resolve conflicts and avoid gaps.

As VonC said, you can't technically merge the change sets, however, you can create a new change set with equal changes. It's a bit of work, and they'd all have to be in the same component. Change sets cannot span components. Also, if there are gaps between the change sets, you'll have some merging to do. Here are the general steps.

  1. Sync up with your repository workspace's flow target, by accepting all incoming changes.
  2. Discard the three completed change sets from your repository workspace. The next step is the trick.
  3. In the Pending Changes view select the component and choose the context menu action to "Replace in ", where is your flow target. That will take the configuration of the component in your repository workspace, only missing the three change sets, and replace it in the flow target stream. Now you've "undelivered" the three change sets.
  4. Accept the three change sets back into your repository workspace. They should now be the only outgoing change sets in the component, just as if you hadn't delivered.
  5. Select the three change sets you want to merge and create a patch from them.
  6. Remove the change sets from the work item.
  7. Discard the change sets.
  8. Apply the patch back to your sandbox.
  9. Check the changes into one new change set.
  10. Associate the new change set with the work item.
  11. Deliver the new change set. Done.

As you can see, it's not a trivial task, and so you likely won't do it that often, unless somehow your team process requires you to do so.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top