logs
logLevel
shared
authorsFile
authorsFileEncoding
defaultDomain
failSafe
pathEncoding
gitPath
streamFileThreshold
javaHome
[CORE]
logs = PATH
logLevel = [info|finer|finest]
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]
true
or false
.When true
, all files in the Git repository will be made group-writable; false
will set all the files owner writable only. The option must be true
when more than one system account is used to work with this repository. The default is false
.authorsFile = PATH
authors mapping file – a text file with explicit authors mapping:
svn_username = Git User <gituser@example.com> |
authorsFile
options specified, they will be processed from the last to the first until the mapping is obtained. authorsFileEncoding = ENCODING
UTF8
.defaultDomain = DOMAIN
failSafe = [auto|svn|git]
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
UTF8
.gitPath = PATH
streamFileThreshold = SIZE
javaHome = PATH
[SVN]
url = URL
file://
svn://
svn+ssh://
http://
https://
trunk = PATH
trunk
relative to the SVN project URL. For more details see "Branches and Tags mapping" user manual.
branches = PATH
branches
directory relative to the SVN project URL. There can be more than one branches
option in a configuration. For more details see "Branches and Tags mapping" user manual.
tags = PATH
tags
directory relative to the SVN project URL. There can be more than one tags
option in a configuration. For more details see "Branches and Tags mapping" user manual.shelves = PATH
shelves
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
excludeTags
. For more details see "Branches and Tags mapping" user manual.
excludeTags = SIMPLE_PATTERN
excludeBranches
. For more details see "Branches and Tags mapping" user manual.includePath = PATTERN
excludePath = PATTERN
includePath
, 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,…]
[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 one default
section from scratch.minimalRevision = REVISION
fetchInterval = INTERVAL
INTERVAL
. The default value is 60.connectTimeout = TIMEOUT
readTimeout = TIMEOUT
httpSpooling = [true|false]
false
.triggerSvnPostReceive = [true|false]
true
, 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]
true
, SubGit will always run Git garbage collection git
gc --auto
. When false
it won't run the collection. A numeric value N
represents a number of revisions; SubGit will invoke git
gc --auto
every N
revisions.keepGitCommitTime = [true|false]
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. When false
, 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 is false
.revisionProperties = PATTERN
author
– sets subgit:author
as the author of Git commit.committer –
sets subgit:committer
as the committer of Git commitdate
– sets subgit:date
Git commit creation date in a 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.the first is just list the values:
revisionProperties = author,date,log |
In this case, SubGit will set SVN the following 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 git namespace:
git:author = <author> git:date = <date> git:log = <log> |
svnCommitMessage = PATTERN
%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 feedFor 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 |
respective 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 ----------------------------------------------------------------- |
gitCommitMessage = PATTERN
%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
gitCommitMessage
was set like this:gitCommitMessage = SVN %revision@%branch\\n%message |
Then, some changes have been committed 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]
true
, SVN branches replacement is allowed, otherwise it isn't allowed.
allowReplacementBranches = PATH
svn.url
that points to SVN branches which are allowed to be replaced. This option works as an exception when allowBranchReplacement
is set to false:
it allows replacing those SVN branches when new Git changes are being pushed to the SubGit-mirrored Git repository.
allowBranchDeletion = [true|false]
true
, SVN branches removing is allowed, otherwise it isn't allowed.allowDeletionBranches = PATH
url
pointing to SVN branches which are allowed to be deleted. This option works as an exception allowBranchReplacement
is set to false:
It allows removing those SVN branches when new Git changes are being pushed to the SubGit-mirrored Git repository.
allowForcePush = [true|false]
false
SubGit rejects any attempts to perform non-fast-forward updates for those refs which are synchronized with SVN repository. When true
, such updates are allowed.
cleanStaleRefLocks = [true|false]
true
, SubGit automatically deletes any stale Git ref locks – i.e. ref lock files GIT_REPO/refs/**/*.lock
that exist more than a minute. If false
, SubGit won’t delete lock files, that means any stale ref locks has to be resolved manually. The default is true
.[AUTH]
userName = NAME
password = PASSWORD
sshKeyFile = PATH
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.sshKeyPassphrase = PASSPHRASE
sslClientCertFile = PATH
sslClientCertPassphrase = PASSPHRASE
passwords = PATH
credentialHelper = PATH
subgit/samples
directory.subversionConfigurationDirectory = [PATH|@default@]
@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]
true
or false
. When true
default user SVN directory ~/.subversion
is used; when false
, path that is set by subversionConfigurationDirectory
option is used.[TRANSLATE]
externals = [true|false]
true
or false
. SubGit does not support translating svn:externals
to Git submodules and back. However, when this option is set to true
, SubGit creates special .gitsvnextmodules
files in the root of every Git commit. These files store information on all the svn:externals
definitions found in a given SVN branch. When false
, SubGit ignores any svn:externals
properties. The default is false
.eols = [true|false]
true
or false
. When true
, .gitattributes
files in Git are syncronized with svn:eol-style
and svn:mime-type
properties in SVN repository. When false
.gitattributes
from Git is translated to .gitattributes
file in SVN as any other normal file. The default is true
.ignores = [true|false]
true
or false
. When true
, .gitignore
in Git is translated to svn:ignore
and vice versa. When false
.gitignore
from Git is translated to .gitignore
file in SVN as any other normal file. The default is true
.otherProperties = [true|false]
true
or false
. When true
, SubGit translates SVN properties (except svn:eol-style
, svn:mime-type
, svn:ignore
, svn:executable
, svn:special
) to .gitattributes
. When false
, it doesn't.renames = [true|false]
true
or false
. When true
, SubGit tracks renamed files in Git and writes this information in SVN metadata. When false
, it doesn't. The default value is true
.followFirstParent = [true|false]
true
or false
. 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 to true
, SubGit always sends merge commit to the branch of its first parent unless it leads to branch replacement in SVN repository. When false
, 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 is false
.useGlueFetch = [true|false]
true
or false
. When true
, SubGit uses SVN requests of a special form that allows to translate SVN repository faster at expense of higher memory consumption. When false
, SubGit uses regular requests. The default is false
.createEmptySvnCommits = [true|false]
true
or false
. When true
, SubGit creates empty commits in SVN project even there's nothing to send from Git side (for example, if a branch isn't tracked). When false
, empty commits are not be created.createEmptyGitCommits = [true|false]
true
or false
. When true
, SubGit creates empty commits in Git repository even there's nothing to send from Git side (for example, if a branch isn't tracked). When false
, 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 to UTC-4
the option has to be set as follows:
timezone = UTC-4 |
In this case, the timestamp in translated Git commit is set to that timezone:
commit 135242956354e70976f9c2ceec351f34d45d5d28 Author: user <user@example.com> Date: Fri Jun 23 02:37:32 2017 -0400 changed source.cpp |
[DAEMON]