Rev 3070: Fix typos mentioned by spiv. in file:///v/home/vila/src/bzr/bugs/173010/

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Dec 6 22:46:23 GMT 2007


At file:///v/home/vila/src/bzr/bugs/173010/

------------------------------------------------------------
revno: 3070
revision-id:v.ladeuil+lp at free.fr-20071206224616-wn217wlduoe4rdkh
parent: v.ladeuil+lp at free.fr-20071204082624-14qyieeefm13zm7b
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 173010
timestamp: Thu 2007-12-06 23:46:16 +0100
message:
  Fix typos mentioned by spiv.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/test_http_response.py test_http_response.py-20060628233143-950b2a482a32505d
  bzrlib/transport/http/__init__.py http_transport.py-20050711212304-506c5fd1059ace96
  bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
  bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
  bzrlib/transport/http/response.py _response.py-20060613154423-a2ci7hd4iw5c7fnt-1
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2007-12-03 20:33:05 +0000
+++ b/NEWS	2007-12-06 22:46:16 +0000
@@ -16,7 +16,7 @@
 
     * readv urllib http implementation is now a real iterator above the
       underlying socket and deliver data as soon as it arrives. 'get' still
-      wraps its ouput in a StringIO.
+      wraps its output in a StringIO.
       (Vincent Ladeuil)
 
     * New -Dhttp debug option reports http connections, requests and responses.

=== modified file 'bzrlib/tests/test_http_response.py'
--- a/bzrlib/tests/test_http_response.py	2007-12-03 17:53:35 +0000
+++ b/bzrlib/tests/test_http_response.py	2007-12-06 22:46:16 +0000
@@ -140,7 +140,7 @@
     def test_invalid_accesses(self):
         """Test errors triggered by invalid accesses."""
 
-        f =  self._file_size_unknown()
+        f = self._file_size_unknown()
         self.assertRaises(errors.InvalidRange, f.seek, -1, 2)
 
         for builder, start in self.files:
@@ -149,7 +149,7 @@
         for builder, start in self.files[1:3]:
             self._check_file_boundaries(builder(), start)
 
-        f =  self._file_multi_ranges()
+        f = self._file_multi_ranges()
         self._check_accesses_inside_range(f, start=10)
         f.seek(40) # Will trigger the decoding and setting of the second range
         self.assertEquals(100, f.tell())
@@ -159,12 +159,12 @@
         self._check_beyond_range(self._file_single_range, start=10)
         self._check_beyond_range(self._file_multi_ranges, start=10)
 
-        f =  self._file_multi_ranges()
+        f = self._file_multi_ranges()
         f.seek(40) # Past the first range but before the second
         # Now the file is positioned at the second range start (100)
         self.assertRaises(errors.InvalidRange, f.seek, 41)
 
-        f =  self._file_multi_ranges()
+        f = self._file_multi_ranges()
         # We can seek across ranges but not beyond
         self.assertRaises(errors.InvalidRange, f.read, 127)
 
@@ -368,7 +368,7 @@
 
     def _build_HTTPMessage(self, raw_headers):
         status_and_headers = StringIO(raw_headers)
-        # Get read of the status line
+        # Get rid of the status line
         status_and_headers.readline()
         msg = httplib.HTTPMessage(status_and_headers)
         return msg

=== modified file 'bzrlib/transport/http/__init__.py'
--- a/bzrlib/transport/http/__init__.py	2007-12-04 08:26:24 +0000
+++ b/bzrlib/transport/http/__init__.py	2007-12-06 22:46:16 +0000
@@ -265,7 +265,7 @@
                                                          actual=data_len)
                         if (start, size) == cur_offset_and_size:
                             # The offset requested are sorted as the coalesced
-                            # ones, not need to cache. Win !
+                            # ones, no need to cache. Win !
                             yield cur_offset_and_size[0], data
                             cur_offset_and_size = iter_offsets.next()
                         else:
@@ -305,7 +305,7 @@
         for group in xrange(0, len(coalesced), max_ranges):
             ranges = coalesced[group:group+max_ranges]
             # Note that the following may raise errors.InvalidHttpRange. It's
-            # the caller responsability to decide how to retry since it may
+            # the caller's responsability to decide how to retry since it may
             # provide different coalesced offsets.
             code, rfile = self._get(relpath, ranges)
             for range in ranges:

=== modified file 'bzrlib/transport/http/_pycurl.py'
--- a/bzrlib/transport/http/_pycurl.py	2007-12-03 17:53:35 +0000
+++ b/bzrlib/transport/http/_pycurl.py	2007-12-06 22:46:16 +0000
@@ -208,7 +208,7 @@
 
         return code, data
 
-    # The mother class use 0 to minimize the requests, but since we can't
+    # The parent class use 0 to minimize the requests, but since we can't
     # exploit the results as soon as they are received (pycurl limitation) we'd
     # better issue more requests and provide a more responsive UI do the cost
     # of more latency costs.

=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- a/bzrlib/transport/http/_urllib2_wrappers.py	2007-12-03 13:52:36 +0000
+++ b/bzrlib/transport/http/_urllib2_wrappers.py	2007-12-06 22:46:16 +0000
@@ -124,11 +124,11 @@
             self.will_close = False
 
     def finish(self):
-        """Finish reading the bdy.
+        """Finish reading the body.
 
-        In some cases, the client may have leave some bytes to read in the
+        In some cases, the client may have left some bytes to read in the
         body. That will block the next request to succeed if we use a
-        persistent connection. If we don't use a persitent connection, well,
+        persistent connection. If we don't use a persistent connection, well,
         nothing will block the next request since a new connection will be
         issued anyway.
         """

=== modified file 'bzrlib/transport/http/response.py'
--- a/bzrlib/transport/http/response.py	2007-12-04 08:26:24 +0000
+++ b/bzrlib/transport/http/response.py	2007-12-06 22:46:16 +0000
@@ -30,7 +30,7 @@
     )
 
 
-# A RangeFile should respect the following grammar (simplified to outline the
+# A RangeFile epxects the following grammar (simplified to outline the
 # assumptions we rely upon).
 
 # file: whole_file
@@ -89,7 +89,7 @@
         """Read the boundary headers defining a new range"""
         boundary_line = '\r\n'
         while boundary_line == '\r\n':
-            # RFC2616 19.2 Additional CRLFs msy preceed the first boundary
+            # RFC2616 19.2 Additional CRLFs may preceed the first boundary
             # string entity.
             # To be on the safe side we allow it before any boundary line
             boundary_line = self._file.readline()
@@ -122,7 +122,7 @@
             raise errors.InvalidHttpRange(self._path, content_range,
                                           "Malformed Content-Range header '%s'"
                                           % content_range)
-        if rtype  != 'bytes':
+        if rtype != 'bytes':
             raise errors.InvalidHttpRange(self._path, content_range,
                                           "Unsupported range type '%s'" % rtype)
         try:



More information about the bazaar-commits mailing list