Rev 3657: (Jelmer) Merging from a previously joined branch will no longer cause in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Aug 28 16:22:45 BST 2008


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3657
revision-id: pqm at pqm.ubuntu.com-20080828152239-3cu7dhmjrk7zvs3f
parent: pqm at pqm.ubuntu.com-20080828143516-87uyghap1pw2xd1x
parent: jelmer at samba.org-20080827203222-pr2ssub113o4q5lk
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-08-28 16:22:39 +0100
message:
  (Jelmer) Merging from a previously joined branch will no longer cause
  	a traceback.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/merge.py                merge.py-20050513021216-953b65a438527106
  bzrlib/tests/test_merge.py     testmerge.py-20050905070950-c1b5aa49ff911024
    ------------------------------------------------------------
    revno: 3649.3.1
    revision-id: jelmer at samba.org-20080827203222-pr2ssub113o4q5lk
    parent: pqm at pqm.ubuntu.com-20080825182248-dydy5bn4n5akbfjq
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: bzr.dev
    timestamp: Wed 2008-08-27 22:32:22 +0200
    message:
      Merging from a previously joined branch will no longer cause a traceback.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/merge.py                merge.py-20050513021216-953b65a438527106
      bzrlib/tests/test_merge.py     testmerge.py-20050905070950-c1b5aa49ff911024
=== modified file 'NEWS'
--- a/NEWS	2008-08-28 08:32:26 +0000
+++ b/NEWS	2008-08-28 15:22:39 +0000
@@ -42,6 +42,9 @@
       ``0700`` and files to ``0600`` rather than leaving them unmodified.
       Now we ignore ``0000`` as the permissions and assume they are
       invalid. (John Arbash Meinel, #259855)
+
+    * Merging from a previously joined branch will no longer cause 
+      a traceback. (Jelmer Vernooij, #203376)
     
     * Running ``bzr st PATH_TO_TREE`` will no longer suppress merge
       status. Status is also about 7% faster on mozilla sized trees

=== modified file 'bzrlib/merge.py'
--- a/bzrlib/merge.py	2008-07-16 16:54:06 +0000
+++ b/bzrlib/merge.py	2008-08-27 20:32:22 +0000
@@ -632,6 +632,9 @@
             self.tt.final_kind(other_root)
         except NoSuchFile:
             return
+        if self.other_tree.inventory.root.file_id in self.this_tree.inventory:
+            # the other tree's root is a non-root in the current tree
+            return
         self.reparent_children(self.other_tree.inventory.root, self.tt.root)
         self.tt.cancel_creation(other_root)
         self.tt.cancel_versioning(other_root)

=== modified file 'bzrlib/tests/test_merge.py'
--- a/bzrlib/tests/test_merge.py	2008-07-16 16:59:32 +0000
+++ b/bzrlib/tests/test_merge.py	2008-08-27 20:32:22 +0000
@@ -464,6 +464,24 @@
         source.commit('Add bar')
         subtree.merge_from_branch(source.branch)
 
+    def test_merge_joined_branch(self):
+        source = self.make_branch_and_tree('source', format='rich-root-pack')
+        self.build_tree(['source/foo'])
+        source.add('foo')
+        source.commit('Add foo')
+        target = self.make_branch_and_tree('target', format='rich-root-pack')
+        self.build_tree(['target/bla'])
+        target.add('bla')
+        target.commit('Add bla')
+        nested = source.bzrdir.sprout('target/subtree').open_workingtree()
+        target.subsume(nested)
+        target.commit('Join nested')
+        self.build_tree(['source/bar'])
+        source.add('bar')
+        source.commit('Add bar')
+        target.merge_from_branch(source.branch)
+        target.commit('Merge source')
+
 
 class TestPlanMerge(TestCaseWithMemoryTransport):
 




More information about the bazaar-commits mailing list