#10390 closed defect (fixed)
Subversion assertion with leading double slashes in repository path
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 0.12.6 |
Component: | version control | Version: | 0.12.2 |
Severity: | normal | Keywords: | svn |
Cc: | Branch: | ||
Release Notes: |
Fix Subversion assertion while accessing repository which has the path starts with double slash characters. |
||
API Changes: | |||
Internal Changes: |
Description
When syncing a subversion repository that has leading double slashes in the path, the assertion occurs with subversion 1.6.11 and python 2.4.
Trac [/home/jun66j5/var/trac/0.12-stable]> repository add (default) //var/lib/svn/sandbox Trac [/home/jun66j5/var/trac/0.12-stable]> repository list Name Type Alias Directory --------------------------------------------- (default) //var/lib/svn/sandbox Trac [/home/jun66j5/var/trac/0.12-stable]> repository sync (default) python2.4: subversion/libsvn_subr/path.c:114: svn_path_join: Assertion `svn_path_is_canonical(base, pool)' failed. Aborted
Attachments (0)
Change History (7)
comment:1 by , 13 years ago
Keywords: | svn added |
---|
comment:2 by , 13 years ago
We would need to extend the Repository API with a normalize_repository_path
method.
comment:3 by , 12 years ago
SubversionRepository.__init__
normalizes the repository path using os.path.normpath
. However, the method keeps the leading double slashes. We can use svn_path_canonicalize
to normalize. Also, the issue doesn't occur on Windows.
Python 2.4.3 (#1, Jan 9 2013, 06:49:54) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os.path >>> from svn import core >>> repos_path = '//path//to//repos' >>> os.path.normpath(repos_path).replace('\\', '/') '//path/to/repos' >>> core.svn_path_canonicalize(os.path.normpath(repos_path).replace('\\', '/')) '/path/to/repos'
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os.path >>> from svn import core >>> repos_path = r'c:\\path\\to\\repos' >>> os.path.normpath(repos_path).replace('\\', '/') 'c:/path/to/repos' >>> core.svn_path_canonicalize(os.path.normpath(repos_path).replace('\\', '/')) 'C:/path/to/repos'
comment:5 by , 12 years ago
Milestone: | next-minor-0.12.x → 0.12.6 |
---|---|
Owner: | set to |
Status: | new → assigned |
I've verified on:
- Linux x86_64 with Python 2.6.6 and Subversion 1.6.11
- Linux i386 with Python 2.4.3 and Subversion 1.7.6
comment:6 by , 12 years ago
Release Notes: | modified (diff) |
---|---|
Status: | assigned → closed |
The [2ee9432c/jomae.git] is applied in [11789]. Thanks again, Christian!
comment:7 by , 11 years ago
Resolution: | → fixed |
---|
The same assertion happens with subversion 1.7.1.