fragglet / agito

Subversion to Git conversion script
GNU General Public License v2.0
11 stars 6 forks source link

agito fails on converting eternity engine #3

Open MP2E opened 10 years ago

MP2E commented 10 years ago

When trying to convert the Eternity Engine SVN repository to git with agito, it fails with the following error:

<- source/sdl/macosx/EternityLaunch - SnowLeopard Snapshot.xcodeproj/xcuserdata/macbook.xcuserdatad/xcschemes/Eternity%20Engine.xcscheme

Traceback (most recent call last): File "./agito.py", line 1045, in head_id = get_history_for_path(path) File "./agito.py", line 859, in get_history_for_path return construct_history(path, commit_id, log) File "./agito.py", line 776, in construct_history mutate_tree_from_log(treedir, path, entry) File "./agito.py", line 372, in mutate_tree_from_log log, changed_path) File "./agito.py", line 333, in process_add_modify recursive_copy(treedir, filepath, changed_path) File "./agito.py", line 320, in recursive_copy src_path, src_revision) File "./agito.py", line 256, in add_to_tree_from_svn blob_id = create_blob_from_svn(svnpath, revision) File "./agito.py", line 217, in create_blob_from_svn data = svnclient.cat(svn_path(path), svn_revision(revision)) pysvn._pysvn_2_7.ClientError: '/trunk/source/sdl/macosx/EternityLaunch - SnowLeopard Snapshot.xcodeproj/xcuserdata/macbook.xcuserdatad/xcschemes/Eternity%20Engine.xcscheme' path not found

sleepy-manul commented 7 years ago

I experienced a similar dump when trying to convert a local repository here. I have a feeling this issue is caused by spaces and other characters in file names. At some point, a space character(" ") gets converted to ("%20") and agito tries to retrieve a file with "%20" from Subversion, which fails.

glensc commented 7 years ago

i used this hack:

@@ -212,6 +218,9 @@ def svn_path(path):
        # Parse the repository's URL, join the paths and then reassemble
        # back into a full URL.

+        # XXX: path already encoded
+        path = path.replace("%20", " ")
+
        repo_url = urlparse(config["SVN_REPO"])
        full_path = os.path.join(urllib.unquote(repo_url.path), path)