Non standard layout migration

247 views
Skip to first unread message

XiaoQiang Wang

unread,
Aug 21, 2017, 10:44:48 PM8/21/17
to SubGit Users
Hi group,

In recent days, i have been working on the migrating from svn to gitlab using subgit.
My purpose is one time import. But i encountered some problem caused by the complexity:
  • the layout is non-standard, the current repo's structure is:
-repo
    -- trunk
-- projectA
-- project suite
-- projectB 
-- projectC 
 
    -- tags 
-- projectA 
-- project suite 
-- projectB 
-- projectC 
 
  •  the trunk and tags are renamed before
some times ago, the original name of trunk is branch, and the original name of tags is trunk, that is:
original trunk -> renamed to current tags
original branch -> renamed to current trunk
and since original branch is renamed, currently no branch exists anymore


i would like to import each project(projectA, projectB, projectC into gitlab respectively), the problem is i cannot retrieve the historical svn logs before renaming, when migrating to gitlab using subgit.
i tried many ways but did not work. Two typical ones:
1, could be executed, but only logs after renaming:
subgit import  --non-interactive --authors-file ..\authormap.txt --trunk "trunk/project suite/projectB" --username user --password pass --svn-url "path/to/repo" projectB.git

2, could be executed, but no heads ref to be generated, and cannot push to gitlab since lack of heads. I got this idea from https://groups.google.com/forum/#!topic/subgit-users/-2Xon4RIWd8
subgit import  --non-interactive --authors-file ..\authormap.txt --trunk "trunk/project suite/projectB:refs/heads/master" --branches "branch/project suite/project:refs/heads/previous/master" --username user --password pass --svn-url "path/to/repo" projectB.git

could anyone know whether subtit support such scenarios, or any other solution with subgit? thanks.
 
 
 
 
 
 
 

TMate Software Support

unread,
Aug 22, 2017, 7:24:22 AM8/22/17
to SubGit Users
Hello Wang,

First, I'd suggest you to perform import in two steps (as described at https://subgit.com/import-book.html#chapter-3-import-with-preliminary-configuration-tuning page):

1. Run subgit configure:

$ subgit configure SVN_URL repos.git

2. Edit repos.git/subgit/config:

[svn]
# url to repository root, e.g. http://svn.company.com/repos/x 
# or in case of local repository: file:///var/lib/svn/svn_repository
url = SVN_URL 

# include both present and deleted branches into mapping:

trunk = trunk/project suite/projectB:refs/heads/master
branches = branch/project suite/projectB:refs/heads/previous_master
tags = tags/project suite/projectB:refs/tags/tag

[auth]
userName = svnuser
password = password

3. Run import:

$ subgit import repos.git

Above mapping expects that "branch/project suite/projectB" and "tags/project suite/projectB" directories - represent branches and doesn't contain branches withing (e.g. tags/project suite/projectB/1.0, etc). Is that the case?

Regards,
Alexander Kitaev,
TMate Software.

XiaoQiang Wang

unread,
Aug 23, 2017, 2:54:52 AM8/23/17
to SubGit Users
Hi,
Thanks for your reply, unfortunately the solution did not work, it still could only get the logs after renaming to trunk(originally is branch), but could not get the logs before renaming. 

Alexander Kitaev

unread,
Aug 24, 2017, 8:55:01 AM8/24/17
to XiaoQiang Wang, SubGit Users
Hello Wang,

Thanks for your reply, unfortunately the solution did not work, it still could only get the logs after renaming to trunk(originally is branch), but could not get the logs before renaming. 

Yes, I do understand your requirement. Could you please get SVN repository log (history) and send it to sup...@subgit.com - this will help me to compose proper branches mapping that will work for your project.

To get log, please run the following command:

$ svn log -v -rHEAD:0 SVN_URL > log.txt

where SVN_URL is URL of SVN repository root. Then send log.txt to sup...@subgit.com

Thanks!

Alexander Kitaev,
TMate Software,
http://subgit.com/ - Svn to Git Migration!
http://svnkit.com/ - Java [Sub]Versioning Library!

--
You received this message because you are subscribed to the Google Groups "SubGit Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subgit-users+unsubscribe@googlegroups.com.
To post to this group, send email to subgit...@googlegroups.com.
Visit this group at https://groups.google.com/group/subgit-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/subgit-users/462b0d80-9485-4547-87ae-f45d171bb7f0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

XiaoQiang Wang

unread,
Aug 28, 2017, 2:46:05 AM8/28/17
to SubGit Users, wxq...@gmail.com

Hi Alexander, 
Already sent to the support mailbox, please check, thanks.
Reply all
Reply to author
Forward
0 new messages