summaryrefslogtreecommitdiff
path: root/Documentation/git-svnimport.txt
blob: 047f8f334600253fefed5a8d6a5bc734d84f16f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
git-svnimport(1)
================
v0.1, July 2005
 
NAME
----
git-svnimport - Import a SVN repository into git
 
 
SYNOPSIS
--------
'git-svnimport' [ -o <branch-for-HEAD> ] [ -h ] [ -v ]
			[ -C <GIT_repository> ] [ -i ] [ -u ] [-l limit_nr_changes]
			[ -b branch_subdir ] [ -t trunk_subdir ] [ -T tag_subdir ]
			[ -s start_chg ] [ -m ] [ -M regex ] [ <SVN_repository_URL> ]
 
 
DESCRIPTION
-----------
Imports a SVN repository into git. It will either create a new
repository, or incrementally import into an existing one.
 
SVN access is done by the SVN:: Perl module.
 
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
incremental SVN imports. 
 
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.
 
-s <start_rev>::
        Start importing at this SVN change number. The  default is 1.
+
When importing incementally, you might need to edit the .git/svn2git file.
 
-i::
	Import-only: don't perform a checkout after importing.  This option
	ensures the working directory and cache remain untouched and will
	not create them if they do not exist.
 
-t <trunk_subdir>::
	Name the SVN trunk. Default "trunk".
 
-T <tag_subdir>::
	Name the SVN subdirectory for tags. Default "tags".
 
-b <branch_subdir>::
	Name the SVN subdirectory for branches. Default "branches".
 
-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.
 
-m::    
	Attempt to detect merges based on the commit message. This option
	will enable default regexes that try to capture the name source 
	branch name from the commit message. 
 
-M <regex>::
	Attempt to detect merges based on the commit message with a custom
	regex. It can be used with -m to also see the default regexes. 
	You must escape forward slashes. 
 
-l <max_num_changes>::
	Limit the number of SVN changesets we pull before quitting.
	This option is necessary because the SVN library has serious memory
	leaks; the recommended value for nontrivial imports is 100.
 
	git-svnimport will still exit with a zero exit code. You can check
	the size of the file ".git/svn2git" to determine whether to call
	the importer again.
 
-v::
	Verbosity: let 'svnimport' report what it is doing.
 
<SVN_repository_URL>::
	The URL of the SVN module you want to import. For local
	repositories, use "file:///absolute/path".
 
-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