4

I am in the process of migrating svn repositories to git, using git svn clone, then pushing the clone to a remote origin to act as the new git repository.

Using this process I have successfully migrated 34 svn repos so far, but during the git svn clone process, 4 have failed due to the following error

Command:

git svn clone --authors-file=authors.txt svn+ssh://git@server/path/to/SVN/project/trunk/repo_name repo_name.git

Resulting in the error:

Svndiff data contains backward-sliding source view: Svndiff has backwards-sliding source views at /usr/libexec/git-core/git-svn line 5061

Has anyone encountered this error before and found a way around it, either forcing the git svn clone to ignore the error and continue, or to repair the SVN repo first?

I should probably add a little more background to this issue. I've been pointed in the direction of various tools to assist with the svn to git migration, but unfortunately most of these are a one way conversion and are not suitable for the task.

I have approximately 100 individual code bases to convert, and each of these are live systems in active development, so the migration will be a phased approach.

  1. Create live git clone of each svn repo -> keep in sync using git svn rebase, then push to remote origin master branch. git in read-only mode (for developers).
  2. Begin using git repo for code reviews rather than svn
  3. Start branching git repo for changes rather than svn, sync changes back to svn. svn in read only mode (for developers).

SVN will likely be used for the deploy/build process, so I cannot do a one time conversion and need to maintain the sync using git svn dcommit to push back at all stages.

1
  • As a temporary work around I was able to specify a revision to start the clone from. This allowed me to continue with the process until I can find a solution for cloning the entire revision history. Jul 23, 2014 at 8:58

1 Answer 1

0

Switching the protocol may help as a work around for this error message. I had the same problem when checking out using svn over https. I switched the protocol from https:// to file:// (server data in the same computer) which helped me to overcome the issue. You can check out the link of support thread for details: https://support.tmatesoft.com/t/subgit-svn-to-git-migration-issue-fails-by-svn-error-e185001/2428/5 for other steps. This workaround helped me to migrate a legacy repo into git format. I was using subgit.

1
  • 1
    I was originally doubtful that this would help. In theory, it should make no difference right? But apparently the bug is dependent on protocol. This did indeed help me get past this exact error as well. Thank you for the suggestion! (I did later encounter a similar internal error, but I was able to resolve that by rebuilding the original repo (which was really old) using svnadmin dump and svnadmin load commands and then trying the git-svn migration again.
    – wojtow
    Oct 22, 2020 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.