SubGit Configuration Options
[core]
-
a path to the directory where SubGit logs are being stored. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to.
-
logLevel = [info|finer|finest]
SubGit logs verbosity level. There are three levels: - INFO - default level, least verbose, reflects import/mirror process steps - FINER - more verbose, Subgit logs every action it performs - FINEST - most verbose, logs everything, including whole network traffic with all the payload. The values are case-insensitive.
-
a boolean value, can be set to
true
orfalse
. Whentrue
, all files in the Git repository will be made group-writable;false
will set all the files owner writable only. The option must betrue
when more than one system account is used to work with this repository. -
a path to the authors mapping file or authors mapping helper program, namely: - text file with explicit authors mapping; mapping syntax is straight and simpe:
svn_username = Git User <gituser@example.com>
find more details on mapping and authors mapping article
- a path to an executable authors mapping helper program and its optional arguments. Find more details on helper program in documentation.
There could be one or more
authorsFile
options specified — they are being processed from the last to the first until the mapping is obtained. -
authorsFileEncoding = ENCODING
encoding in which authors mapping information is present. The default value is
UTF8
. -
domain to be used to generate Git committer email when authors mapping is not defined or does not provide an email address for a particular committer.
-
the way SubGit handles translation failures. There are three options: - auto - in this case, failed translation results in commits or pushes to be blocked on the side to which translation has failed. - svn - commits to Subversion are never being blocked. - git - pushes to Git are never being blocked.
Find more details in documentaion.
-
encoding to be used to store paths in Git tree objects. The default value is
UTF8
. -
a path to Git executable; if this option is set, Git executable will be used to stream large files and perform Git garbage collection that, in turn, can significantly decrease memory and disk space consumption.
-
file size in bytes. SubGit loads entire file into memory if its size less than this threshold; otherwise, if the file is larger than the threshold, SubGit sends it as a stream. The option is not set in configuration file by default, but SubGit sets the threshold to 50MB when the option is not set, so default threshold is 50MB. Note, the bigger the threshold is, the more likely to run into OutOfMemory error.
-
the path to Java home directory; this Java RE will be used to run hooks.
[svn]
-
SVN project URL to be used for import/mirror.
-
a path to SVN project
trunk
relative to the SVN project URL (svn.url
). More details on the option in mapping article. -
a path to SVN project
branches
directory relative to the SVN project URL (svn.url
). There can be more than onebranches
option in a configuration. More details on the option in mapping article. -
a path to SVN project
tags
directory relative to the SVN project URL (svn.url
). There can be more than onetags
option in a configuration. More details on the option in mapping article. -
a path to SVN project
shelves
directory relative to the SVN project URL (svn.url
); this is special directory intended to store commits in some ambiguous situations when SubGit is unable to determine branch name where those particular commits belong to, find mode details in the article. -
excludeBranches = SIMPLE_PATTERN
a string that represents a branch or tag name to be excluded from import/mirror - it can be either full branch or tag name or a name pattern with one wildcard. Interchangeable with
excludeTags
. More details on the option in mapping article. -
a string that represents a branch or tag name to be excluded from import/mirror - it can be either full branch or tag name or a name pattern with one wildcard. Interchangeable with
excludeBranches
. More details on the option in mapping article. -
a string pattern that represents files or directories to be included in import/mirror - there are few rules that apply to the pattern, find the details mapping article.
-
opposite for
includePath
, a string pattern that represents files or directories to be excluded from import/mirror - there are few rules that apply to the pattern, find the details mapping article. -
comma-separated list of
[auth]
sections IDs where Subversion credentials are defined. Credentials will be used both for read-only and write operations, and it is recommended to define credentials of an account that has full access to the Subversion repository. There is onedefault
section from scratch. -
minimal SVN repository revision number the import/mirror should start from.
-
time interval in seconds; SubGit will fetch changes from SVN every
fetchInterval
. The default value is 60. -
SVN connection timeout in seconds; default value is 300 seconds.
-
SVN connection read timeout in seconds; default value is 600 seconds.
-
enable HTTP requests spooling to prevent server-side timeout when request processing takes a long time. The default value is
false
. -
triggerSvnPostReceive = [true|false]
a boolean value that can be set to
true
orfalse
. Whentrue
, SubGit invokesuser-post-receive
hook when translates changes from SVN side to Git repository, otherwise it doesn’t. This option exerts influence on SVN-to-Git translation only, when SubGit translates changes from Git to SVN it invokes hooks irrespective of this option. -
combined value that can be set to
true
,false
or to number value N. Whentrue
, SubGit will always run Git garbage collectiongit gc --auto
; whenfalse
it won’t run the collection;N
represents number of revisions and SubGit will invokegit gc --auto
everyN
revisions. -
keepGitCommitTime = [true|false]
when
true
SVN commits will have the same dates as corresponding Git commits, even if this violates monotonic increase of commit dates from revision to revision; whenfalse
, SubGit will try to preserve Git commit dates while translation to SVN, but it will guarantee SVN dates to increase monotonically from revision to revision. The default value isfalse
. -
a pattern that represents revision properties to be set when a Git commit is translated to SVN, comma or space separated. Supported values are:
- author sets subgit:author as the author of Git commit;
- committer sets subgit:committer as the committer of Git commit;
- date sets subgit:date Git commit creation date in form “YY-MM-DD hh:mm:ss Z”;
- log sets subgit:log as the Git commit message;
- commit sets subgit:commit as the Git commit SHA-1 hash
- svnUser sets subgit:svnUser as the SVN user SubGit uses to create a revision.
there are two ways to set the PATTERN: the first is just list the values:
revisionProperties = author,date,log
in this case, SubGit will set SVN revision properties
subgit:author = <author> subgit:date = <date> subgit:log = <log>
Another way is to set values along with some custom namespace, e.g. for custom namespace git:
revisionProperties = git:author=author,git:date=date,git:log=log
in such case SubGit will set the SVN revision properties using that exact namespace:
git:author = <author> git:date = <date> git:log = <log>
-
a pattern consisting of placeholders that construct SVN commit message when a Git commit is being translated to SVN. There are several acceptable placeholders:
- %author = Git author
- %committer = Git committer
- %date = Git commit date
- %message = original message
- %note = Git commit note stored under refs/notes/commits
- %note(refs/notes/namespace) = Git commit note stored under refs/notes/namespace
- %commit = Git commit hash
- %svnUser = Subversion username
- %branch = Subversion branch
- \n = newline feed
For example, if the
svnCommitMessage
was set like this:svnCommitMessage = Git: %author\n%commit@%branch\\n%message
and then a commit has been pushed to the mirrored Git repository:
$ git log -v commit 161c0bc44517c21d8eb24b720dad71d724b915f9 Author: John Doe <johndoe@example.com> Date: Thu Jun 29 18:25:04 2017 +0500 svnCommitMessage example
according SVN revision will look like this:
----------------------------------------------------------------- r196 | johndoe | 2017-06-29 18:25:04 +0500 (Thu, 29 Jun 2017) | Changed paths: M /project1/trunk M /project1/trunk/source.txt Git: John Doe <johndoe@example.com> 161c0bc44517c21d8eb24b720dad71d724b915f9@trunk svnCommitMessage example -----------------------------------------------------------------
-
a pattern consisting of placeholders that construct Git commit message when a SVN commit is being translated to Git. There are several acceptable placeholders:
- %author = Git author
- %committer = Git committer
- %date = date of revision
- %message = original message
- %svnUser = Subversion username
- %revision = Subversion revision, GRN in your notation
- %branch = Subversion branch
- \n = newline feed
For example, if the
gitCommitMessage
was set like this:gitCommitMessage = SVN %revision@%branch\\n%message
and then some changes have been commited to the SVN repository:
----------------------------------------------------------------- r197 | johndoe | 2017-06-29 13:38:02 +0500 (Thu, 29 Jun 2017) | Changed paths: M /project1/trunk/source.txt gitCommitMessage example -----------------------------------------------------------------
translated Git commit will look like this:
$ git log -v commit d5c7c9e2518a5e8942c26d7cda5ace61ddb7c045 Author: John Dow <johndoe@example.com> Date: Thu Jun 29 08:38:02 2017 +0000 SVN 197@trunk gitCommitMessage example
-
allowBranchReplacement = [true|false]
a boolean value that can be set to
true
orfalse
. Whentrue
, SVN branches replacement is allowed, otherwise is not. -
allowReplacementBranches = PATH
a path pattern relative to
svn.url
that points to SVN branches which are allowed to be replaced. This option works as an exception whensvn.allowBranchReplacement = false
- it allows replacing those SVN branches when new Git changes are being pushed to the SubGit-mirrored Git repository. -
allowBranchDeletion = [true|false]
a boolean value that can be set to
true
orfalse
. Whentrue
, SVN branches removing is allowed, otherwise is not. -
a path pattern relative to
svn.url
that points to SVN branches which are allowed to be deleted. This option works as an exception whensvn.allowBranchReplacement = false
- it allows removing those SVN branches when new Git changes are being pushed to the SubGit-mirrored Git repository. -
a boolean value that can be set to
true
orfalse
. Whenfalse
, SubGit rejects any attempts to perform non-fast-forward updates for those refs which are synchronized with SVN repository. Whentrue
such updates are allowed. -
cleanStaleRefLocks = [true|false]
a boolean value that can be set either to
true
orfalse
. Whentrue
, SubGit automatically deletes any stale Git ref locks - i.e. ref lock filesGIT_REPO/refs/**/*.lock
that exist more than a minute. Iffalse
, SubGit won’t delete lock files, that means any stale ref locks has to be resolved manually. Default istrue
.
[auth]
-
a user that are used to log into the Subversion repository.
-
user password that is used to log into the Subversion repository.
-
a path to SSH key file in case if SVN repository is supposed to be accessed over svn+ssh and the key is used for login. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to.
-
passphrase for the SSH key.
-
a path to client SSL client certificate of PKSC#12 format for the case the SVN repository is being accessed over HTTPS and client certificate is used for log in. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to.
-
sslClientCertPassphrase = PASSPHRASE
passphrase for the SSL client certificate.
-
a path to passwords file; the file contains username/password pairs that are used to log into the Subversion repository. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to.
-
a path to the credential helper program and its optional arguments. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to. The program is expected to be non-interactive (no prompt) and to use Git credential helper input/output format. Sample credential helper script could be found in
subgit/samples
directory. -
subversionConfigurationDirectory = [PATH|@default@]
a path to Subversion configuration directory or
@default@
to use current user Subversion configuration and credentials cache. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to. -
useDefaultSubversionConfigurationDirectory = [true|false]
a boolean value, can be set to
true
orfalse
. Whentrue
default user SVN directory is used (~/.subversion
); whenfalse
, path that is set bysubversionConfigurationDirectory
option is used.
[translate]
-
a boolean value, can be set to
true
orfalse
. SubGit does not support translatingsvn:externals
to Git submodules and back. However, when this option is set totrue
, SubGit creates special.gitsvnextmodules
files in the root of every Git commit; these files store information on all thesvn:externals
definitions found in a given SVN branch. Whenfalse
, SubGit ignores anysvn:externals
properties. Default isfalse
. -
a boolean value, can be set to
true
orfalse
. Whentrue
,.gitattributes
files in Git are being syncronized withsvn:eol-style
andsvn:mime-type
properties in SVN repository.. Whenfalse
.gitattributes
from Git is translated to.gitattributes
file in SVN as any other normal file. Default istrue
. -
a boolean value, can be set to
true
orfalse
. Whentrue
,.gitignore
in Git is translated tosvn:ignore
and vice versa. Whenfalse
.gitignore
from Git is translated to.gitignore
file in SVN as any other normal file. Default istrue
. -
otherProperties = [true|false]
a boolean value, can be set to
true
orfalse
. Whentrue
, SubGit will translate SVN properties (exceptsvn:eol-style
,svn:mime-type
,svn:ignore
,svn:executable
,svn:special
) to.gitattributes
. Whenfalse
, it won’t. -
a boolean value, can be set to
true
orfalse
. Whentrue
, SubGit will track renamed files in Git and will write this information in SVN metadata. Whenfalse
, it won’t. The default value istrue
. -
followFirstParent = [true|false]
a boolean value, can be set to
true
orfalse
. When SubGit translates a merge commit to SVN revision, it tries to identify an SVN branch to send this commit to. When this option is set totrue
, SubGit always sends merge commit to the branch of its first parent unless it leads to branch replacement in SVN repository. Whenfalse
, SubGit uses a number of heuristics in order to choose SVN branch for a given merge commit; in certain cases SubGit may send a merge commit to the branch of its second parent. Default isfalse
. -
a boolean value, can be set to
true
orfalse
. Whentrue
, SubGit uses SVN requests of a special form that allow to translate SVN repository faster at expense of higher memory consumption. Whenfalse
, SubGit uses regular requests. Default isfalse
. -
createEmptySvnCommits = [true|false]
a boolean value, can be set to
true
orfalse
. Whentrue
, SubGit will create empty commits in SVN project even there’s nothing to send from Git side (if a branch isn’t tracked, e.g.). Whenfalse
, empty commits won’t be created. -
createEmptyGitCommits = [true|false]
a boolean value, can be set to
true
orfalse
. Whentrue
, SubGit will create empty commits in Git repository even there’s nothing to send from Git side (if a branch isn’t tracked, e.g.). Whenfalse
, empty commits won’t be created. -
UTC based timezone to be used in Git commits. Default is
UTC
. If this option is set to, say,UTC-4
:timezone = UTC-4
timestamp in translated Git commit will be set to that timezone:
commit 135242956354e70976f9c2ceec351f34d45d5d28 Author: user <user@example.com> Date: Fri Jun 23 02:37:32 2017 -0400 changed source.cpp
[daemon]
-
timeout in seconds for background translation process: it exits after being idle for the specified amount. 0 seconds timeout means that translation process exits immediately. Larger timeout values may improve translation performance by reducing translation process startup overhead. The default value is
infinity
which means the process won’t exit. -
time interval in seconds which hook is waiting for the daemon to start. If the daemon doesn’t start within that interval the hook reports error “Failed to launch background translation process: timeout waiting for pid file” - in such case it’s worth to try to increase this option value. The default value is 5.
-
explicit translation process classpath or path to the directory that contains jars that have to be on the process classpath. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to. Default is
subgit/lib
. -
a path to daemon pid file. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to. Default is
subgit/daemon.pid
. -
java options string the daemon process should start with. Default is
-noverify -client -Djava.awt.headless=true
. -
a path to the directory where SubGit daemon logs are being stored. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to.
-
a path to Java home directory that should be used the daemon to start.
[config]
-
a path to SubGit configuration file that should be included in the current configuration. The options that are defined in the included configuration file are being overridden by the options defined in the including configuration file.
[hooks]
-
java options string the hook process should start with. Default is
-noverify -Xint -Djava.awt.headless=true
. -
a boolean value, can be set to
true
orfalse
. Whentrue
, SubGit will enable all the debug output messages in the hook scripts SubGit installs. Iffalse
, SubGit will leave all those messages commented so they won’t appear every push to Git repository. The default value isfalse
. -
a path to the directory which SubGit will use to install/uninstall/upgrade hooks. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to.