Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svn.cpp: Do not call svn_fs_copied_from on delete #4

Merged
merged 1 commit into from Dec 1, 2015

Conversation

neverpanic
Copy link
Contributor

When converting the MacPorts Subversion repository to Git, the conversion fails at revision 8:

Exporting revision 8 svn: E160013: File not found: revision 8, path '/trunk/base/Tcl/pkgIndex.tcl'

I'm not sure whether the offending call to svn_fs_copied_from worked in earlier versions of Subversion. For the record, my copy was built against Subversion 1.9.2. My solution for the problem is not calling svn_fs_copied_from for deleted files (because their history must obviously be where they are deleted anyway, you cannot (or can you, but why would you) copy a file and delete it in the same commit).

Deleted paths will not be in the repository in the revision where they
were deleted. Calling svn_fs_copied_from() on such a path will return an
error and abort operations, which is not what we want here.

Fix this by not calling svn_fs_copied_form if the change is a deletion
(i.e. change->change_kind == svn_fs_path_change_delete).

Failure to do so leads to error messages when exporting a repository:

    Exporting revision 8 svn: E160013: File not found: revision 8, path '/trunk/base/Tcl/pkgIndex.tcl'

Signed-off-by: Clemens Lang <neverpanic@gmail.com>
@DarkHelmet433
Copy link

For what its worth, we've hit this same bug on FreeBSD.org for the svn -> git exporter.

tnyblom added a commit that referenced this pull request Dec 1, 2015
svn.cpp: Do not call svn_fs_copied_from on delete
@tnyblom tnyblom merged commit d4ff0b2 into svn-all-fast-export:master Dec 1, 2015
glensc added a commit to pld-linux/svn-all-fast-export that referenced this pull request Mar 12, 2016
fixes crashes of delete events
svn-all-fast-export/svn2git#4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants