2005-10-10 11:40:43 +02:00
|
|
|
git-svnimport(1)
|
|
|
|
================
|
|
|
|
v0.1, July 2005
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
git-svnimport - Import a SVN repository into git
|
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2005-10-11 18:13:30 +02:00
|
|
|
'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ] [ -d | -D ]
|
2005-11-29 08:13:04 +01:00
|
|
|
[ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_rev]
|
2006-01-01 22:32:53 +01:00
|
|
|
[ -b branch_subdir ] [ -T trunk_subdir ] [ -t tag_subdir ]
|
2005-10-11 18:13:30 +02:00
|
|
|
[ -s start_chg ] [ -m ] [ -M regex ]
|
|
|
|
<SVN_repository_URL> [ <path> ]
|
2005-10-10 11:40:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
Imports a SVN repository into git. It will either create a new
|
|
|
|
repository, or incrementally import into an existing one.
|
|
|
|
|
2006-01-21 20:06:19 +01:00
|
|
|
SVN access is done by the SVN::Perl module.
|
2005-10-10 11:40:43 +02:00
|
|
|
|
|
|
|
git-svnimport assumes that SVN repositories are organized into one
|
|
|
|
"trunk" directory where the main development happens, "branch/FOO"
|
|
|
|
directories for branches, and "/tags/FOO" directories for tags.
|
|
|
|
Other subdirectories are ignored.
|
|
|
|
|
|
|
|
git-svnimport creates a file ".git/svn2git", which is required for
|
2005-10-16 20:55:35 +02:00
|
|
|
incremental SVN imports.
|
2005-10-10 11:40:43 +02:00
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
|
|
|
-C <target-dir>::
|
|
|
|
The GIT repository to import to. If the directory doesn't
|
|
|
|
exist, it will be created. Default is the current directory.
|
|
|
|
|
2005-10-10 15:14:21 +02:00
|
|
|
-s <start_rev>::
|
|
|
|
Start importing at this SVN change number. The default is 1.
|
|
|
|
+
|
2005-12-29 10:20:06 +01:00
|
|
|
When importing incrementally, you might need to edit the .git/svn2git file.
|
2005-10-10 15:14:21 +02:00
|
|
|
|
2005-10-10 11:40:43 +02:00
|
|
|
-i::
|
|
|
|
Import-only: don't perform a checkout after importing. This option
|
2005-11-11 02:12:27 +01:00
|
|
|
ensures the working directory and index remain untouched and will
|
2005-10-10 11:40:43 +02:00
|
|
|
not create them if they do not exist.
|
|
|
|
|
2006-01-01 22:32:53 +01:00
|
|
|
-T <trunk_subdir>::
|
2005-10-10 11:40:43 +02:00
|
|
|
Name the SVN trunk. Default "trunk".
|
2005-10-16 20:55:35 +02:00
|
|
|
|
2006-01-01 22:32:53 +01:00
|
|
|
-t <tag_subdir>::
|
2005-10-10 11:40:43 +02:00
|
|
|
Name the SVN subdirectory for tags. Default "tags".
|
2005-10-16 20:55:35 +02:00
|
|
|
|
2005-10-10 11:40:43 +02:00
|
|
|
-b <branch_subdir>::
|
|
|
|
Name the SVN subdirectory for branches. Default "branches".
|
2005-10-16 20:55:35 +02:00
|
|
|
|
2005-10-10 11:40:43 +02:00
|
|
|
-o <branch-for-HEAD>::
|
|
|
|
The 'trunk' branch from SVN is imported to the 'origin' branch within
|
|
|
|
the git repository. Use this option if you want to import into a
|
|
|
|
different branch.
|
|
|
|
|
2006-02-14 03:43:34 +01:00
|
|
|
-r::
|
|
|
|
Prepend 'rX: ' to commit messages, where X is the imported
|
|
|
|
subversion revision.
|
|
|
|
|
2005-10-16 20:55:35 +02:00
|
|
|
-m::
|
2005-10-10 11:40:43 +02:00
|
|
|
Attempt to detect merges based on the commit message. This option
|
2005-10-16 20:55:35 +02:00
|
|
|
will enable default regexes that try to capture the name source
|
|
|
|
branch name from the commit message.
|
2005-10-10 11:40:43 +02:00
|
|
|
|
|
|
|
-M <regex>::
|
|
|
|
Attempt to detect merges based on the commit message with a custom
|
2005-10-16 20:55:35 +02:00
|
|
|
regex. It can be used with -m to also see the default regexes.
|
|
|
|
You must escape forward slashes.
|
2005-10-10 11:40:43 +02:00
|
|
|
|
2005-11-29 08:13:04 +01:00
|
|
|
-l <max_rev>::
|
|
|
|
Specify a maximum revision number to pull.
|
2005-10-10 18:45:00 +02:00
|
|
|
|
2006-01-21 20:06:19 +01:00
|
|
|
Formerly, this option controlled how many revisions to pull,
|
|
|
|
due to SVN memory leaks. (These have been worked around.)
|
2005-10-10 18:45:00 +02:00
|
|
|
|
2005-10-10 11:40:43 +02:00
|
|
|
-v::
|
|
|
|
Verbosity: let 'svnimport' report what it is doing.
|
|
|
|
|
2005-10-11 18:13:30 +02:00
|
|
|
-d::
|
|
|
|
Use direct HTTP requests if possible. The "<path>" argument is used
|
|
|
|
only for retrieving the SVN logs; the path to the contents is
|
|
|
|
included in the SVN log.
|
|
|
|
|
|
|
|
-D::
|
|
|
|
Use direct HTTP requests if possible. The "<path>" argument is used
|
|
|
|
for retrieving the logs, as well as for the contents.
|
|
|
|
+
|
|
|
|
There's no safe way to automatically find out which of these options to
|
|
|
|
use, so you need to try both. Usually, the one that's wrong will die
|
|
|
|
with a 40x error pretty quickly.
|
|
|
|
|
2005-10-10 11:40:43 +02:00
|
|
|
<SVN_repository_URL>::
|
|
|
|
The URL of the SVN module you want to import. For local
|
|
|
|
repositories, use "file:///absolute/path".
|
2005-10-11 18:13:30 +02:00
|
|
|
+
|
|
|
|
If you're using the "-d" or "-D" option, this is the URL of the SVN
|
|
|
|
repository itself; it usually ends in "/svn".
|
|
|
|
|
2006-01-21 20:06:19 +01:00
|
|
|
<path>::
|
2005-10-11 18:13:30 +02:00
|
|
|
The path to the module you want to check out.
|
2005-10-10 11:40:43 +02:00
|
|
|
|
|
|
|
-h::
|
|
|
|
Print a short usage message and exit.
|
|
|
|
|
|
|
|
OUTPUT
|
|
|
|
------
|
|
|
|
If '-v' is specified, the script reports what it is doing.
|
|
|
|
|
|
|
|
Otherwise, success is indicated the Unix way, i.e. by simply exiting with
|
|
|
|
a zero exit status.
|
|
|
|
|
|
|
|
Author
|
|
|
|
------
|
|
|
|
Written by Matthias Urlichs <smurf@smurf.noris.de>, with help from
|
|
|
|
various participants of the git-list <git@vger.kernel.org>.
|
|
|
|
|
|
|
|
Based on a cvs2git script by the same author.
|
|
|
|
|
|
|
|
Documentation
|
|
|
|
--------------
|
|
|
|
Documentation by Matthias Urlichs <smurf@smurf.noris.de>.
|
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
|
|
|
Part of the gitlink:git[7] suite
|
|
|
|
|