Page tree

Versions Compared

Key

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

...

Correct configuration for this case is the following:

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


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

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:

There are two possible configurations for this case.

In the first, the URL is set leading to the project root and all the mapping options are disabled:

No Format
[SVN]
	url = http://example.com/svn/repository/project_1

...

and comment the mapping settings:



	#trunk = 

...

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

or remove them at all.

Unlike the first case though, the mapping for this layout can be set in one more way: we can set the svn.url to point the repository root directory:

Note that this configuration doesn't allow to add branches and tags later.

Another possible configuration for this case is that the URL leads to the repository and trunk option is set to point to project directory:

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

...

and set project directory to be trunk:



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

This approach will also translate the project to Git; but additionally, branches and In this branches and tags can be created and added to translation later with almost no configuration effort since project's directory acts as a trunkconfiguration later just by enabling appropriate line in the configuration.




One more common case is that only one particular branch has to be translated to Git. The repository and project can be arbitrary complex, e.g.:

...