Jump to content

Merging Workflow Issues


ziflin

Recommended Posts

We're trying to figure out how to properly handle the follow (common to us) use case:
 

* I'm working in a branch and have pending changes.  

* I want to pull in changes from Main (or some other branch) and merge with those *before* I commit so that I do not leave the current branch in a partially broken state because I'm not don't with my pending changes.

* If I "Merge from Branch X" then I am unable to undo any changes that I may have made because of the error "Cannot perform a partial undo if there are pending merge links.  Please, repeat the operation including all pending changes."

 

I feel like this is a fairly common operation and I do not remember having any problems doing this with Git.  What is the correct workflow in Plastic?

 

 

 

Link to comment
Share on other sites

Hi,

 

You can run the "shelve" operation with your pending changes, the perform the merge from themain branch and finally apply your shelved changes to your workspace again. In Plastic, is not possible to perform partial undo when there are merge links involved.

 

Regards,

Carlos.

Link to comment
Share on other sites

I don't suppose there is some way to automate these steps?  We're currently working on new code and are merging into task branches quite often.

 

Does the "Preferences/Other Options/Behavior when trying to switch/update the workspace with changed items" apply here so we at least know the shelve then merge?  Or was this for something else?

 

Thanks!

Link to comment
Share on other sites

Hi,

 

The only scenario I think you could find useful the shelve operation is when you need to undo partial chnages when merge links are involved.

 

In a common scenario, you can perform changes in your workspace, then perform a merge and finally commit both changes. In this case, the shelve operation wouldn´t be necessary.

 

 

The option you mention allows you to switch your workspace to a different changese when you have pending changes, but you will lose the changes. That´s the reason why, by default, it´s not allowed.

 

Regards,

Carlos

Link to comment
Share on other sites

I think the main issue we had was that we ended up in a situation where we couldn't undo a file after doing the 'common scenario' that you mention.  Then we were basically stuck or we had to go manually revert the file.  Is there some other option I missed to have it revert to the merge's 'source' file? I guess the issue here is that you could have merged in from multiple changesets?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...