0

1st question:

We have SVN running on on linux with multiple different projects. I'm trying to create a mirror between them with subgit so we could use both SVN and Git for transition phase. I did manage to do subgit installation and managed to transfer files from SVN to Git for one project as a test. I gave url to subgit for this certain project.

url = http://lnx-server/svn/TestProject

Under TestProject there is branches, trunk and tags like there should be in SVN repo.

As default config file looks like this:

trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
tags = tags/*:refs/tags/*
shelves = shelves/*:refs/shelves/*

All the files moved from SVN like they should.

Now I'm trying to understand how to move all the projects at the same time from SVN to git. I assume previously mentioned paths are the part what I need to modify in conf file. If SVN project would look something like this:

http://lnx-server/svn/TestProject
http://lnx-server/svn/TestProject/TestProject1
http://lnx-server/svn/TestProject/TestProject1/branches
http://lnx-server/svn/TestProject/TestProject1/tags
http://lnx-server/svn/TestProject/TestProject1/trunk
http://lnx-server/svn/TestProject/TestProject2
http://lnx-server/svn/TestProject/TestProject2/branches
http://lnx-server/svn/TestProject/TestProject2/tags
http://lnx-server/svn/TestProject/TestProject2/trunk
http://lnx-server/svn/TestProject/TestProject3
http://lnx-server/svn/TestProject/TestProject3/branches
http://lnx-server/svn/TestProject/TestProject3/tags
http://lnx-server/svn/TestProject/TestProject3/trunk

How do I need to modify config file for Subgit to understand it correctly?

2nd question:

I'm also facing problem with single project install. Although I managed to move all the files from SVN to Git I have not been able to sync changes from one to another. There is "fetchInterval = 60" in conf file. So Subgit should check for changes in SVN in one minute interval? When commit something to SVN and Git Sync... There is no changes.

Lauri
  • 137
  • 1
  • 2
  • 8

1 Answers1

1

SubGit import SVN data to Git on per-project basis, so the steps you took on the test project should be repeated for every single SVN project individually. Each project is supposed to be translated to its own Git repository and each of them should have its own configuration. Here is a guide that describes steps for a single SVN project translation to Git:

https://subgit.com/documentation/remote-book.html

this should be performed for each project you intend to import -- so, you need to do it for TestProject1, TestProject2, and TestProject3 separately.

The "fetchInterval" setting represents how often SubGit checks SVN repository for changes, indeed. Default is 60 which one minute. When some changes are pushed to a mirrored Git repository, they are being sent to SVN immediately. Most often, if changes don't propagate from Git to SVN and back in a mirrored repository, that means that the mapping configuration in the repository is incorrect, so it would worth checking it out. But there may be other reasons for that, so better to ask SubGit support on their forum.

ildar.hm
  • 526
  • 2
  • 5