Hello Andrzej,
talking about trunk command line parameter you mean the ‘subgit configure’ command, right? If so, a possible approach is to use another layout with this command:
subgit configure --layout directory https://svn_server/project1 /path/to/subgit/repository
(I set https prior in the URL just for example, it can be any other protocol here ,of course)
This option – layout directory
– will set trunk setting to point directly to project1
:
trunk = :refs/heads/master
and thus the resulting structure in Git will be exactly that you mentioned. There’s a drawback of this approach, however, it does not allow adding branches in the mapping configuration and cannot be changed without complete repository rebuild.
Another possible approach is to set trunk
to point to the project1
and the SVN URL to the server root:
subgit configure --layout auto --trunk project1 https://svn_server /path/to/subgit/repository
In this case, master branch in git will contain the folder1
as it’s intended; but it’s not completely clear what will be set as branches
and tags
in the configuration as with the layout auto
option SubGit connects to the SVN server during the configuration, scans its history and creates a mapping configuration based on the history. So it probably will worth to check the configuration and edit it manually prior the initial import start.
Or just rung the following configuration command:
subgit configure --layout std https://svn_server /path/to/subgit/repository
This command will create so-called “standard” mapping configuration that reflects “standard” SVN repository layout:
trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
tags = tags/*:refs/tags/*
Then open the REPO/subgit/config file in a text editor (REPO here stands for the SubGit repository directory) and edit mapping configuration removing branches
and tags
and setting trunk
to point to project1
:
trunk = project1:refs/heads/master
Save the file and then run the initial import.