4

I have been using subgit to convert my subversion repository to git. Unfortunately, I have a sub-project in one of my branches which is not in standard layout. The non-standard sub-project is not included in the conversion.

The content of the sub-project is

/my-subproject
   file1
   dir1
     subdir1-file1
   file2

Is there a way to specify it in the mapping in subgit.conf? Below is the mapping in subgit.conf.

Eg.

[git "my-subproject"]
translationRoot = my-subprojcet
repository = /var/git/my-subproject.git
pathEncoding=UTF-8

trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
shelves = shelves/*:refs/shelves/*
tags = tags/*:refs/tags/*
Efox
  • 651
  • 3
  • 8
  • 19
  • Could you schematically show your repository structure from the repository root (including trunk/branches/tags/shelves of the main repository)? – Dmitry Pavlenko May 08 '14 at 18:34

3 Answers3

3

seesubgit help configure ,with '--layout directory'

subgit configure --layout directory ....

'directory' : treat URL as a branch and only translate that branch

qxo
  • 1,584
  • 15
  • 11
3

I was able to import a project from SVN to gitHUB with no trunk or branches by doing the following.

checkout svn directory
subgit import --non-interactive --svn-url svn://svn/MyProject
subgit configure --layout directory svn://svn/MyProject repos.git
*Manually edit authors.txt to map accounts 
-- note that [svn] trunk is: trunk = :refs/heads/master

subgit install repos.git
cd repos.git/

git remote add github https://github.com/linkrd/NewMyProject
git push github --all --follow-tags

All 6000+ pf my previous commits were there.

lexi
  • 31
  • 1
1

As found in subgit project mapping the configuration should be

[git "my-subproject"]
repository = /var/git/my-subproject.git

translationRoot = /

trunk = /my-subproject:refs/heads/master
branches = branches/project/*:refs/heads/*
shelves = shelves/project/*:refs/shelves/*
tags = tags/project/*:refs/tags/*

I hope this would be useful.

Efox
  • 651
  • 3
  • 8
  • 19