Hello!
We want to move from SVN to Git so I am trying your tool out. Looks great! I followed the instructions, finally did the “subgit import dakos-git”
Adjust Subversion to Git branches mapping if necessary:
/home/t_zaharia/dakos-git/subgit/config
Define at least one Subversion credentials in default SubGit passwd file at:
/home/t_zaharia/dakos-git/subgit/passwd
OR configure SSH or SSL credentials in the [auth] section of:
/home/t_zaharia/dakos-git/subgit/config
Optionally, add custom authors mapping to the authors.txt file(s) at:
/home/t_zaharia/dakos-git/subgit/authors.txt
Most probably your SVN repository layout does not follow the standard SVN layout with branches, tags and trunk directories and that’s the reason why nothing has been imported: the matter is that by default SubGit supposes the standard layout and creates appropriate configuration when the layout is not set in the configuration command. One possible option to resolve the issue to change the configuration manually after the configure command finishes: this command creates an initial configuration that can be adjusted. Edit the dakos-git/subgit/config file and change the svn.trunk, svn.branches, and svn.tags setting so that they reflect your SVN repository layout. Here is our article that describes possible configuration options:
Another option is to user the layout auto option to generate suitable configuration automatically. This can be done with the following configure command:
subgit configure --layout auto --trunk SVN_URL GIT_REPO
SVN_URL here stands for the SVN repository URL; GIT_REPO is the target Git directory. With these options SubGit will connect to the SVN repository, scan its history and create a configuration reflecting the layout and history. Note, that inconsistencies are possible depending on history, so better to review the configuration before the actual import.
then open the dakos-git/subgit/config and change the configuration like this:
[svn]
…
trunk = dakos:refs/heads/master
the rest mapping lines (branches, tags) can be safely commented. This configuration will also import all the data into “master” but also allows adding more configuration lines later.
I’m no sure what is the current state of the repository exactly, but let me try to describe all possible situations.
First of all, SubGit creates so-called “bare” repository – a repository without working directory. A bare Git repository contains all the data, but in Git database, not as a regular files. To get the files clone the repository from that bare repository:
git clone REPO
and all the files will appear there in the working directory.
Second, it’s not completely clear for me what exact procedure have you followed: the matter is that almost all SubGit command create a Git structure, but the actual data will only appear after actual import. So, for example, running subgit configure will create a repository with normal Git structure, but it won’t contain any data from SVN after this command, it will be needed to run ‘subgit install’ or ‘subgit import’ to get the data from SVN.
Then, if subgit import or subgit install run smooth and report success, but there’s no data in the SubGit repository (cloned to a working directory), then^ as we discussed earlier, most probably SubGit’s mapping configuration does not match to SVN repository layout and so SubGit tries to get data from inexistent paths thus retrieving nothing. To resolve this issue mapping configuration in SubGit configuration must be set so that it reflects actual SVN repository layout.