Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SubGit support all protocols SVN supports, so the svn.url can be set using the following protocol prefixes:

  • file:///
  • svn://
  • svn+ssh://
  • http://
  • https://

...

Info
titleTrunk mapping rules
    • trunk must be mapped; the only exclusion is the configuration with no defined mapping - no trunk, branches, tags and shelves options at all - that may be used to import SVN projects with no branches.
    • there must be only one trunk mapping.
    • trunk cannot contain wildcards.

svn.branches

This setting establishes a correspondence between SVN and Git branches. Its default value assumes standard SVN layout is used, i.e. that a SVN project branches reside in a directory named branches:

branches = branches/*:refs/heads/*

where

  • the first branches is a mapping option name, determining which entity is being mapped.
  • the second branches is a relative path to SVN directory, that consists SVN branches, or a path to a particular branch*.
  • refs/heads/* – a Git repository path, where branches references will be kept.

This setting supports wildcards and thus can map a lot of branches at one time. If no wildcards used, the setting represents a path to one particular branch.

Rules that apply to the svn.branches:

Info
titleBranches mapping rules
  • branches are optional and may be omitted.
  • there may be more than one branches options set.
  • each mapping must be unique: i.e. each SVN path must be mapped to unique Git path.
  • wildcards number in SVN relative path must match wildcards number in Git repository path.

Taking the rules into account, the svn.branches options part in the configuration file may look like following:

Code Block
languagetext
themeFadeToGrey
titlesvn.branches
branches = branches/*:refs/heads/*
branches = feature_*:refs/heads/features/*
branches = hotfix/*_*:refs/heads/hotfix/*/*
branches = special_branch:refs/heads/special_branch

svn.tags

This setting establishes a correspondence between SVN and Git tags. The default value assumes standard SVN layout:

tags = tags/*:refs/tags/*

where

  • the first tags is a mapping option name, determining which entity is being mapped.
  • the second tags is a relative path to SVN directory, that consists SVN tags or a path to one particular tag.
  • refs/tags/* - a Git repository path, where tags references will be kept.

SubGit translates SVN tags to Git lightweight tags and any kind of Git tags to SVN.

The svn.tags option is quite similar to the svn.branches, it supports both wildcards and direct mapping and the same rules apply to it:

Info
titleTags mapping rules
  • tags are optional and may be omitted.
  • there may be more than one tags options set.
  • each mapping must be unique: i.e. each SVN path must be mapped to unique Git path.
  • wildcards number in SVN relative path must match wildcards number in Git repository path.

As an example, svn.tags settings may look like this:

Code Block
languagetext
themeFadeToGrey
titlesvn.tags
tags = 1.0/*:refs/tags/1.0/*
tags = 1.5.*:refs/tags/1.5/*
tags = tags/2.0.*/*:refs/tags/2.0/*/*
tags = tags/special_tag:refs/tags/special_tag