Fix issue #504 ("annotate view fails on filenames with colon (:)

characters in their names"), another in a long string of annotate view
brokennesses.  (Is that word?)  This time, the problem was a disparity
between Python's urllib encoding and what Subversion deems canonical.

* lib/vclib/svn/svn_repos.py
  (_rootpath2url): Canonicalize URLs for use with Subversion.

* lib/vclib/svn/svn_ra.py
  (RemoteSubversionRepository._geturl): Canonicalize URLs for use with
    Subversion.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2731 8cb11bc2-c004-0410-86c3-e597b4017df7
trunk
cmpilato 2012-02-01 16:24:29 +00:00
parent 3297f45285
commit 1296106171
2 changed files with 5 additions and 3 deletions

View File

@ -420,7 +420,8 @@ class RemoteSubversionRepository(vclib.Repository):
def _geturl(self, path=None):
if not path:
return self.rootpath
return self.rootpath + '/' + urllib.quote(path, "/*~")
path = self.rootpath + '/' + urllib.quote(path)
return core.svn_path_canonicalize(path)
def _get_dirents(self, path, rev):
"""Return a 2-type of dirents and locks, possibly reading/writing

View File

@ -113,9 +113,10 @@ def _rootpath2url(rootpath, path):
rootpath = urllib.quote(rootpath)
path = urllib.quote(path)
if drive:
return 'file:///' + drive + rootpath + '/' + path
url = 'file:///' + drive + rootpath + '/' + path
else:
return 'file://' + rootpath + '/' + path
url = 'file://' + rootpath + '/' + path
return core.svn_path_canonicalize(url)
# Given a dictionary REVPROPS of revision properties, pull special