hgsubversion fails to clone repo in stupid mode with assertion failure

Issue #436 invalid
created an issue

The error is

python: /build/buildd/subversion-1.8.8/subversion/libsvn_subr/dirent_uri.c:1500: uri_skip_ancestor: Assertion `svn_uri_is_canonical(child_uri, ((void *)0))' failed.

The reason: this happens when you try to clone a repo that has a file with a plus sign in its name (or any other character that is valid to appear in a real url, see subversion sources, comments to svn_uri__char_validity[256] in libsvn_subr/path.c for the full list). This sign gets escaped in "path2url" funcition, and svn asserts that it should not be escaped in canonical svn url.

The solution: add "safe" parameter with the list of these characters (plus "/" as mentioned in urllib.quote documentation) to urllib.quote call in subvertpy_wrapper.py:path2url.

Comments (1)

  1. Augie Fackler repo owner

    If you have a proposed bugfix, please send a patch to the hgsubversion list (preferably with a test case.)

    I'm honestly not even sure what your failure mode here was.

  2. Log in to comment