Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#2984 closed help (answered)

Merging branches

Reported by: Leighton_Regayre Owned by: ros
Component: FCM Keywords:
Cc: Platform: PUMA
UM Version:

Description

Hello,

I'm attempting to merge a branch containing code edits with a copy of the trunk which I've already merged with some minor code changes.

Following UM tutorial guidance, I'm in the folder of my trunk copy where I want the merged result to be and enter:
fcm merge fcm:um.x_br/dev/leightonregayre/r72129_ACURE_PPE_parameter_code_changes@73522

but get an error:
target and … source not directly related.

I'm confused by this since both objects are copies of the 11.1 trunk. Is it because my r72129_ACURE_PPE_parameter_code_changes is a branch of a branch?

Thanks,

Leighton.

Change History (7)

comment:1 Changed 11 months ago by ros

Hi Leighton,

I suspect the answer to this question is yes, but can you please point me to the UM trunk folder you are trying to merge into so I can check.

Regards,
Ros.

comment:2 Changed 11 months ago by Leighton_Regayre

Hi Ros,

Sorry for omitting that detail.

My copy of the trunk where I'm trying to merge into is here:
/home/Leighton_Regayre/BLN/vn11.1_ACURE_merged_code

Thanks,

Leighton.

comment:3 Changed 11 months ago by ros

  • Owner changed from um_support to ros
  • Status changed from new to accepted

Hi Leighton,

Ok, yes I can see this is indeed because the r72129_ACURE_PPE_parameter_code_changes branch is not directly related to vn11.1_ACURE_merged_code. It's a decendent of vn11.1_BLN_5percent_SOA. So an FCM automatic merge will not work here. We'll need to do a subversion custom merge. I'll send along instructions in a short while.

For future reference branches of branches should be avoided. And if they are absolutely necessary should only be used when they will eventually be merged into the parent branch not a sibling. Including a branch of a branch in a suite can have unintended side-effects.

Cheers,
Ros.

comment:4 Changed 11 months ago by Leighton_Regayre

Hi Ros,

It looks like I've made things unnecessarily hard for myself by making a branch of a branch. This was unintentional and I'll not do it again.

I have a good record of the code changes I've made. Rather than doing a subversion custom merge, would it be easier to simply overwrite the files I've changed in the location where I'd like the merge to happen? Obviously, this might be a little slow but is straight-forward.

Thanks,

Leighton.

comment:5 Changed 11 months ago by luke

Hi Leighton,

Generally I found that a branch-of-branch (BoB) is only helpful when developing changes for the trunk when one is needed for that process.

When working with the UM usually it's best to make a new branch from the trunk at the version you want and then merge-in the changes from another branch you have before making further changes. You should be able to make a patch file using fcm diff on your BoB and then apply that file using the patch command to a new branch with the base branch merged in, if that makes sense.

Thanks,
Luke

comment:6 Changed 11 months ago by ros

  • Resolution set to answered
  • Status changed from accepted to closed

comment:7 Changed 11 months ago by ros

  • Component changed from UM Model to FCM
  • Platform set to PUMA
Note: See TracTickets for help on using tickets.