Edgewall Software

Opened 9 years ago

Last modified 9 years ago

#12108 closed defect

SubversionRepository.get_path_url() should encode meta characters and unicode characters — at Initial Version

Reported by: Jun Omae Owned by:
Priority: normal Milestone: 1.0.7
Component: version control Version: 0.12-stable
Severity: normal Keywords: svn
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

SubversionRepository.get_path_url() generates URL for the given path and revision. The given path can include meta characters and unicode characters, e.g. #, %, ?.

However, the method returns generated URL without url-encoding. It should encode those characters in the URL.

>>> DbRepositoryProvider(env).modify_repository('svnrepos', {'url': 'http://localhost'})
>>> repos = env.get_repository('svnrepos')
>>> repos.get_path_url(u'tête/Résumé.txt', 29)
u'http://localhost/t\xeate/R\xe9sum\xe9.txt'
>>> repos.get_path_url(u'trunk/file#name.txt', 29)
u'http://localhost/trunk/file#name.txt'
>>> repos.get_path_url(u'trunk/file%name.txt', 29)
u'http://localhost/trunk/file%name.txt'

Change History (0)

Note: See TracTickets for help on using tickets.