How to resolve a "Conflict adding files to *. Moved to root"

Asked by Yannick Vaucher @ Camptocamp

Hello,

Here I need some help with bazaar.
I was merging the changes of a revision from a branch (A) into an other (B) as I did dozen of times.

This time though it happened that the merge generated some conflicts.

All what I did in my branch (A) was adding a folder and its content to the root.
And I took this specific change in branch B with a

└─> bzr merge -c31 lp:c2c-addons/6.0
+N action_rule_trg_dates/
+N action_rule_trg_dates/__init__.py
+N action_rule_trg_dates/__openerp__.py
+N action_rule_trg_dates/action_rule.py
+N action_rule_trg_dates/action_rule_view.xml
+N action_rule_trg_dates/i18n/
+N action_rule_trg_dates/security/
Conflict adding files to action_rule_trg_dates. Moved to root.
1 conflicts encountered.

In this exemple I'm trying to merge revision 31 of lp:c2c-addons/6.0 in lp:c2c-addons revno 28

Could you tell me what am I doing wrong and what to do in such case ?

Regards
Yannick

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jelmer Vernooij (jelmer) said :
#1

Am 23/12/11 14:45, schrieb Yannick Vaucher @ Camptocamp:
> New question #182736 on Bazaar:
> https://answers.launchpad.net/bzr/+question/182736
>
> Hello,
>
> Here I need some help with bazaar.
> I was merging the changes of a revision from a branch (A) into an other (B) as I did dozen of times.
>
> This time though it happened that the merge generated some conflicts.
>
> All what I did in my branch (A) was adding a folder and its content to the root.
> And I took this specific change in branch B with a
>
> └─> bzr merge -c31 lp:c2c-addons/6.0
> +N action_rule_trg_dates/
> +N action_rule_trg_dates/__init__.py
> +N action_rule_trg_dates/__openerp__.py
> +N action_rule_trg_dates/action_rule.py
> +N action_rule_trg_dates/action_rule_view.xml
> +N action_rule_trg_dates/i18n/
> +N action_rule_trg_dates/security/
> Conflict adding files to action_rule_trg_dates. Moved to root.
> 1 conflicts encountered.
>
>
>
> In this exemple I'm trying to merge revision 31 of lp:c2c-addons/6.0 in lp:c2c-addons revno 28
>
>
> Could you tell me what am I doing wrong and what to do in such case ?
The root directory has a different file id in both situations - this
causes bzr to consider the root in both trees to be different, and so it
generates a conflict.

We could probably handle this a bit better.

The best way to work around it is probably to just move the files back
to action_rule_trg_dates manually and then resolve the conflicts. You
will have to add this once for each file that is added this way though.

Cheers,

Jelmer

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) said :
#2

Thanks for your answer.

Well ok so we will do it the pedestrian way.

Looking forward for a better handling as with multiple revisions with the same issue it could be quite anoying.

Cheers,
Yannick

Revision history for this message
Graham Horler (pysquared) said :
#3

This worked for me (source branch "b1"):

bzr init b2
cd b2
bzr pull -r1 ../b1
bzr uncommit
bzr revert

Now you have an empty branch "b2", with the same root directory id as "b1".

So this works without any conflicts:

bzr merge ../b1 -r123..

Hope this helps.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) said :
#4

Hello Graham,

Interesting way of creating a new branch however in my case I had two branches under different versions.

I tried using your way but I didn't suceed to merge my change from a branch to another without conflict.

Regards,
Yannick

Can you help with this problem?

Provide an answer of your own, or ask Yannick Vaucher @ Camptocamp for more information if necessary.

To post a message you must log in.