Question about file-ids

Frits Jalvingh jal at etc.to
Thu Nov 11 20:11:20 GMT 2010


Hello list,

I have a question which requires some explanation.. Hope someone can
answer me.

I have two branches, an "old version branch", say br-1.0 and a "new
versin branch", say br-2.0. My br-2.0 was in olden days the br-1.0
branch, but the two split when I released. The br-1.0 branch is now only
used to "fix problems" and br-2.0 is new development.

Fixes in br-1.0 are merged "upwards" to br-2.0 - because it often
contains the same problems.

Today I need to fix a problem in br-1.0 that was /already/ fixed in
br-2.0 by /adding a new file there/. I want to "backport" that file to
1.0. But now I have a problem.

After copying to 1.0 and commiting there I need to merge that change
upward as usual, into br-2.0. But there the file already existed. So I
get a conflict and a .moved file in 2.0.

Now I must take care because the "solution" to this requires some
thought. I have to accept and merge the version from 1.0 into 2.0, and I
have to bzr remove --force the .moved file /after copying its content
into the original/. This is the only way that later merges that would
change the 1.0 version would merge properly to 2.0. I need to do it like
this because I have to have this file using the same bzr file ID
throughout all versions, otherwise all merges to it will conflict.

But this "deletes" the file in 2.0, and thereby it's history is gone...
I wonder: is there a way to somehow introduce that file in the br-1.0
branch in a way that it "copies" the file ID of the higher branch? Would
cherrypicking a change adding only that single file work?

Sorry for the long explanation... We had this occuring today and
explaining it took quite some time, so if there is a better way I would
like to know it.

Thanks,

Frits





More information about the bazaar mailing list