Rev 4004: Merge bzr.dev. in http://people.ubuntu.com/~robertc/baz2.0/test-result-registry
Robert Collins
robertc at robertcollins.net
Thu Feb 12 05:34:41 GMT 2009
At http://people.ubuntu.com/~robertc/baz2.0/test-result-registry
------------------------------------------------------------
revno: 4004
revision-id: robertc at robertcollins.net-20090212053433-6ju93so5na0ofjg1
parent: robertc at robertcollins.net-20090211234655-zbnw36me1zfzorv0
parent: pqm at pqm.ubuntu.com-20090212043701-kh62kseozbbcaypb
committer: Robert Collins <robertc at robertcollins.net>
branch nick: test-result-registry
timestamp: Thu 2009-02-12 16:34:33 +1100
message:
Merge bzr.dev.
added:
bzrlib/tests/test_smart_request.py test_smart_request.p-20090211070731-o38wayv3asm25d6a-1
modified:
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
doc/developers/releasing.txt releasing.txt-20080502015919-fnrcav8fwy8ccibu-1
------------------------------------------------------------
revno: 4000.2.3
revision-id: pqm at pqm.ubuntu.com-20090212043701-kh62kseozbbcaypb
parent: pqm at pqm.ubuntu.com-20090212024000-dvdhpm2mela5h6f7
parent: robertc at robertcollins.net-20090212034555-qkepf7soohs34erb
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-02-12 04:37:01 +0000
message:
(robertc) Add a new hook Commands['extend_command'] for plugins that
want to alter commands without overriding the entire command.
(Robert Collins)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/help_topics/en/hooks.txt hooks.txt-20070830033044-xxu2rced13f72dka-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/test_commands.py test_command.py-20051019190109-3b17be0f52eaa7a8
bzrlib/tests/test_selftest.py test_selftest.py-20051202044319-c110a115d8c0456a
------------------------------------------------------------
revno: 4000.1.2
revision-id: robertc at robertcollins.net-20090212034555-qkepf7soohs34erb
parent: robertc at robertcollins.net-20090211124950-70c4aa2a8ub65d0s
committer: Robert Collins <robertc at robertcollins.net>
branch nick: extend_command
timestamp: Thu 2009-02-12 14:45:55 +1100
message:
Fix typo in extend_command hook docs.
modified:
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
------------------------------------------------------------
revno: 4000.2.2
revision-id: pqm at pqm.ubuntu.com-20090212024000-dvdhpm2mela5h6f7
parent: pqm at pqm.ubuntu.com-20090211033438-3yqumzd9miadfc7r
parent: andrew.bennetts at canonical.com-20090211095436-96dwxqkzc79iybxy
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-02-12 02:40:00 +0000
message:
Fix do_body NotImplementedError log spam,
and remove a bit of test cruft. (Andrew Bennetts)
added:
bzrlib/tests/test_smart_request.py test_smart_request.p-20090211070731-o38wayv3asm25d6a-1
modified:
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
------------------------------------------------------------
revno: 3990.3.3
revision-id: andrew.bennetts at canonical.com-20090211095436-96dwxqkzc79iybxy
parent: andrew.bennetts at canonical.com-20090211094527-pdtj25e4748c2h67
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: request handler tests
timestamp: Wed 2009-02-11 20:54:36 +1100
message:
Add a test that unexpected request bodies trigger a SmartProtocolError from request implementations.
modified:
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/tests/test_smart_request.py test_smart_request.p-20090211070731-o38wayv3asm25d6a-1
------------------------------------------------------------
revno: 3990.3.2
revision-id: andrew.bennetts at canonical.com-20090211094527-pdtj25e4748c2h67
parent: andrew.bennetts at canonical.com-20090211070642-987ocatad8vcpo9n
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: request handler tests
timestamp: Wed 2009-02-11 20:45:27 +1100
message:
Fix the do_body NotImplementedError log spam.
added:
bzrlib/tests/test_smart_request.py test_smart_request.p-20090211070731-o38wayv3asm25d6a-1
modified:
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
------------------------------------------------------------
revno: 3990.3.1
revision-id: andrew.bennetts at canonical.com-20090211070642-987ocatad8vcpo9n
parent: pqm at pqm.ubuntu.com-20090209210810-cq9lgqy519b7wfyi
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: Delete cruft
timestamp: Wed 2009-02-11 18:06:42 +1100
message:
Remove some cruft from test_smart_transport.
modified:
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
------------------------------------------------------------
revno: 4000.2.1
revision-id: pqm at pqm.ubuntu.com-20090211033438-3yqumzd9miadfc7r
parent: pqm at pqm.ubuntu.com-20090211011240-gv0zdxmwomt3ndtn
parent: mbp at sourcefrog.net-20090211021134-2xtxxbq856j17rjm
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-02-11 03:34:38 +0000
message:
(mbp) minor release docs fix
modified:
doc/developers/releasing.txt releasing.txt-20080502015919-fnrcav8fwy8ccibu-1
------------------------------------------------------------
revno: 3995.5.1
revision-id: mbp at sourcefrog.net-20090211021134-2xtxxbq856j17rjm
parent: pqm at pqm.ubuntu.com-20090210045418-u1c0p4zpnp6nna3n
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: doc
timestamp: Wed 2009-02-11 13:11:34 +1100
message:
Tweak to the announcement mail template so it can be immediately used
modified:
doc/developers/releasing.txt releasing.txt-20080502015919-fnrcav8fwy8ccibu-1
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2009-02-11 12:49:50 +0000
+++ b/bzrlib/commands.py 2009-02-12 03:45:55 +0000
@@ -588,7 +588,7 @@
notified.
"""
Hooks.__init__(self)
- # Introduced in 0.13:
+ # Introduced in 1.13:
# invoked after creating a command object to allow modifications such
# as adding or removing options, docs etc. Invoked with the command
# object.
=== modified file 'bzrlib/smart/request.py'
--- a/bzrlib/smart/request.py 2009-01-27 07:48:55 +0000
+++ b/bzrlib/smart/request.py 2009-02-11 09:54:36 +0000
@@ -104,7 +104,8 @@
Must return a SmartServerResponse.
"""
- raise NotImplementedError(self.do_body)
+ if body_bytes != '':
+ raise errors.SmartProtocolError('Request does not expect a body')
def do_chunk(self, chunk_bytes):
"""Called with each body chunk if the request has a streamed body.
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2009-02-11 23:46:55 +0000
+++ b/bzrlib/tests/__init__.py 2009-02-12 05:34:33 +0000
@@ -2889,6 +2889,7 @@
'bzrlib.tests.test_shelf_ui',
'bzrlib.tests.test_smart',
'bzrlib.tests.test_smart_add',
+ 'bzrlib.tests.test_smart_request',
'bzrlib.tests.test_smart_transport',
'bzrlib.tests.test_smtp_connection',
'bzrlib.tests.test_source',
=== added file 'bzrlib/tests/test_smart_request.py'
--- a/bzrlib/tests/test_smart_request.py 1970-01-01 00:00:00 +0000
+++ b/bzrlib/tests/test_smart_request.py 2009-02-11 09:54:36 +0000
@@ -0,0 +1,62 @@
+# Copyright (C) 2009 Canonical Ltd
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+"""Tests for smart server request infrastructure (bzrlib.smart.request)."""
+
+from bzrlib import errors
+from bzrlib.smart import request
+from bzrlib.tests import TestCase
+
+
+class NoBodyRequest(request.SmartServerRequest):
+ """A request that does not implement do_body."""
+
+ def do(self):
+ return request.SuccessfulSmartServerResponse(('ok',))
+
+
+class TestSmartRequest(TestCase):
+
+ def test_request_class_without_do_body(self):
+ """If a request has no body data, and the request's implementation does
+ not override do_body, then no exception is raised.
+ """
+ # Create a SmartServerRequestHandler with a SmartServerRequest subclass
+ # that does not implement do_body.
+ handler = request.SmartServerRequestHandler(
+ None, {'foo': NoBodyRequest}, '/')
+ # Emulate a request with no body (i.e. just args).
+ handler.args_received(('foo',))
+ handler.end_received()
+ # Request done, no exception was raised.
+
+ def test_unexpected_body(self):
+ """If a request implementation receives an unexpected body, it
+ raises an error.
+ """
+ # Create a SmartServerRequestHandler with a SmartServerRequest subclass
+ # that does not implement do_body.
+ handler = request.SmartServerRequestHandler(
+ None, {'foo': NoBodyRequest}, '/')
+ # Emulate a request with a body
+ handler.args_received(('foo',))
+ handler.accept_body('some body bytes')
+ # Note that the exception currently occurs at the end of the request.
+ # In principle it would also be ok for it to happen earlier, during
+ # accept_body.
+ exc = self.assertRaises(errors.SmartProtocolError, handler.end_received)
+ self.assertEquals('Request does not expect a body', exc.details)
+
=== modified file 'bzrlib/tests/test_smart_transport.py'
--- a/bzrlib/tests/test_smart_transport.py 2009-01-27 05:04:43 +0000
+++ b/bzrlib/tests/test_smart_transport.py 2009-02-11 09:45:27 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2007 Canonical Ltd
+# Copyright (C) 2006, 2007, 2008, 2009 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -2270,14 +2270,6 @@
self.assertEqual(4, smart_protocol.next_read_size())
-class NoOpRequest(_mod_request.SmartServerRequest):
-
- def do(self):
- return _mod_request.SuccessfulSmartServerResponse(())
-
-dummy_registry = {'ARG': NoOpRequest}
-
-
class LoggingMessageHandler(object):
def __init__(self):
@@ -3555,34 +3547,3 @@
self.assertNotEquals(type(r), type(t))
-# TODO: Client feature that does get_bundle and then installs that into a
-# branch; this can be used in place of the regular pull/fetch operation when
-# coming from a smart server.
-#
-# TODO: Eventually, want to do a 'branch' command by fetching the whole
-# history as one big bundle. How?
-#
-# The branch command does 'br_from.sprout', which tries to preserve the same
-# format. We don't necessarily even want that.
-#
-# It might be simpler to handle cmd_pull first, which does a simpler fetch()
-# operation from one branch into another. It already has some code for
-# pulling from a bundle, which it does by trying to see if the destination is
-# a bundle file. So it seems the logic for pull ought to be:
-#
-# - if it's a smart server, get a bundle from there and install that
-# - if it's a bundle, install that
-# - if it's a branch, pull from there
-#
-# Getting a bundle from a smart server is a bit different from reading a
-# bundle from a URL:
-#
-# - we can reasonably remember the URL we last read from
-# - you can specify a revision number to pull, and we need to pass it across
-# to the server as a limit on what will be requested
-#
-# TODO: Given a URL, determine whether it is a smart server or not (or perhaps
-# otherwise whether it's a bundle?) Should this be a property or method of
-# the transport? For the ssh protocol, we always know it's a smart server.
-# For http, we potentially need to probe. But if we're explicitly given
-# bzr+http:// then we can skip that for now.
=== modified file 'doc/developers/releasing.txt'
--- a/doc/developers/releasing.txt 2008-10-31 08:22:33 +0000
+++ b/doc/developers/releasing.txt 2009-02-11 02:11:34 +0000
@@ -144,10 +144,13 @@
|
| <<Summary paragraph from news>>
|
+ | The Bazaar team is happy to announce availability of a new
+ | release of the bzr adaptive version control system.
+ |
| Thanks to everyone who contributed patches, suggestions, and
| feedback.
|
- | bzr x.yy is now available for download from
+ | Bazaar is now available for download from
| http://bazaar-vcs.org/Download as a source tarball; packages
| for various systems will be available soon.
|
More information about the bazaar-commits
mailing list