Jump to content

Merge to parent


Soho

Recommended Posts

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

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

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

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:

post-112-0-05864000-1344851986_thumb.png

post-112-0-59369700-1344851993_thumb.png

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...