Rev 1765: Merge upstream. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk

Jelmer Vernooij jelmer at samba.org
Wed Dec 3 19:40:10 GMT 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/trunk

------------------------------------------------------------
revno: 1765
revision-id: jelmer at samba.org-20081203194007-w6q3o7lfmgq0ln6u
parent: jelmer at samba.org-20081203193232-17tqlhwre2t9eavw
parent: jelmer at samba.org-20081202202421-r0irnl4nvcg01ess
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Wed 2008-12-03 20:40:07 +0100
message:
  Merge upstream.
modified:
  NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
  transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 1763.1.3
    revision-id: jelmer at samba.org-20081202202421-r0irnl4nvcg01ess
    parent: jelmer at samba.org-20081202202200-ft1jao36g7dn042b
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Tue 2008-12-02 21:24:21 +0100
    message:
      FIx imports.
    modified:
      transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 1763.1.2
    revision-id: jelmer at samba.org-20081202202200-ft1jao36g7dn042b
    parent: jelmer at samba.org-20081201154408-4vjkx1l2uqyxbd4t
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Tue 2008-12-02 21:22:00 +0100
    message:
      Properly display Malformed URL error.
    modified:
      transport.py                   transport.py-20060406231150-b3472d06b3a0818d
    ------------------------------------------------------------
    revno: 1763.1.1
    revision-id: jelmer at samba.org-20081201154408-4vjkx1l2uqyxbd4t
    parent: jelmer at samba.org-20081119130100-0t6381c1p45re08k
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: 0.4
    timestamp: Mon 2008-12-01 16:44:08 +0100
    message:
      Allow target URLs in redirect requests to contain relative URLs.
    modified:
      NEWS                           news-20061231030336-h9fhq245ie0de8bs-1
      transport.py                   transport.py-20060406231150-b3472d06b3a0818d
=== modified file 'NEWS'
--- a/NEWS	2008-12-03 19:32:32 +0000
+++ b/NEWS	2008-12-03 19:40:07 +0000
@@ -14,6 +14,8 @@
 
    * Fix removing of file properties. (#304866)
 
+   * Allow target URLs in redirect requests to contain relative URLs. (#303959)
+
 bzr-svn 0.4.15	2008-11-10
 
   BUG FIXES

=== modified file 'transport.py'
--- a/transport.py	2008-09-05 20:23:10 +0000
+++ b/transport.py	2008-12-02 20:24:21 +0000
@@ -28,7 +28,7 @@
 from bzrlib.plugins.svn.auth import create_auth_baton
 from bzrlib.plugins.svn.client import get_config
 from bzrlib.plugins.svn.core import SubversionException
-from bzrlib.plugins.svn.errors import convert_svn_error, NoSvnRepositoryPresent, ERR_BAD_URL, ERR_RA_SVN_REPOS_NOT_FOUND, ERR_FS_ALREADY_EXISTS, ERR_FS_NOT_DIRECTORY, ERR_RA_DAV_RELOCATED, ERR_RA_DAV_PATH_NOT_FOUND
+from bzrlib.plugins.svn.errors import convert_svn_error, NoSvnRepositoryPresent, ERR_BAD_URL, ERR_RA_SVN_REPOS_NOT_FOUND, ERR_FS_ALREADY_EXISTS, ERR_FS_NOT_DIRECTORY, ERR_RA_DAV_RELOCATED, ERR_RA_DAV_PATH_NOT_FOUND, ERR_RA_ILLEGAL_URL
 import urlparse
 import urllib
 
@@ -115,9 +115,11 @@
         if num in (ERR_RA_SVN_REPOS_NOT_FOUND,):
             raise NoSvnRepositoryPresent(url=url)
         if num == ERR_BAD_URL:
-            raise InvalidURL(url)
+            raise InvalidURL(url, msg)
         if num == ERR_RA_DAV_PATH_NOT_FOUND:
             raise NoSuchFile(url)
+        if num == ERR_RA_ILLEGAL_URL:
+            raise InvalidURL(url, msg)
         if num == ERR_RA_DAV_RELOCATED:
             # Try to guess the new url
             if "'" in msg:
@@ -126,7 +128,8 @@
                 new_url = msg[msg.index("»")+2:msg.index("«")]
             else:
                 raise AssertionError("Unable to parse error message: %s" % msg)
-            raise RedirectRequested(source=url, target=new_url, 
+            raise RedirectRequested(source=url, 
+                                    target=urlutils.join(url, new_url), 
                                     is_permanent=True)
         raise
 




More information about the bazaar-commits mailing list