Login | Register
My pages Projects Community openCollabNet

Discussions > issues > [Issue 145] New - Inconsistent handling of URL encoding

pysvn
Discussion topic

Back to topic list

[Issue 145] New - Inconsistent handling of URL encoding

Author chrissutton
Full name Chris Sutton
Date 2009-12-21 03:03:47 PST
Message http://pysvn.tigris.​org/issues/show_bug.​cgi?id=145
                 Issue #|145
                 Summary|Inconsistent handling of URL encoding
               Component|pysvn
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|extension
             Assigned to|barryscott
             Reported by|chrissutton






------- Additional comments from chrissutton at tigris dot org Mon Dec 21 03:03:46 -0800 2009 -------
Hi,

I'm using pysvn (py26-pysvn-svn165-1.7.1-1233) on Windows, for some automated
version control scripting.

I've hit a problem when using http repository access (all worked file when using
a file:// repo).

The problem may be best demonstrated in code. I have a repository at http://svn
which contains a folder 'folder a' and a sub-folder 'folder b':

Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysvn
>>> c = pysvn.Client()
>>> c.ls('http://svn/folder a')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pysvn._pysvn_2_6.ClientError: URL 'http://svn/folder a' is malformed or the
scheme or host or path is missing
>>> c.ls('http://svn/folder%20a')
[<PysvnDirent u'http://svn/folder%20a/folder b'>]
>>> x = c.ls('http://svn/folder%20a')
>>> c.ls(x[0].name)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pysvn._pysvn_2_6.ClientError: URL 'http://svn/folder%20a/folder b' is malformed
or the scheme or host or path is missing
>>>


I had expected pysvn to either:
* Only handle encoded URLs (in which case the results from Client.ls() should be
valid URLs which can be passed back to Client.ls())
or
* Handle non-encoded URLs (in which case I should be able to pass in
'http://svn/folder a/' in the first place, and then likewise for the resulting
Dirent)

However, it seems to be mixing the two, which seems like it'll take a lot of
code in my scripts to manage consistently.

I've looked through the documentation and the issue tracker but didn't turn up
anything useful - it doesn't seem like anyone else has run into this... Is there
some code pattern which makes it easy to keep track of which parts of the SVN
URLs have and haven't been encoded?

Is this a bug or am I missing something obvious?


Many thanks,


Chris Sutton

« Previous message in topic | 1 of 3 | Next message in topic »

Messages

Show all messages in topic

[Issue 145] New - Inconsistent handling of URL encoding chrissutton Chris Sutton 2009-12-21 03:03:47 PST
     [Issue 145] Inconsistent handling of URL encoding briandamaged Brian Lauber 2011-08-20 12:06:14 PDT
     [Issue 145] Inconsistent handling of URL encoding barryscott Barry Scott 2015-11-06 05:18:55 PST
Messages per page: