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

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

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

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

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

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

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

Thanks that seams to have fixed my issue.

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?

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?

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?

Please try the following options:

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

Trunk: Project

Branches: Branches/*

Tags: Tags/*

Thanks you. That worked.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

849 views 2 9
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