How to debug git svn fetch invalid XML

2020-03-26 07:36发布

问题:

I try to convert a SVN repository to git using git2svn. My server uses username and password.

I did

svn2git https://example.com/svn/bar

And get the error

Initialized empty Git repository in /tmp/bar/.git/
Error from SVN, (130003): XML data was not well-formed: The REPORT response contains invalid XML (200 OK)

command failed:
git svn fetch 

When doing git svn fetch in the new folder, I get the same error.

How can I debug this? git svn fetch does not seem to have a --verbose option.

svn co https://example.com/svn/bar

works...

edit

Based on the answer by kan I tried several things:

  • I disabled authentication on the repo
  • I disabled HTTPS
  • I downloaded subgit

Subgit shows

error: Import has been interrupted; --svn-url option is not valid at the moment.

After calling it with subgit import --svn-url http://example.com/svn/bar bar.git

it works.

I also did a network analysis using wireshark and saw comments with German umlauts. Does maybe svn2git have encoding problems here?

auskommentierten Legacy-Code endg\374ltig entfernt

and seems not even to do any connection.

回答1:

svn co may works well only because it checks out last revision, while git svn downloads the whole repository. So, probably the remote repository is corrupted at some revision.

A few things to try:

  1. Use a tool to capture http traffic
  2. If you have direct access to the repository (not via https), try using it
  3. Use svnrdump to download whole dump of the repository into your local drive and try to play with it.
  4. Try to use subgit instead.


标签: git svn