Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Single Directory

This layout is probably the simplest possible case to map since The single directory layout means there's only one single directory , with no branches or tags or any nested directories that can make the mapping more complex. Actually, this approach can apply to several different layouts: it can be some relatively simple SVN repository that has no branches or tags and all the files live right in repository's root:

/repository
        file1
        file2
        …
        fileN

In this case, all that is needed to translate the project into Git is to set svn.url to point to SVN repository's root directory:

where everything resides. The simplest case is that where all the files and directories reside right in the repository root and there are no branches or tags:

No Format
nopaneltrue
/repository
	dir1
	…
	dirN
	file1
	…
	fileN

Correct configuration for this case is the following:

No Format
[svn]
	http://example.com/svn/repository

...

And all the trunk, branches, tags and shelves setting in SubGit's configuration file can be either commented:

...




	trunk = 

...

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

or just removed.

Note, that in such case (repository root is used) it's impossible to add branches or tags later on.


Another kind of the single directory layout is an SVN repository hosting more than one project, each project lives in its own directory inside the repository and each projects' files are stored right in the project directory root:

No Format
nopaneltrue
/repository
	/project_1
        dir1
		…
		dirN
		file1
		…
		fileN
	/project_2
	…
	/project_N



The same approach applies to the case when all the files reside in project's (not repository) root directory: that is, each project in repository has its own directory, but the project being translated has no branches and tags and all the files are situated right in project's root:

...


Similarly, we can just set svn.url to point to project root:

...