fragglet / agito

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

Source of copied parent branch not found. #1

Closed justinpitts closed 11 years ago

justinpitts commented 11 years ago

I encounter this error very quickly, on attempting to run the tool. The output looks like: ===== master Traceback (most recent call last): File "./agito.py", line 986, in head_id = get_history_for_path(path) File "./agito.py", line 838, in get_history_for_path commit_id = follow_parent_branch(path, log[-1]) File "./agito.py", line 711, in follow_parent_branch assert False, "Source of copied parent branch not found." AssertionError: Source of copied parent branch not found.

My first assumption is that my subversion repo url may be an issue: SVN_REPO = "http://wolfwood.int.infograph.com:81/svn/igc/integrations/IBM/Navigator"

fragglet commented 11 years ago

You probably shouldn't try to use a remote URL as the SVN_REPO location. You need a full copy of the repository on local disk to convert.

fragglet commented 11 years ago

That said, you probably have found a bug. It's difficult for me to diagnose because the repository isn't publicly visible. Try adding a "print entry.changed_paths" at the top of follow_parent_branch() and that will output some information that may be useful.

justinpitts commented 11 years ago

edit i stink at formatting. using Gist.

Having written subversion-facing tools in the past, I've had difficulties with repository url vs path/to/project.

Here is what I changed:

https://gist.github.com/justinpitts/6556590

here is the output:

===== master /trunk /integrations/IBM/Navigator/trunk Traceback (most recent call last): File "./agito.py", line 988, in head_id = get_history_for_path(path) File "./agito.py", line 840, in get_history_for_path commit_id = follow_parent_branch(path, log[-1]) File "./agito.py", line 713, in follow_parent_branch assert False, "Source of copied parent branch not found." AssertionError: Source of copied parent branch not found.

fragglet commented 11 years ago

I think you have the wrong repository path. Perhaps this will work?

SVN_REPO = "http://wolfwood.int.infograph.com:81/svn/igc/"

justinpitts commented 11 years ago

It may work, but it is overbroad. This path contains a lot of projects. How do I indicate that the path to my project is integrations/IBM/Navigator ?

fragglet commented 11 years ago

(FYI you'll need to change the paths in BRANCHES and TAGS in your config file to include the full /integrations/IBM/Navigator/... part)

fragglet commented 11 years ago

Understood, but agito should only look at the paths you give in BRANCHES and TAGS - the rest of the repo should be ignored.

justinpitts commented 11 years ago

Ahh. I'll try.

justinpitts commented 11 years ago

It started to work.

We have some oddball filenames in our repo - test cases actually for filename handling.

If you prefer, I can file this as a separate issue.

Traceback (most recent call last): File "./agito.py", line 986, in head_id = get_history_for_path(path) File "./agito.py", line 838, in get_history_for_path commit_id = follow_parent_branch(path, log[-1]) File "./agito.py", line 722, in follow_parent_branch changed_path.copyfrom_revision.number) File "./agito.py", line 838, in get_history_for_path commit_id = follow_parent_branch(path, log[-1]) File "./agito.py", line 722, in follow_parent_branch changed_path.copyfrom_revision.number) File "./agito.py", line 838, in get_history_for_path commit_id = follow_parent_branch(path, log[-1]) File "./agito.py", line 722, in follow_parent_branch changed_path.copyfrom_revision.number) File "./agito.py", line 842, in get_history_for_path return construct_history(path, commit_id, log) File "./agito.py", line 759, in construct_history mutate_tree_from_log(treedir, path, entry) File "./agito.py", line 355, in mutate_tree_from_log log, changed_path) File "./agito.py", line 307, in process_add_modify filetype = svn_file_type(changed_path.path, revision) File "./agito.py", line 216, in svn_file_type recurse=False) pysvn._pysvn_27.ClientError: Unable to connect to a repository at URL 'http://wolfwood.int.infograph.com:81/svn/igc/integrations/IBM/Workplace/trunk/appserver/TestData/export/content/%3F.%3E,%3C'%22%3B:%5C%5D%7D%5B%7B=+-)(&%5E%25$%23@!%60~.xrl' 'http://wolfwood.int.infograph.com:81/svn/igc/integrations/IBM/Workplace/trunk/appserver/TestData/export/content/%3F.%3E,%3C'%22%3B:%5C%5D%7D%5B%7B=+-)(_&%5E%25$%23@!%60~.xrl' path not found

fragglet commented 11 years ago

Yes, please file a separate bug for that.

fragglet commented 11 years ago

I've committed a change that adds a check on startup that SVN_REPO points to the root of the repository. So I believe this bug is at least fixed.