After import of SVN to GIT the repo is only 11.93 kB

Sagar Parikh December 11, 2012

I get the below message that the conversion is compleate but when I try and pull the Repo it is empty.

Import to Git repository MyCompany CORE / keystone1 from Subversion repository at svn://ci.mycompanysvn.com/Keystone has been completed; 23498 revisions have been processed.

5 answers

1 accepted

0 votes
Answer accepted
Semyon Vadishev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Hello Sagar,

I'm one of SVN Importer developers.

What version of Stash do you use? And what's the version of the plugin?

After the import is done, does Stash show any files or commits for your repository?

There's a chance that the default branch now refers to non-existing Git ref; try to fix that:

  1. Go to repository settings tab;
  2. Choose 'master' as a default branch there;
  3. Click 'Save';
  4. Try to clone your repository once again;

Does that help?

Thanks,

Semyon

Update for further references:

The problem was caused by misconfiguration of trunk, branches & tags options. See my comment below — https://answers.atlassian.com/questions/114983/after-import-of-svn-to-git-the-repo-is-only-11-93-kb/115024

Sagar Parikh December 11, 2012

Stash version is 2.0.0 (just downloaded it this week)

SVN Importer for Atlassian Stash version is 1.0.1 (Just installed it this week)

Stash does not show any files or commits in the repository

There are no options under the default branch.

for a little more info the svn structure looks like the below if that might have something to do with it.

svn://ci.mycompanysvn.com/Keystone/Branches

svn://ci.mycompanysvn.com/Keystone/Trunk

Sagar Parikh December 11, 2012

The size of the repo after the convertion is only 11.93 kB.

The link that you have provided to upload the data ( this issue) does not work I get an access denied.

But the subgit.0.log is empty

Semyon Vadishev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Do you have access to the machine that runs Stash?

If so, please provide us the debug log of the importing process. You can find it at

/path/to/stash.home/data/repositories/<repository_id>/subgit/subgit-import-XYZ.zip

Note: you can find path to Git repository (/path/to/stash.home/data/repositories/<repository_id> in the example above) using Repository SysInfo Plugin; it adds a special tab to the repository page that shows the absolute path to Git repository at the server. This plugin shows the size of the imported repository as well, does it look like empty?

Pleases submit the debug log archive to this issue at our tracker.

Thanks you in advance,

Semyon

Semyon Vadishev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Ah, right. You had to specify proper "Trunk", "Branches" and "Tags" (if you actually use "Tags").

Otherwise SVN Importer can't find any branches and tags as it looks into "trunk", "branches" and "tags" locations by default.

So, try to do the following now:

  1. Create another empty Git repository;
  2. Go to "Import from SVN" page;
  3. Specify all the options as shown below:Import Settings
  4. Click "Import" button, everything should go fine this time.

Cheers,

Semyon

Sagar Parikh December 12, 2012

Thanks that seams to have fixed my issue.

1 vote
Alexander Kitaev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Default Subversion repository layout expected by SVN Importer is /trunk, /branches and /tags directories, not that these names are case-sensitive. In your case you most probably had to set the following import options:

SVN URL: svn://ci.mycompanysvn.com/KeyStone

Trunk: Trunk

Branches: Branches/*

Tags: Tags/*

In case you use default "trunk" and "branches/*", then import will work, but will not actually import anything as your source repository contains Trunk directory, not trunk.

Could this be the reason of the problem?

0 votes
Alan Keister March 7, 2013

Thanks you. That worked.

Semyon Vadishev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2013

Please try the following options:

Subversion URL: https://host/svn/root

Trunk: Project

Branches: Branches/*

Tags: Tags/*

0 votes
Alan Keister March 6, 2013

I have the same problem. I don't have a "trunk" defined. We use the repository url as the trunk and a separate "Branches" at the same level as the main repo. What should I enter in the trunk field?

Semyon Vadishev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2013

Hello Alan,

AFAIU, you have the following layout:

trunk: http://host/svn/root/project

branches: http://host/svn/root/branch1, http://host/svn/root/branch2, ..., http://host/svn/root/branchN

Is that correct? Could you specify layout of your repository explicitly?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events