Rev 6018: (vila) Merge 2.3 into 2.4 (Vincent Ladeuil) in file:///home/pqm/archives/thelove/bzr/2.4/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Jul 15 09:16:16 UTC 2011


At file:///home/pqm/archives/thelove/bzr/2.4/

------------------------------------------------------------
revno: 6018 [merge]
revision-id: pqm at pqm.ubuntu.com-20110715091614-sc2iewzh1je8ygcg
parent: pqm at pqm.ubuntu.com-20110713004839-rkdceu7bli2c7ihv
parent: v.ladeuil+lp at free.fr-20110715082500-fz2zg5wav3mc3vda
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.4
timestamp: Fri 2011-07-15 09:16:14 +0000
message:
  (vila) Merge 2.3 into 2.4 (Vincent Ladeuil)
modified:
  bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
  bzrlib/tests/test_remote.py    test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
  doc/en/release-notes/bzr-2.3.txt NEWS-20050323055033-4e00b5db738777ff
  doc/en/whats-new/whats-new-in-2.3.txt whatsnewin2.3.txt-20100818072501-x2h25r7jbnknvy30-1
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2011-06-28 15:09:53 +0000
+++ b/bzrlib/branch.py	2011-07-15 08:25:00 +0000
@@ -3344,7 +3344,16 @@
         if local and not bound_location:
             raise errors.LocalRequiresBoundBranch()
         master_branch = None
-        source_is_master = (self.source.user_url == bound_location)
+        source_is_master = False
+        if bound_location:
+            # bound_location comes from a config file, some care has to be
+            # taken to relate it to source.user_url
+            normalized = urlutils.normalize_url(bound_location)
+            try:
+                relpath = self.source.user_transport.relpath(normalized)
+                source_is_master = (relpath == '')
+            except (errors.PathNotChild, errors.InvalidURL):
+                source_is_master = False
         if not local and bound_location and not source_is_master:
             # not pulling from master, so we need to update master.
             master_branch = self.target.get_master_branch(possible_transports)

=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py	2011-06-19 17:49:43 +0000
+++ b/bzrlib/tests/test_remote.py	2011-07-15 08:25:00 +0000
@@ -3359,8 +3359,9 @@
         remote_branch_url = self.smart_server.get_url() + 'remote'
         remote_branch = bzrdir.BzrDir.open(remote_branch_url).open_branch()
         self.hpss_calls = []
-        local.repository.fetch(remote_branch.repository,
-                fetch_spec=_mod_graph.EverythingResult(remote_branch.repository))
+        local.repository.fetch(
+            remote_branch.repository,
+            fetch_spec=_mod_graph.EverythingResult(remote_branch.repository))
         self.assertEqual(['Repository.get_stream_1.19'], self.hpss_calls)
 
     def override_verb(self, verb_name, verb):
@@ -3381,10 +3382,12 @@
             """A version of the Repository.get_stream_1.19 verb patched to
             reject 'everything' searches the way 2.3 and earlier do.
             """
-            def recreate_search(self, repository, search_bytes, discard_excess=False):
+            def recreate_search(self, repository, search_bytes,
+                                discard_excess=False):
                 verb_log.append(search_bytes.split('\n', 1)[0])
                 if search_bytes == 'everything':
-                    return (None, request.FailedSmartServerResponse(('BadSearch',)))
+                    return (None,
+                            request.FailedSmartServerResponse(('BadSearch',)))
                 return super(OldGetStreamVerb,
                         self).recreate_search(repository, search_bytes,
                             discard_excess=discard_excess)
@@ -3395,11 +3398,31 @@
         remote_branch_url = self.smart_server.get_url() + 'remote'
         remote_branch = bzrdir.BzrDir.open(remote_branch_url).open_branch()
         self.hpss_calls = []
-        local.repository.fetch(remote_branch.repository,
-                fetch_spec=_mod_graph.EverythingResult(remote_branch.repository))
+        local.repository.fetch(
+            remote_branch.repository,
+            fetch_spec=_mod_graph.EverythingResult(remote_branch.repository))
         # make sure the overridden verb was used
         self.assertLength(1, verb_log)
         # more than one HPSS call is needed, but because it's a VFS callback
         # its hard to predict exactly how many.
         self.assertTrue(len(self.hpss_calls) > 1)
 
