Soho Posted August 9, 2012 Report Share Posted August 9, 2012 Sometimes when a branch contains a lot of changes it is inconvenient to merge the branch to it's parent. The current procedure is to switch branch to the parent and then merge from the child. When switching, Plastic will delete added files and replace changed files which can take some time with a large change. When merging Plastic replaces all those files again. This could be avoided if you were able to merge to a parent branch rather than the current switch / merge from procedure. Actually, when doing task-per-branch version control, the extra switch-to-parent-branch step can be disturbing. Intuitively what you want to do is to merge your changes TO the parent and then switch branch to the parent. Not the other way around. It's a subtle difference, but I have noticed several developers being a bit confused about the merge routine in the beginning. In short, a "merge to" context menu in the branch explorer or even "merge to parent" would be a great convenience. A bonus would be if Plastic didn't first remove added files and rolled back files changed only in the child branch before starting the merge. Link to comment Share on other sites More sharing options...
manu Posted August 9, 2012 Report Share Posted August 9, 2012 Totally agree http://codicesoftware.blogspot.com/2012/07/merge-to-merging-on-fly.html Link to comment Share on other sites More sharing options...
Soho Posted August 9, 2012 Author Report Share Posted August 9, 2012 Great, I didn't see it in the advanged merge menu until now! It didn't work however. When merging from a subbranch of /main back to /main I got the message that merge-to could not be executed since there were conflicts. However, no changes had been made to /main since the subbranch was created, so there cannot be any conflicts. I do have a single config file marked both with hidden changes and cloaked. Could this be the one causing merge-to to fail? The merge also did contain a wxlink merge. Merging the old way with merge from worked uneventful. No errors, no conflicts. Link to comment Share on other sites More sharing options...
manu Posted August 9, 2012 Report Share Posted August 9, 2012 Yes, if there are conflicts the merge-to is not going to do anything. But, I'm wondering why are you having conflicts.... Can we try a fast gotomeeting session? Link to comment Share on other sites More sharing options...
asukhinin Posted August 11, 2012 Report Share Posted August 11, 2012 I am having a similar problem with the "merge-to" command. If I try to merge some changes from a feature branch to the main branch I get an error: "The "Merge-To" operation cannot be executed because the merge from changeset cs:31 to branch br:/dev has conflicts. It is necessary to run a "Merge from" operation from a workspace to resolve those conflicts" Although, if I run "Merge from" operation from the main branch I DO NOT HAVE ANY CONFLICTS. The change that I was trying to do in the feature branch was just a simple editing of one line in one file. P.S. You may consider fixing your spelling of "neccesary" in the error message. Link to comment Share on other sites More sharing options...
mipi3 Posted August 13, 2012 Report Share Posted August 13, 2012 Hello, I receive this message too. Merge passes with no problems when merging from the parent branch. Link to comment Share on other sites More sharing options...
manu Posted August 13, 2012 Report Share Posted August 13, 2012 Hi guys, it's quite interesting, if the regular merge doesn't complain about conflicts the merge-to should work. I'll ask you for information in order to see if I'm able to reproduce the issue. I need the result of this commands: cm ls / -R --tree=BaseCsetNumber --format="{7} {13} {2} {11}" > base.txt cm ls / -R --tree=SourceCsetNumber --format="{7} {13} {2} {11}" > src.txt cm ls / -R --tree=DestinationCsetNumber --format="{7} {13} {2} {11}" > dst.txt You can discover the base, dst and source changesets numbers by clicking in the explain merge button on the merge view: Link to comment Share on other sites More sharing options...
mipi3 Posted August 16, 2012 Report Share Posted August 16, 2012 Hi manu, it's easy to reproduce this error if you will use xlinks. I have 4.1.10.333 version installed. Link to comment Share on other sites More sharing options...
manu Posted August 16, 2012 Report Share Posted August 16, 2012 That was my suspicion, I'll give it a try ASAP. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.