Rev 2954: Check non-regression against python-2.5/2.6. in file:///net/bigmamac/Volumes/home/vila/src/bzr/experimental/https/

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Dec 11 12:49:11 GMT 2008


At file:///net/bigmamac/Volumes/home/vila/src/bzr/experimental/https/

------------------------------------------------------------
revno: 2954
revision-id: v.ladeuil+lp at free.fr-20081211124909-txt4rbv3gfzsxibc
parent: v.ladeuil+lp at free.fr-20081209140401-ri5frayrfvbvaboc
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: https
timestamp: Thu 2008-12-11 13:49:09 +0100
message:
  Check non-regression against python-2.5/2.6.
  
  * bzrlib/transport/ftp/__init__.py:
  (get_test_permutations.UnavailableFTPServer): Strangely enough
  that fails when medusa is not present.
  
  * bzrlib/tests/http_server.py:
  (TestingHTTPRequestHandler.send_error): Deleted, that doesn't seem
  needed anymore and even buggy.
  
  * bzrlib/tests/branch_implementations/test_branch.py:
  (ChrootedTests.setUp): Delete debug code.
-------------- next part --------------
=== modified file 'bzrlib/tests/branch_implementations/test_branch.py'
--- a/bzrlib/tests/branch_implementations/test_branch.py	2008-12-09 14:04:01 +0000
+++ b/bzrlib/tests/branch_implementations/test_branch.py	2008-12-11 12:49:09 +0000
@@ -498,8 +498,6 @@
 
     def setUp(self):
         super(ChrootedTests, self).setUp()
-        from bzrlib import debug
-        debug.debug_flags = set(['http'])
         if not self.vfs_transport_factory == MemoryServer:
             self.transport_readonly_server = HttpServer
 

=== modified file 'bzrlib/tests/http_server.py'
--- a/bzrlib/tests/http_server.py	2008-12-09 14:04:01 +0000
+++ b/bzrlib/tests/http_server.py	2008-12-11 12:49:09 +0000
@@ -39,10 +39,6 @@
         return 'path %s is not in %s' % self.args
 
 
-def _quote_html(html):
-    return html.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
-
-
 class TestingHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
     """Handles one request.
 
@@ -132,33 +128,6 @@
         header_line = '%s: %s\r\n' % (keyword, value)
         return len(header_line)
 
-    def send_error(self, code, message=None):
-        """Overrides base implementation to work around bugs in python2.5.
-
-
-        To be 1.1 compliant, we need to specify a Content-Length or 1.1 clients
-        may hang.
-        """
-        try:
-            short, long = self.responses[code]
-        except KeyError:
-            short, long = '???', '???'
-        if message is None:
-            message = short
-        explain = long
-        self.log_error("code %d, message %s", code, message)
-        # using _quote_html to prevent Cross Site Scripting attacks (see bug
-        # #1100201)
-        content = (self.error_message_format %
-                   {'code': code, 'message': _quote_html(message),
-                    'explain': explain})
-        self.send_response(code, message)
-        self.send_header("Content-Type", "text/html")
-        self.send_header('Content-Length', len(content))
-        self.end_headers()
-        if self.command != 'HEAD' and code >= 200 and code not in (204, 304):
-            self.wfile.write(content)
-
     def send_head(self):
         """Overrides base implementation to work around a bug in python2.5."""
         path = self.translate_path(self.path)

=== modified file 'bzrlib/transport/ftp/__init__.py'
--- a/bzrlib/transport/ftp/__init__.py	2008-10-15 15:51:50 +0000
+++ b/bzrlib/transport/ftp/__init__.py	2008-12-11 12:49:09 +0000
@@ -599,7 +599,7 @@
         # side-effects (tearDown is never called).
         class UnavailableFTPServer(object):
 
-            def setUp(self):
+            def setUp(self, vfs_server=None):
                 pass
 
             def tearDown(self):



More information about the bazaar-commits mailing list