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

Dominik Rauch June 23, 2014

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 votes
Rik Ribbers August 17, 2014

After upgrading subversion to 1.7.9 the problem is fixed

Dominik Rauch August 17, 2014

Server or client-side update?

Rik Ribbers August 17, 2014

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

0 votes
Rik Ribbers July 23, 2014

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.....

0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 24, 2014

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

Dominik Rauch June 24, 2014

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 :-( ]

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 24, 2014

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

Dominik Rauch June 24, 2014

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.

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 24, 2014

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

Dominik Rauch June 24, 2014

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.

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 24, 2014

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

Rik Ribbers July 23, 2014

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

Dominik Rauch July 27, 2014

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)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events