Merging Branches with Binaries

A. S. Budden abudden at gmail.com
Fri Feb 19 14:13:56 GMT 2010


Dear all,

We've been experimenting with merging a bit over the last couple of
days and we've been finding it slightly difficult to do.  I thought
I'd share my experiences in the hope that someone can tell me what I'm
doing wrong.

In our company, we have a policy (which I may try to change if I can
persuade the right people...) that the .axf binary files that are
generated at the end of a build are versioned in the version control
system (the intermediate files aren't).  Regardless of the policy, I
guess this is relevant to any binary files under Bazaar version
control.  I'll refer to the binary as Out.axf in the text below.

If we have a situation where with a couple of branches:

trunk: r1 -- r2 -- r3 -- r4 -- r5
              \                /
br1:          r2 -- r3 -- r4 -/

Every time we merge (in this case to make r5), there will be
conflicts.  These will include a file containing an automatically
incremented build number (which is just a text file and hence
relatively easy, if a bit tedious having to do it every time, to
merge) and the binary output file (as well as any normal conflicts).

As an example of the process, we open a (heavyweight) checkout of the
trunk and click "Merge" in Bazaar Explorer.  We select br1 on the
server and the changes are pulled in.  In the process, there are one
or more text conflicts and the "contents conflict".  Out.axf is
deleted and Out.axf.BASE, Out.axf.THIS and Out.axf.OTHER appear.

A message then pops up in Bazaar Explorer saying:

    bzr:ERROR: No such file:
    u'z:/path/to/Out.axf'
    [IGNORE], [CLOSE]

We click ignore.  Clicking Work..Revert Working Tree then pops up the
revert dialog, with the same error message dialog on top (but no
IGNORE button).  Clicking Close (the only option) closes the revert
dialog: so revert can't be used to restore that file.

Since we don't really care that much in this case which axf version
survives (it's just a generated file), we just decided to delete
Out.axf.BASE and Out.axf.OTHER and rename Out.axf.THIS to Out.axf.
Clicking refresh on Bazaar Explorer then results in it thinking that
Out.axf has been deleted AND that there is an unversioned file called
Out.axf!  This is clearly daft in this circumstance.

We've various random ways of sorting this out, including trying to
revert that file (after making sure that Out.axf exists so that it
doesn't crash), which reverts the ENTIRE merge, despite having only
selected the one file in qrevert.  We have yet to find a good way to
solve this.

What we'd really like is to be able to just right click on the
"contents conflict" line in the Conflict dialog box and select "Choose
THIS" or "Choose OTHER" and everything else to happen by magic.  Of
course, what we'd like even more is to configure it to automatically
just pick "THIS" for Output/*/*.axf, but that's probably asking too
much.  What would be REALLY clever would be a means of picking the
build number file that has the highest version number, but perhaps
that's a bit of pipe dream!

Please can anyone offer any suggestions as to what we're doing wrong?

Many thanks in advance,

Al



More information about the bazaar mailing list