Page tree

Subversion repository may contain one or more projects. Project is a location (folder) in Subversion repository which follows Subversion recommended repository layout, i.e. project folder has trunk, branches and tags subfolders:

/project 
	/trunk # project's "main line" 
	/branches # contains project feature and version branches, copied from trunk or other branches 
	/tags # contains project tags (trunk and branches snapshots)

It is not necessary for trunk, branches and tags folders to have these exact names, but the roles of these folders are important. Each project could be mapped to a bare Git repository as shown in Figure 3.1 and Figure 3.2 along with the corresponding parts of SubGit configuration file.


 Single Project Repository Mapping

Figure 3.1. Single Project Repository Mapping

SubGit configuration file (single project mapping)

[svn] 
# URL that points to a project root 
# (may be the same as Subversion repository root) 
url = http://host/svn/repos


 Multiple Projects Repository Mapping

Figure 3.2. Multiple Projects Repository Mapping

SubGit configuration file (two projects mapping)

/var/git/project1.git/subgit/config 
	[svn] 
	# project location within Subversion repository 
	url = http://host/svn/repos/project1 
	... 
/var/git/project2.git/subgit/config 
	[svn] 
	# project location within Subversion repository 
	url = http://host/svn/repos/project2
  • No labels