Trying out your demo to see but something went wrong

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”

$ ./subgit-3.3.15/bin/subgit configure https://gaia-subversion.neuropublic.gr/svn/neuro-jsf-pilot/trunk/apps/dakos dakos-git
SubGit version 3.3.15 (‘Bobique’) build #4442

Configuring writable Git mirror of remote Subversion repository:
Subversion repository URL : https:///svn/neuro-jsf-pilot/trunk/apps/dakos
Git repository location : dakos-git

CONFIGURATION SUCCESSFUL

To complete SubGit installation do the following:

  1. Adjust Subversion to Git branches mapping if necessary:
    /home/t_zaharia/dakos-git/subgit/config
  2. 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
  3. Optionally, add custom authors mapping to the authors.txt file(s) at:
    /home/t_zaharia/dakos-git/subgit/authors.txt
  4. Run SubGit ‘install’ command:
    subgit install dakos-git
    $ nano /home/t_zaharia/dakos-git/subgit/passwd
    $ nano /home/t_zaharia/dakos-git/subgit/authors.txt
    $ ./subgit-3.3.15/bin/subgit import dakos-git
    SubGit version 3.3.15 (‘Bobique’) build #4442

Translating Subversion revisions to Git commits…

Subversion revisions translated: 109930.
Total time: 5 seconds.

IMPORT SUCCESSFUL

but when I looked in the file structure, everything was empty…

$ ll dakos-git/refs/heads/
total 0
$ more dakos-git/packed-refs

pack-refs with: peeled fully-peeled

$ ll dakos-git/svn/
total 0
$ ll dakos-git/branches/
total 0
$ more dakos-git/HEAD
ref: refs/heads/master

What could have gone wrong?

Kind regards,
Theoni

Hi Theoni,

thanks for your interest on our products!

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:

TMate SubGit: Branches and tags mapping

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.

Hello!

Thank you so much for the reply!

I want to transfer a single project:

https:///svn/neuro-jsf-pilot/trunk/apps/dakos

So as to test it and then have the whole svn transferred.

Our trunk url is: https:///svn/neuro-jsf-pilot/trunk

svn url: https:///svn/neuro-jsf-pilot/trunk/apps
Repository Root: https:///svn/neuro-jsf-pilot

So, how should I make the mapping?

The trunk url requires a path, if I understand correctly…

Thank you so much!

Kind regards,
Theoni

Θεώνη Ζαχαριά │ Τεχνική Υποστήριξη
NEUROPUBLIC AE │ Μεθώνης 6, Πειραιάς, 18545, Αττική
Τ : 210 4101010 – εσωτ. 1814 │ F : 210 4101013 │ W : www.neuropublic.gr | www.gaiasense.gr

NEUROPUBLIC A.E.gaiasene
Τεχνολογίες Πληροφορικής | Υπηρεσίες ευφυούς γεωργίας

Join us inFacebookTwitterLinkedin

Hello,

if the intent is to only import the content of “trunk/apps/dakos” directory into “master” branch in Git, then it can be set like follows:

subgit configure --layout directory --svn-url https://svn/neuro-jsf-pilot/trunk/apps/dakos dakos-git

This approach, however, does not allow adding more branches in the the feature, so it might be better to go this way:

subgit configure --layout std --svn-url https://svn/neuro-jsf-pilot/trunk/apps dakos-git

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.

Oh, you were right!

It worked!

Thank you!

Θεώνη Ζαχαριά │ Τεχνική Υποστήριξη
NEUROPUBLIC AE │ Μεθώνης 6, Πειραιάς, 18545, Αττική
Τ : 210 4101010 – εσωτ. 1814 │ F : 210 4101013 │ W : www.neuropublic.gr | www.gaiasense.gr

NEUROPUBLIC A.E.gaiasene
Τεχνολογίες Πληροφορικής | Υπηρεσίες ευφυούς γεωργίας

Join us inFacebookTwitterLinkedin

Hello!

Sorry to bother you again!

The procedure created the git structure but the files from the svn where not included.

Is there a way to get the files as well?

Kind regards,
Theoni

Θεώνη Ζαχαριά │ Τεχνική Υποστήριξη
NEUROPUBLIC AE │ Μεθώνης 6, Πειραιάς, 18545, Αττική
Τ : 210 4101010 – εσωτ. 1814 │ F : 210 4101013 │ W : www.neuropublic.gr | www.gaiasense.gr

NEUROPUBLIC A.E.gaiasene
Τεχνολογίες Πληροφορικής | Υπηρεσίες ευφυούς γεωργίας

Join us inFacebookTwitterLinkedin

Hello Theoni,

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.

Hello Ildar,

thanks for your reply.

I will check it.

I am new to git…

Kind regards,
Theoni

Θεώνη Ζαχαριά │ Τεχνική Υποστήριξη
NEUROPUBLIC AE │ Μεθώνης 6, Πειραιάς, 18545, Αττική
Τ : 210 4101010 – εσωτ. 1814 │ F : 210 4101013 │ W : www.neuropublic.gr | www.gaiasense.gr

NEUROPUBLIC A.E.gaiasene
Τεχνολογίες Πληροφορικής | Υπηρεσίες ευφυούς γεωργίας

Join us inFacebookTwitterLinkedin