git svn clone: branches / tags with whitespaces not supported?

We're currently trying to migrate a huge SVN repository Git (Atlassian Stash) using the guide at https://www.atlassian.com/git/migration.

However, we ran into the problem that the process stopped after about 3000 revisions with the following error:

Found possible branch point: https://svn/repo/trunk -> https://svn/repo/tags/T a g with Spaces , 3018

W: Refspec glob conflict (ref: refs/remotes/trunk):
expected path: branches trunk
real path: trunk
Continuing ahead with trunk
[this block is shown 6 times]

fatal: Not a validobject name refs/remotes/tags/T a g with Spaces
cat-file commit refs/remotes/tags/T a g with Spaces: command returned error: 128

Unfortunately we are not able to rename branches/tags in SVN - is there any workaround / or even a fix you could provide? This is stopping us from migrating many of our legacy projects to the Atlassian Stash platform.

3 answers

0 vote

Hi Dominik,

Thank you for your question.

In order to accomplish the command successfully, I would kindly ask you to replace

'/svn/dev/test/tags/release 1.0/'
with 
'/svn/dev/test/tags/release%201.0/'

Kind regards,
Rafael

Where exactly should I replace that?

[ I cannot rename branches/tags in the SVN repository itself. If that is really required, the migration will most probably not happen and the repositories will not be moved from SVN to Stash :-( ]

I might have got the error above mentioned when running the command under the following link:

https://www.atlassian.com/git/migration#!migration-convert

Please, replace the suggest in the same command.

Kind regards,
Rafael

There is no space in the repository name I could replace, the space is in a SVN tag name.

My command looks like:

git svn clone --stdlayout --authors-file=authors.txt
https://svn/repo RepoAsGit

Sorry, maybe it is my fault, however, I don't see where to insert your suggested replacement.

Hi Dominik,

Please, have a look to the command below (Non-standard SVN layouts) the one you have ran by following the Migrate to Git from SVN documentation.

Non-standard SVN layouts

If your SVN repository doesn’t have a standard layout, you need to provide the locations of your trunk, branches, and tags using the --trunk, --branches, and --tags command line options. For example, if you have branches stored in both the /branches directory and the /bugfixes directories, you would use the following command:

git svn clone --trunk=/trunk --branches=/branches --branches=/bugfixes --tags=/tags --authors-file=authors.txt <svn-repo>/<project> <git-repo-name>

This is the Git version I have used to test the issue raised:

$ git --version
git version 1.8.5.2

Kind regards,
Rafael

Thank you, but this doesn't solve the problem. Our repository format follows all the standard guidelines of SVN repository structuring (i.e. trunk, branches, tags folders).

The problem is that one of the tags contains a space, which prevents the tool from properly migrating.

Hi Dominik,

I would kindly ask you to follow the instructions in this URL:
http://www.sailmaker.co.uk/blog/2013/05/05/migrating-from-svn-to-git-preserving-branches-and-tags-3/

Kind regards,
Rafael

Hello Dominik,

I have the same problem with my migration.... ( see https://answers.atlassian.com/questions/303875/migration-git-stash-fails-on-spaces-in-tag-name)

any luck so far with the suggestion from Rafael?

Kind regards,

Rik Ribbers

No, the suggestions of Rafael are pointing into a completely different direction. We switched our tooling to svn2git which had no problems converting our repository. The Atlassian tool is now just used to obtain the list of authors.

(note: the list of authors had not been complete, however, after svn2git breaks, edit the list and restart it - svn2git can carry on from the point it stopped)

Did some more digging, seems like we have to deal with a bug in subversion.

http://subversion.tigris.org/issues/show_bug.cgi?id=3278

We are going to upgrade subversion to 1.8 and test it again.....

After upgrading subversion to 1.7.9 the problem is fixed

Server or client-side update?

The upgrade was done on the migration machine (where the git svn commands are executed)

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,764 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you