Page tree
Skip to end of metadata
Go to start of metadata

The single directory layout means there's only one single 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:

/repository
	dir1
	…
	dirN
	file1
	…
	fileN

Correct configuration for this case is the following:

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


	#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.


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:

/repository
	/project_1
		dir1
		…
		dirN
		file1
		…
		fileN
	/project_2
	…
	/project_N

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:

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

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

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:

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

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

In this branches and tags can be added to configuration later just by enabling appropriate line in the configuration.


This single directory layout approach can also be applied in a case when only one branch from a repository should be translated. 

For example, a Subversion repository can stick to standard layout:

/svn
	/repository
		/project
			/trunk
			/branches
				/branch_1
				…            
			/tags
				…            

However, if branch_1 only is intended for the translation, then it can be done by the single directory layout approach using the configuration below:

[svn]
	url = http://example.com/svn/repository/project/branches
	
    trunk = branch_1:refs/heads/master
    #branches = branches/*:refs/heads/*
    #tags = tags/*:refs/tags/*
    #shelves = shelves/*:refs/shelves/*

Another way to express the same configuration is to set svn.url leading directly to the branch_1:

[svn]
	url = http://example.com/svn/repository/project/branches/branch_1

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

The difference between these two configurations is that branches or tags can be added later to the first configuration, whereas nothing can be added to the second.

  • No labels