Table of Contents
Anchor up up
up | |
up |
logs
logLevel
shared
authorsFile
authorsFileEncoding
defaultDomain
failSafe
pathEncoding
gitPath
streamFileThreshold
javaHome
url
trunk
branches
tags
shelves
excludeBranches
excludeTags
includePath
excludePath
auth
minimalRevision
fetchInterval
connectTimeout
readTimeout
httpSpooling
triggerSvnPostReceive
triggerGitGC
keepGitCommitTime
revisionProperties
svnCommitMessage
gitCommitMessage
allowBranchReplacement
allowReplacementBranches
allowBranchDeletion
allowDeletionBranches
allowForcePush
cleanStaleRefLocks
userName
password
sshKeyFile
sshKeyPassphrase
sslClientCertFile
sslClientCertPassphrase
passwords
credentialHelper
subversionConfigurationDirectory
useDefaultSubversionConfigurationDirectory
externals
eols
ignores
otherProperties
renames
followFirstParent
useGlueFetch
createEmptySvnCommits
createEmptyGitCommits
timezone
[CORE]
Anchor core 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.logs = PATH
Anchor core.logs core.logs
\logLevel =
\[info|finer|finest
SubGit logs verbosity level. There are three levels:]
Anchor core.loglevel core.loglevel 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. Default log level is
INFO
.
\shared =
\][true|false
authorsFile = PATH
authorsFileEncoding = ENCODING
defaultDomain = DOMAIN
- failSafe = \
a boolean value, can be set to]
Anchor core.shared core.shared 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. The default isfalse
.
a path to the authors mapping file or authors mapping helper program:authorsFile = PATH
Anchor core.authorsFile core.authorsFile authors mapping file – a text file with explicit authors mapping:
Code Block language text theme FadeToGrey title authors mapping syntax svn_username = Git User <gituser@example.com>
- authors helper program – an executable authors mapping helper program and its optional arguments.
Find more details on authors mapping in the authors mapping user manual.
There could be more than oneauthorsFile
options specified, they will be processed from the last to the first until the mapping is obtained.
encoding in which authors mapping information is present. The default value isauthorsFileEncoding = ENCODING
Anchor core.authorsFileEncoding core.authorsFileEncoding UTF8
.
defaultDomain = DOMAIN
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.
...
\]failSafe = [auto|svn|git
pathEncoding = ENCODING
gitPath = PATH
streamFileThreshold = SIZE
javaHome = PATH
...
a way SubGit handles translation failures. There are three possible options:]
Anchor core.failSafe core.failSafe auto
– 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.
pathEncoding = ENCODING
Anchor core.pathEncoding core.pathEncoding encoding to be used to store paths in Git tree objects. The default value isUTF8
.
gitPath = PATH
Anchor core.gitPath core.gitPath 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 can significantly decrease memory and disk space consumption.
streamFileThreshold = SIZE
Anchor core.streamFileThreshold core.streamFileThreshold file size in bytes. SubGit loads the entire file into memory if its size less than this threshold; if the file is larger than the threshold, SubGit sends it as a stream. The option is not set 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.
a path to Java home directory; this Java RE will be used to run hooks.javaHome = PATH
Anchor core.javaHome core.javaHome
[SVN] Anchor svn svn
Anchor | ||||
---|---|---|---|---|
|
SVN project URL to be used for import/mirror. Supported protocols:url = URL
Anchor svn.url svn.url
file://
svn://
svn+ssh://
http://
https://
trunk = PATH
Anchor svn.trunk svn.trunk a path to SVN projecttrunk
relative to the SVN project URL. For more details see "Branches and Tags mapping" user manual.branches = PATH
Anchor svn.branches svn.branches a path to SVN projectbranches
directory relative to the SVN project URL. There can be more than onebranches
option in a configuration. For more details see "Branches and Tags mapping" user manual.tags = PATH
Anchor svn.tags svn.tags a path to SVN projecttags
directory relative to the SVN project URL. There can be more than onetags
option in a configuration. For more details see "Branches and Tags mapping" user manual.
shelves = PATH
Anchor svn.shelves svn.shelves a path to SVN projectshelves
directory relative to the SVN project 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 more details in the "What are shelves really?" blog post.
excludeBranches = SIMPLE_PATTERN
Anchor svn.excludeBranches svn.excludeBranches a string that represents a branch or tag name to be excluded from translation. It can be either full branch or tag name or a name pattern with one wildcard. Interchangeable withexcludeTags
. For more details see "Branches and Tags mapping" user manual.excludeTags = SIMPLE_PATTERN
Anchor svn.excludeTags svn.excludeTags a string that represents a branch or tag name to be excluded from translation. It can be either full branch or tag name or a name pattern with one wildcard. Interchangeable withexcludeBranches
. For more details see "Branches and Tags mapping" user manual.
includePath = PATTERN
Anchor svn.includePath svn.includePath a string pattern that represents files or directories to be included in translation. There are few rules that apply to the pattern, find the details in "Branches and Tags mapping" user manual.
excludePath = PATTERN
Anchor svn.excludePath svn.excludePath opposite forincludePath
, a string pattern that represents files or directories to be excluded from translation. There are few rules that apply to the pattern, find the details in "Branches and Tags mapping" user manual.
auth = [default,option1,…]
Anchor svn.auth svn.auth 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.
minimalRevision = REVISION
Anchor svn.minimalRevision svn.minimalRevision minimal SVN repository revision number the import/mirror should start from.
fetchInterval = INTERVAL
Anchor svn.fetchInterval svn.fetchInterval time interval in seconds. SubGit will fetch changes from SVN everyINTERVAL
. The default value is 60.
connectTimeout = TIMEOUT
Anchor svn.connectTimeout svn.connectTimeout SVN connection timeout in seconds. The default value is 300 seconds.
readTimeout = TIMEOUT
Anchor svn.readTimeout svn.readTimeout SVN connection read timeout in seconds. The default value is 600 seconds.
httpSpooling = [true|false]
Anchor svn.httpSpooling svn.httpSpooling enable HTTP requests spooling to prevent server-side timeout when request processing takes a long time. The default value isfalse
.
triggerSvnPostReceive = [true|false]
Anchor svn.triggerSvnPostReceive svn.triggerSvnPostReceive Iftrue
, SubGit invokes user-post-receive hook during changes translation 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.
triggerGitGC = [true|false|N]
Anchor svn.triggerGitGC svn.triggerGitGC If the settings is set totrue
, SubGit will always run Git garbage collectiongit
gc--auto
. Whenfalse
it won't run the collection. A numeric valueN
represents a number of revisions; SubGit will invokegit
gc--auto
everyN
revisions.
keepGitCommitTime = [true|false]
Anchor svn.keepGitCommitTime svn.keepGitCommitTime Whentrue,
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:revisionProperties = PATTERN
Anchor svn.revisionProperties svn.revisionProperties author
– setssubgit:author
as the author of Git commit.committer –
setssubgit:committer
as the committer of Git commitdate
– setssubgit:date
Git commit creation date in a form "YY-MM-DD hh:mm:ss Z".log
– setssubgit:log
as the Git commit message.commit
– setssubgit:commit
as the Git commit SHA-1 hash.svnUser
– setssubgit: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:
Code Block language text theme FadeToGrey title revisionProperties list syntax revisionProperties = author,date,log
In this case, SubGit will set SVN the following revision properties:
Code Block language text theme FadeToGrey title 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:
Code Block language text theme FadeToGrey title revisionProperties syntax with custom namespace revisionProperties = git:author=author,git:date=date,git:log=log
In such case SubGit will set the SVN revision properties using that exact git namespace:
Code Block language text theme FadeToGrey title SVN revision properties with custom 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:svnCommitMessage = PATTERN
Anchor svn.svnCommitMessage svn.svnCommitMessage %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:Code Block language text theme FadeToGrey title svnCommitMessage svnCommitMessage = Git: %author\n%commit@%branch\\n%message
and then a commit has been pushed to the mirrored Git repository:
Code Block language text theme FadeToGrey title Git commit $ git log -v commit 161c0bc44517c21d8eb24b720dad71d724b915f9 Author: John Doe <johndoe@example.com> Date: Thu Jun 29 18:25:04 2017 +0500 svnCommitMessage example
respective SVN revision will look like this:
Code Block language text theme FadeToGrey title SVN revision 196 ----------------------------------------------------------------- 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 -----------------------------------------------------------------
gitCommitMessage = PATTERN
Anchor svn.gitCommitMessage svn.gitCommitMessage a pattern consisting of placeholders that construct Git commit message when a SVNcommit 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 thegitCommitMessage
was set like this:Code Block language text theme FadeToGrey title gitCommitMessage gitCommitMessage = SVN %revision@%branch\\n%message
Then, some changes have been committed to the SVN repository:
Code Block language text theme FadeToGrey title SVN revision 197 ----------------------------------------------------------------- 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:
Code Block language text theme FadeToGrey title Git commit $ 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
WhenallowBranchReplacement = [true|false]
Anchor svn.allowBranchReplacement svn.allowBranchReplacement true
, SVN branches replacement is allowed, otherwise it isn't allowed.allowReplacementBranches = PATH
Anchor svn.allowReplacementBranches svn.allowReplacementBranches a path pattern relative tosvn.url
that points to SVN branches which are allowed to be replaced. This option works as an exception whenallowBranchReplacement
is set tofalse:
it allows replacing those SVN branches when new Git changes are being pushed to the SubGit-mirrored Git repository.
WhenallowBranchDeletion = [true|false]
Anchor svn.allowBranchDeletion svn.allowBranchDeletion true
, SVN branches removing is allowed, otherwise it isn't allowed.allowDeletionBranches = PATH
Anchor svn.allowDeletionBranches svn.allowDeletionBranches a path pattern relative tourl
pointing to SVN branches which are allowed to be deleted. This option works as an exceptionallowBranchReplacement
is set tofalse:
It allows removing those SVN branches when new Git changes are being pushed to the SubGit-mirrored Git repository.allowForcePush = [true|false]
Anchor svn.allowForcePush svn.allowForcePush When set tofalse
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]
Anchor svn.cleanStaleRefLocks svn.cleanStaleRefLocks When set totrue
, 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. The default istrue
.
[AUTH "DEFAULT"] Anchor auth auth
Anchor | ||||
---|---|---|---|---|
|
a username that is used to log into the Subversion repository.userName = NAME
Anchor auth.userName auth.userName
user password that is used to log into the Subversion repository.password = PASSWORD
Anchor auth.password auth.password
a path to SSH key file in case if SVN repository is supposed to be accessed oversshKeyFile = PATH
Anchor auth.sshKeyFile auth.sshKeyFile 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.sshKeyPassphrase = PASSPHRASE
Anchor auth.sshKeyPassphrase auth.sshKeyPassphrase
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 forlog in. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to.sslClientCertFile = PATH
Anchor auth.sslClientCertFile auth.sslClientCertFile
passphrase for the SSL client certificate.sslClientCertPassphrase = PASSPHRASE
Anchor auth.sslClientCertPassphrase auth.sslClientCertPassphrase
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.passwords = PATH
Anchor auth. passwords auth. passwords
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 incredentialHelper = PATH
Anchor auth.credentialHelper auth.credentialHelper subgit/samples
directory.
subversionConfigurationDirectory = [PATH|@default@]
Anchor auth.subversionConfigurationDirectory
...
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.
...
a path to Subversion configuration directory orauth.subversionConfigurationDirectory @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.
a boolean value that can be set touseDefaultSubversionConfigurationDirectory = [true|false]
Anchor auth.useDefaultSubversionConfigurationDirectory auth.useDefaultSubversionConfigurationDirectory true
orfalse
. Whentrue
default user SVN directory~/.subversion
is used; whenfalse
, path that is set bysubversionConfigurationDirectory
option is used.
[TRANSLATE] Anchor translate translate
Anchor | ||||
---|---|---|---|---|
|
a boolean value that can be set toexternals = [true|false]
Anchor translate.externals translate.externals 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. The default isfalse
.
a boolean value that can be set toeols = [true|false]
Anchor translate.eols translate.eols true
orfalse
. Whentrue
,.gitattributes
files in Git are 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. The default istrue
.
a boolean value that can be set toignores = [true|false]
Anchor translate.ignores translate.ignores 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. The default istrue
.
a boolean value that can be set tootherProperties = [true|false]
Anchor translate.otherProperties translate.otherProperties true
orfalse
. Whentrue
, SubGit translates SVN properties (exceptsvn:eol-style
,svn:mime-type
,svn:ignore
,svn:executable
,svn:special
) to.gitattributes
. Whenfalse
, it doesn't.
a boolean value that can be set torenames = [true|false]
Anchor translate.renames translate.renames true
orfalse
. Whentrue
, SubGit tracks renamed files in Git and writes this information in SVN metadata. Whenfalse
, it doesn't. The default value istrue
.
followFirstParent = [true|false]
Anchor translate.followFirstParent translate.followFirstParent a boolean value that can be set totrue
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. The default isfalse
.
a boolean value that can be set touseGlueFetch = [true|false]
Anchor translate.useGlueFetch translate.useGlueFetch true
orfalse
. Whentrue
, SubGit uses SVN requests of a special form that allows to translate SVN repository faster at expense of higher memory consumption. Whenfalse
, SubGit uses regular requests. The default isfalse
.
createEmptySvnCommits = [true|false]
Anchor translate.createEmptySvnCommits translate.createEmptySvnCommits a boolean value that can be set totrue
orfalse
. Whentrue
, SubGit creates empty commits in SVN project even there's nothing to send from Git side (for example, if a branch isn't tracked). Whenfalse
, empty commits are not be created.
a boolean value that can be set tocreateEmptyGitCommits = [true|false]
true
orfalse
. Whentrue
, SubGit creates empty commits in Git repository even there's nothing to send from Git side (for example, if a branch isn't tracked). Whenfalse
, empty commits are not be created.
timezone = TIMEZONE
UTC based timezone to be used in Git commits. The default is
UTC
.
To set the timezone toUTC-4
the option has to be set as follows:No Format timezone = UTC-4
In this case, the timestamp in translated Git commit is set to that timezone:
Code Block language text theme FadeToGrey title commit example commit 135242956354e70976f9c2ceec351f34d45d5d28 Author: user <user@example.com> Date: Fri Jun 23 02:37:32 2017 -0400 changed source.cpp
[DAEMON] Anchor daemon daemon
Anchor | ||||
---|---|---|---|---|
|
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 isidleTimeout = TIMEOUT
Anchor daemon.idleTimeout daemon.idleTimeout 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.launchTimeout = TIMEOUT
Anchor daemon.launchTimeout daemon.launchTimeout
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. The default isclasspath = PATH
Anchor daemon.classpath daemon.classpath 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. The default ispidFile = PATH
Anchor daemon.pidFile daemon.pidFile subgit/daemon.pid
.javaOptions = OPTIONS
Anchor daemon.javaOptions daemon.javaOptions Java options string the daemon process should start with. The default is
No Format -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.logs = PATH
Anchor daemon.logs daemon.logs
a path to Java home directory that should be used the daemon to start.javaHome = PATH
Anchor daemon.javaHome daemon.javaHome
[DAEMON "SHARED"] Anchor daemon.shared daemon.shared
Anchor | ||||
---|---|---|---|---|
|
a path to the directory shared daemon uses. The path can be either absolute or relative to the Git repository where import/mirror from SVN is being performed to.directory = PATH
Anchor daemon.shared.directory daemon.shared.directory
[CONFIG] Anchor config config
Anchor | ||||
---|---|---|---|---|
|
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.include = PATH
Anchor config.include config.include
[HOOKS] Anchor hooks hooks
Anchor | ||||
---|---|---|---|---|
|
javaOptions = OPTIONS
Anchor hooks.javaOptions hooks.javaOptions Java options string the hook process should start with. The default is
No Format -noverify -Xint -Djava.awt.headless=true
a boolean value that can be set todebug = [true|false]
Anchor hooks.debug hooks.debug true
orfalse
. Whentrue
, SubGit enables all debug output messages in hook scripts SubGit installs, so they appear every push to Git repository. Iffalse
, SubGit leaves all the messages commented. The default value isfalse
.
a path to the directory which SubGit usea 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.directory = PATH
Anchor hooks.directory hooks.directory