+
+class TestUpdateBoundBranch(tests.TestCaseWithTransport):
+
+    def test_bug_786980(self):
+        self.transport_server = test_server.SmartTCPServer_for_testing
+        wt = self.make_branch_and_tree('master')
+        checkout = wt.branch.create_checkout('checkout')
+        wt.commit('add stuff')
+        last_revid = wt.commit('even more stuff')
+        bound_location = checkout.branch.get_bound_location()
+        # For unclear reasons some users have a bound_location without a final
+        # '/', simulate that by forcing such a value
+        self.assertEndsWith(bound_location, '/')
+        new_location = bound_location.rstrip('/')
+        checkout.branch.set_bound_location(new_location)
+        # bug 786980 was raising ReadOnlyError: A write attempt was made in a
+        # read only transaction during the update()
+        checkout.update()
+        self.assertEquals(last_revid, checkout.last_revision())

=== modified file 'doc/en/release-notes/bzr-2.3.txt'
--- a/doc/en/release-notes/bzr-2.3.txt	2011-07-06 09:22:00 +0000
+++ b/doc/en/release-notes/bzr-2.3.txt	2011-07-15 08:25:00 +0000
@@ -5,11 +5,68 @@
 .. toctree::
    :maxdepth: 1
 
+bzr 2.3.5
+#########
+
+:2.3.5: NOT RELEASED YET
+
+External Compatibility Breaks
+*****************************
+
+.. These may require users to change the way they use Bazaar.
+
+New Features
+************
+
+.. New commands, options, etc that users may wish to try out.
+
+Improvements
+************
+
+.. Improvements to existing commands, especially improved performance 
+   or memory usage, or better results.
+
+Bug Fixes
+*********
+
+.. Fixes for situations where bzr would previously crash or give incorrect
+   or undesirable results.
+
+Documentation
+*************
+
+.. Improved or updated documentation.
+
+API Changes
+***********
+
+.. Changes that may require updates in plugins or other code that uses
+   bzrlib.
+
+Internals
+*********
+
+.. Major internal changes, unlikely to be visible to users or plugin 
+   developers, but interesting for bzr developers.
+
+Testing
+*******
+
+.. Fixes and changes that are only relevant to bzr's test framework and 
+   suite.  This can include new facilities for writing tests, fixes to 
+   spurious test failures and changes to the way things should be tested.
+
+
 bzr 2.3.4
 #########
 
 :Codename: One and counting
-:2.3.4: NOT RELEASED YET
+:2.3.4: 2011-07-14
+
+This is a bugfix release. Upgrading is recommended for all users of earlier
+2.3 releases.
+
+This mainly fixes bug #786980 which blocked the SRU process for Ubuntu Natty.
 
 External Compatibility Breaks
 *****************************
@@ -33,6 +90,10 @@
 .. Fixes for situations where bzr would previously crash or give incorrect
    or undesirable results.
 
+* Accept some differences for ``bound_location`` from the config files that
+  were leading to a 'ReadOnlyError: A write attempt was made in a read only
+  transaction' error.  (Vincent Ladeuil, #786980)
+
 * Don't fail with traceback if `bzr serve` is running as a service on Windows,
   and there is no USERNAME, nor BZR_EMAIL or other whoami-related environment
   variables set. (Alexander Belchenko, Bug #660174)
@@ -44,7 +105,7 @@
 
 * Updated the "Using stacked branches" section of the user guide to
   describe committing to stacked branches and expanded its discussion of
-  pushing a stcked branch.  (Andrew Bennetts)
+  pushing a stacked branch.  (Andrew Bennetts)
 
 API Changes
 ***********

=== modified file 'doc/en/whats-new/whats-new-in-2.3.txt'
--- a/doc/en/whats-new/whats-new-in-2.3.txt	2011-05-13 13:11:27 +0000
+++ b/doc/en/whats-new/whats-new-in-2.3.txt	2011-07-15 08:25:00 +0000
@@ -25,6 +25,8 @@
 Bazaar 2.3.3 is a bugfix release including the fixes in 2.3.2 and
 fixing the test helpers deprecated by python-2.7.
 
+Bazaar 2.3.4 is a bugfix release.
+
 See the :doc:`../release-notes/index` for details.
 
 Bazaar 2.3 is fully compatible both locally and on the network with 2.0, 2.1,




More information about the bazaar-commits mailing list