Rev 2920: Fix #154259: typo in ftp.py making the reconnection fail on temporary errors in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Oct 19 20:28:22 BST 2007


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

------------------------------------------------------------
revno: 2920
revision-id: pqm at pqm.ubuntu.com-20071019192820-142exl1a916kizu3
parent: pqm at pqm.ubuntu.com-20071019183933-ponmwcztrwpn9o7w
parent: v.ladeuil+lp at free.fr-20071019184347-n6gh66e08bxvy62r
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2007-10-19 20:28:20 +0100
message:
  Fix #154259: typo in ftp.py making the reconnection fail on temporary errors
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/test_ftp_transport.py test_aftp_transport.-20060823221619-98mwjzxtwtkt527k-1
  bzrlib/transport/ftp.py        ftp.py-20051116161804-58dc9506548c2a53
    ------------------------------------------------------------
    revno: 2919.1.1
    merged: v.ladeuil+lp at free.fr-20071019184347-n6gh66e08bxvy62r
    parent: pqm at pqm.ubuntu.com-20071019183933-ponmwcztrwpn9o7w
    parent: v.ladeuil+lp at free.fr-20071019175507-stlda3b4m45yook0
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: trunk
    timestamp: Fri 2007-10-19 20:43:47 +0200
    message:
      Fix #154259: typo in ftp.py making the reconnection fail on temporary errors
    ------------------------------------------------------------
    revno: 2917.1.3
    merged: v.ladeuil+lp at free.fr-20071019175507-stlda3b4m45yook0
    parent: v.ladeuil+lp at free.fr-20071019105822-eyqh1121x317e5nw
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: 154259
    timestamp: Fri 2007-10-19 19:55:07 +0200
    message:
      Review feedback.
      
      * bzrlib/tests/test_ftp_transport.py:
      (TestFTPServer.test__reconnect): Use a different pattern after
      reconnection.
    ------------------------------------------------------------
    revno: 2917.1.2
    merged: v.ladeuil+lp at free.fr-20071019105822-eyqh1121x317e5nw
    parent: v.ladeuil+lp at free.fr-20071019105321-i0rh34oe1jm0ykzj
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: 154259
    timestamp: Fri 2007-10-19 12:58:22 +0200
    message:
      Fix typo in ftp.py making the reconnection fail on temporary errors (154259).
      
      * bzrlib/transport/ftp.py:
      (FtpTransport._reconnect): Fix typo.
    ------------------------------------------------------------
    revno: 2917.1.1
    merged: v.ladeuil+lp at free.fr-20071019105321-i0rh34oe1jm0ykzj
    parent: pqm at pqm.ubuntu.com-20071019042839-xwvsz0loa77yokxm
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: 154259
    timestamp: Fri 2007-10-19 12:53:21 +0200
    message:
      Reproduce the bug.
      
      * test_ftp_transport.py:
      (TestFTPServer.test__reconnect): New test.
=== modified file 'NEWS'
--- a/NEWS	2007-10-19 17:00:10 +0000
+++ b/NEWS	2007-10-19 18:43:47 +0000
@@ -112,6 +112,9 @@
    * Fix selftest semi-random noise during http related tests.
      (Vincent Ladeuil, #140614)
 
+   * Fix typo in ftp.py making the reconnection fail on temporary errors.
+     (Vincent Ladeuil, #154259)
+
    * Fix failing test by comparing real paths to cover the case where the TMPDIR
      contains a symbolic link.
      (Vincent Ladeuil, #141382).

=== modified file 'bzrlib/tests/test_ftp_transport.py'
--- a/bzrlib/tests/test_ftp_transport.py	2007-09-05 13:35:38 +0000
+++ b/bzrlib/tests/test_ftp_transport.py	2007-10-19 17:55:07 +0000
@@ -77,6 +77,14 @@
         t.put_bytes('foo', 'test bytes\n')
         self.assertEqual('test bytes\n', t.get_bytes('foo'))
 
+    def test__reconnect(self):
+        t = self.get_transport()
+        t.put_bytes('foo', 'test bytes\n')
+        self.assertEqual('test bytes\n', t.get_bytes('foo'))
+        t._reconnect()
+        t.put_bytes('foo', 'test more bytes\n')
+        self.assertEqual('test more bytes\n', t.get_bytes('foo'))
+
 
 class TestFTPServerUI(TestCaseWithFTPServer):
 

=== modified file 'bzrlib/transport/ftp.py'
--- a/bzrlib/transport/ftp.py	2007-10-04 14:43:28 +0000
+++ b/bzrlib/transport/ftp.py	2007-10-19 10:58:22 +0000
@@ -143,7 +143,7 @@
 
     def _reconnect(self):
         """Create a new connection with the previously used credentials"""
-        credentials = self.get_credentials()
+        credentials = self._get_credentials()
         connection, credentials = self._create_connection(credentials)
         self._set_connection(connection, credentials)
 




More information about the bazaar-commits mailing list