SVN files are not moved to GitLab

Hello Amitraj,

I didn’t find any errors neither in daemon log, not in install log, it looks like everything works well, the install log shows 574 revisions were fetched and the daemon log only shows periodic checks. So it’s not clear from the logs what the issue is.
As for the spaces in SVN folders names – this is completely supported and SubGit is able to handle such situations. Git does not support spaces in references names, so if SubGit detects spaces in SVN orders names, it replaces spaces with plus signs – that is, “SVN folder” becomes “SVN+folder” in Git.

I agree with you that I successfully migrated my one SVN project on GitLab repository. I made changes at SVN and committed it then I made changes on SVN and pushed it but in both the case I did not get the changes at either GitLab (SVN changes) or SVN (GitLab changes). I did not get the svn.fetchInterval parameter as well please guide me set this up so that auto-syncing will work properly.

When I ran the following command it gave me an error:

Amits-MacBook-Pro:bin amitraj$ ./subgit configure --layout directory svn+ssh://svn@192.168.7.46/home/svn/svn/language/Apple/JuBo Localhost /Users/amitraj/Documents/VBGitLab/JuBoLocalhost.git

error: expected arguments are: [–svn-url] SVN_PROJECT_URL [GIT_REPOS_PATH] or SVN_REPOS_PATH

error: Type ‘subgit help’ or ‘subgit help configure’ for more information.

But when I ran the following command it gave me the required output:

Amits-MacBook-Pro:bin amitraj$ ./subgit configure --layout directory svn+ssh://svn@192.168.7.46/home/svn/svn/language/Apple/JuBo\Localhost /Users/amitraj/Documents/VBGitLab/JuBoLocalhost.git
SubGit version 3.3.10 (‘Bobique’) build #4368

I agree with you that I successfully migrated my one SVN project on GitLab repository. I made changes at SVN and committed it then I made changes on SVN and pushed it but in both the case I did not get the changes at either GitLab (SVN changes) or SVN (GitLab changes). I did not get the svn.fetchInterval parameter as well please guide me set this up so that auto-syncing will work properly.

From this description it looks more like the changes were made in directories that are not included in the mapping configuration. As far as I found in the logs, the mirrored directory is PDDs:

svn+ssh://svn@192.168.7.46/home/svn/svn/language/PDDs

Could you advise please what are the changes you made in SVN? And same for GitLab, could you you advise what were the branch you made changes to in GitLab and what were the changes?

When I ran the following command it gave me an error:

That’s expected as you provided more arguments than SubGit expects:

./subgit configure --layout directory svn+ssh://svn@192.168.7.46/home/svn/svn/language/Apple/JuBo Localhost  Users/amitraj/Documents/VBGitLab/JuBoLocalhost.git

SubGit expects SVN_PROJECT_URL and [GIT_REPOS_PATH] while you provided three arguments: svn+ssh://svn@192.168.7.46/home/svn/svn/language/Apple/JuBo, Localhost, and Users/amitraj/Documents/VBGitLab/JuBoLocalhost.git. Embrace the URL with quotes:

./subgit configure --layout directory "svn+ssh://svn@192.168.7.46/home/svn/svn/language/Apple/JuBo Localhost"  Users/amitraj/Documents/VBGitLab/JuBoLocalhost.git

or replace the space with URL encoded space %20:

./subgit configure --layout directory svn+ssh://svn@192.168.7.46/home/svn/svn/language/Apple/JuBo%20Localhost Users/amitraj/Documents/VBGitLab/JuBoLocalhost.git

Either of these two approaches resolves the ‘subgit configure’ issue.

From this description it looks more like the changes were made in directories that are not included in the mapping configuration. As far as I found in the logs, the mirrored directory is PDDs:

Yes, your understanding is correct.

Could you advise please what are the changes you made in SVN? And same for GitLab, could you advise what were the branch you made changes to in GitLab and what were the changes?

Thanks for your response. I made a small change in a sheet whose name is ‘TGL PDDs.xlsx’ at GitLab and SVN simultaneously.

Is it possible to discuss this on a chat or something like that, so that we can solve this issue quickly?

Hello Amitraj,

I’m afraid we don’t have a support chat, we usually communicate here or over email.
What I meant asking about the changes you made was that which SVN directory were the changes made to and which Git branch were changes made to. ‘svn log’ and ‘git log’ output for the appropriate revision and Git commit (or the whole output for all commits) would be helpful. Please advise how did you do the changes in Git – did you make the changes in a working copy and push the changes to the GitLab repository or in some other way? Also, is the new Git commit being shown in GitLab UI?

