Rev 4873: (abentley) merge -i doesn't leave branches write-locked. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Dec 7 22:32:57 GMT 2009


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

------------------------------------------------------------
revno: 4873 [merge]
revision-id: pqm at pqm.ubuntu.com-20091207223256-9e6l1vc6h3jc2eqs
parent: pqm at pqm.ubuntu.com-20091207202945-iwelfw14uf2mpn44
parent: aaron at aaronbentley.com-20091207214628-yifwgux0fn4x3bo4
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2009-12-07 22:32:56 +0000
message:
  (abentley) merge -i doesn't leave branches write-locked.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/tests/blackbox/test_merge.py test_merge.py-20060323225809-9bc0459c19917f41
=== modified file 'NEWS'
--- a/NEWS	2009-12-07 20:29:45 +0000
+++ b/NEWS	2009-12-07 22:32:56 +0000
@@ -59,6 +59,8 @@
 
 * ``bzr serve --quiet`` really is quiet now.  (Gordon Tyler, #252834)
 
+* Interactive merge doesn't leave branch locks behind.  (Aaron Bentley)
+
 * Lots of bugfixes for the test suite on Windows. We should once again
   have a test suite with no failures on Windows. (John Arbash Meinel)
 

=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2009-12-07 10:38:09 +0000
+++ b/bzrlib/builtins.py	2009-12-07 21:46:28 +0000
@@ -3836,7 +3836,10 @@
         shelver = shelf_ui.Shelver(merger.this_tree, result_tree, destroy=True,
                                    reporter=shelf_ui.ApplyReporter(),
                                    diff_writer=writer(sys.stdout))
-        shelver.run()
+        try:
+            shelver.run()
+        finally:
+            shelver.finalize()
 
     def sanity_check_merger(self, merger):
         if (merger.show_base and

=== modified file 'bzrlib/tests/blackbox/test_merge.py'
--- a/bzrlib/tests/blackbox/test_merge.py	2009-11-09 00:39:44 +0000
+++ b/bzrlib/tests/blackbox/test_merge.py	2009-12-07 21:46:28 +0000
@@ -589,6 +589,14 @@
         self.run_bzr('merge -d this other -r0..')
         self.failUnlessExists('this/other_file')
 
+    def test_merge_interactive_unlocks_branch(self):
+        this = self.make_branch_and_tree('this')
+        other = self.make_branch_and_tree('other')
+        other.commit('empty commit')
+        self.run_bzr('merge -i -d this other')
+        this.lock_write()
+        this.unlock()
+
     def test_merge_reversed_revision_range(self):
         tree = self.make_branch_and_tree(".")
         for f in ("a", "b"):




More information about the bazaar-commits mailing list