I knew it was going to be a long day :)

So I made an mistake in my argumentation. Hurrah ! I was wrong, I
learned something new ! That was a good day finally :) Thanks to
Aaron and John for that.

Why I thought the merge was done in the other direction is still
a bit of a mystery[1]... but irrelevant to the discussion.

So what I meant is shown below (you can paste the following in
bzrlib/tests/test_script.py and run 
bzr selftest -s bt.test_script.TestGraphs).

More than two threads needs to be involved of course.

class TestGraphs(script.TestCaseWithTransportAndScript):

    def test_with_loom(self):
        self.run_script("""
$ bzr init loom
$ cd loom
$ bzr nick trunk
$ bzr loomify
$ bzr commit -m trunk1 --unchanged
$ bzr create-thread vila
$ bzr commit -m vila1 --unchanged
$ bzr create-thread jam
$ bzr commit -m jam1 --unchanged
# New upstream version
$ bzr down-thread trunk
$ bzr commit -m trunk2 --unchanged
# Bring in new upstream
$ bzr up-thread --auto
$ bzr qlog
""")

    def test_with_branches(self):
        self.run_script("""
$ bzr init trunk
$ cd trunk
$ bzr commit -m trunk1 --unchanged
$ cd ..
$ bzr branch trunk vilajam
$ cd vilajam
$ bzr commit -m vila1 --unchanged
$ bzr commit -m jam1 --unchanged
# New upstream version
$ cd ../trunk
$ bzr commit -m trunk2 --unchanged
# Bring in new upstream
$ cd ../vilajam
$ bzr merge ../trunk
$ bzr commit -m 'Merge trunk into branch'
$ bzr qlog
""")

Gee, 13 and 14 commands respectively for the simplest example :-(

My point was (and is still) that the difference when using a loom
is that there is a point where you get a better control on how
the trunk is merged in each thread because the trunk is brought
"by the bottom", 'up-thread --auto' stops in case of conflicts
for a good reason.

The graphs are different because more information is preserved in
the loom case, that's basically the same argumentation about
rebase or not rebase, these additional commits may seem spurious
but that's a different debate.

Putting that back in the udd context means that you get a chance
to resolve the conflicts from upstream (there shouldn't be any
since we do a pull and we can do that because we preserved the
starting point) before resolving the conflicts from each patch,
the conflicts from debian and finally the conflicts from ubuntu.

       Vincent

P.S.: I don't attach the 40kB screenshots to preserve
electrons. If you don't have qbzr installed you can replace 'bzr
qlog' by 'bzr viz' (if you have bzr-gtk installed). And if you
have neither, well, I can send you the screenshots :0)


-- 
ubuntu-distributed-devel mailing list
ubuntu-distributed-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-distributed-devel

Reply via email to