Note, by the way, that if a change made to the same branch both in SVN and Git, then it will lead to a conflict. Yet this would be shown in logs (and also during the push to a mirrored repository) which is not true in this case, so it’s not the cause in our case.

Please find the whole SubGit folder from the below link:

https://www.sendthisfile.com/hOGQVARk5UOA2iZIPydUzbLj

I made a change in the working directory of SVN then commit through Cornerstone app. I made a change in the working directory of GitLab then commit through the following command:

git add . && git commit -m “GitLab to SVN” && git push -u origin master

Hello Amitraj,

could it be possible to provide us with SVN and Git logs from the affected repository?

I have created 7 repositories on GitLab and translated successfully but after that, I am not able to push the code on new repository. Please find the attached trace file.

logs.zip (396 Bytes)

I am getting the above error while pushing this project on GitLab. Please help me with this.

Hello Amitraj,

unfortunately, the archive you sent contains to useful data, there are a couple of empty directories only. However, judging from the screenshot, the push is not possible just because there is no ‘master’ branch in the repository. The same comes from the archive you sent – the directory structure looks like a Git repository directory structure, but it’s empty that means there are no references at all in the repository. And by the way, there are no single SubGit file or directory in the archive – if you archived the whole repository, then this fact means the repository was definitely configured incorrectly. Even empty GitLab repository (just created in GitLab UI) contains some references, and of course, SubGit adds more file, folders and references to the repository, so it looks like repository was somehow cleared or you are accessing incorrect directory on GitLab server.

So, how can I solve this issue or are you trying to say that I can not translate my SVN repository on my GitLab?

Hello Amitraj,

I don’t understand your setup at all: as I mentioned, a new GitLab repository has “master” branch from the very beginning, right after the GitLa repository is created in GitLab UI. Moreover, if you installed SubGit in this repository, there must be some additional files and references. But you sent me a zip file that contains no files at all; and the screenshot states there’s no “master” in the repository – and that means the directory you trying to push to is empty. I have no idea how has this happened, my assumption is that you are dealing with incorrect directory, but that’s just a guess, I have no information at all to say for sure. It’s surely possible to translate SVN repository to GitLab, but definitely something is configured not right. To find out what exactly is incorrect, please describe in details all the steps you took to translate this repository to GitLab – I mean, start from the GitLab repository creating and please mention all the details, like names and paths you set and commands you ran.

Following are the commands which I ran for this translation:

  1. I have configured the GIT_REPO_PATH parameter using the following command:

GIT_REPO_PATH=/users/amitraj/Documents/Translation/Others_Common_VB_PinGen.git

  1. I have run the following command to configure SubGit:

./subgit configure --layout directory “svn+ssh://svn@192.168.7.46/home/svn/svn/language/Others/Common/Visual Basic/PinGen” $GIT_REPO_PATH

  1. I have run the following command to install SubGit:

./subgit install $GIT_REPO_PATH

  1. I have run the following command to register license:

sudo ./subgit register --key /users/amitraj/Documents/Translation/subgit.key $GIT_REPO_PATH

  1. Create a new repository named ’ Others_Common_VB_PinGen’.
  2. Went to the ‘/users/amitraj/Documents/Translation/Others_Common_VB_PinGen.git’ folder.
  3. Ran the following command without any issue:

git remote add origin git@gitlab.com:AmitRaj_007/others_common_vb_pingen.git

  1. Ran the following command and got the error:

git push -u origin master

Is there any size limit of a GitLab group?

Thanks Amitraj, now the setup is clearer.

Try to push with the following command:

git push github --all --follow-tags

instead of pushing only master.

github or gitlab or something else?

this should be the name of the remote. If you added the remote as ‘origin’ then it should be set so:

git push origin --all --follow-tags

The following command worked for one repository but did not work for another repository:

git push origin --all --follow-tags

I followed the same set of steps but got following output:

Amits-MacBook-Pro:BAJ_EMI_TEST.git amitraj$ git push origin --all --follow-tags
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch.
fatal: the remote end hung up unexpectedly
Everything up-to-date

This means the SubGit repository you are trying to push from is empty. Most probably SubGit configuration in this repository is incorrect and SubGit hasn’t imported any data because of this.

How can I correct this?

Configure SubGit repository correctly.
Most probably the SVN URL you set points nowhere, so make sure the URL is pointing to a real SVN directory.

Thanks for your response. Can you please tell me how can I backup of GitLab group with its history where there are more than 50 repositories in it?
GitLab is not installed on my Mac, I am accessing it on browser only.