9c9d583e359d806b5e71ce128f00cee1e93d7879
[git.git] / man1 / git-svnimport.1
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "GIT-SVNIMPORT" 1 "" "" ""
21 .SH NAME
22 git-svnimport \- Import a SVN repository into git
23 .SH "SYNOPSIS"
24
25
26 git\-svnimport [ \-o <branch\-for\-HEAD> ] [ \-h ] [ \-v ] [ \-d | \-D ] [ \-C <GIT_repository> ] [ \-i ] [ \-u ] [\-l limit_rev] [ \-b branch_subdir ] [ \-T trunk_subdir ] [ \-t tag_subdir ] [ \-s start_chg ] [ \-m ] [ \-M regex ] <SVN_repository_URL> [ <path> ]
27
28 .SH "DESCRIPTION"
29
30
31 Imports a SVN repository into git\&. It will either create a new repository, or incrementally import into an existing one\&.
32
33
34 SVN access is done by the SVN
35
36
37 Perl module\&.
38
39
40 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\&.
41
42
43 git\-svnimport creates a file "\&.git/svn2git", which is required for incremental SVN imports\&.
44
45 .SH "OPTIONS"
46
47 .TP
48 \-C <target\-dir>
49 The GIT repository to import to\&. If the directory doesn't exist, it will be created\&. Default is the current directory\&.
50
51 .TP
52 \-s <start_rev>
53 Start importing at this SVN change number\&. The default is 1\&.
54
55 When importing incrementally, you might need to edit the \&.git/svn2git file\&.
56
57 .TP
58 \-i
59 Import\-only: don't perform a checkout after importing\&. This option ensures the working directory and index remain untouched and will not create them if they do not exist\&.
60
61 .TP
62 \-T <trunk_subdir>
63 Name the SVN trunk\&. Default "trunk"\&.
64
65 .TP
66 \-t <tag_subdir>
67 Name the SVN subdirectory for tags\&. Default "tags"\&.
68
69 .TP
70 \-b <branch_subdir>
71 Name the SVN subdirectory for branches\&. Default "branches"\&.
72
73 .TP
74 \-o <branch\-for\-HEAD>
75 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\&.
76
77 .TP
78 \-m
79 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\&.
80
81 .TP
82 \-M <regex>
83 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\&.
84
85 .TP
86 \-l <max_rev>
87 Specify a maximum revision number to pull\&.
88
89 .nf
90 Formerly, this option controlled how many revisions to pull, due to
91 SVN memory leaks\&. (These have been worked around\&.)
92 .fi
93
94 .TP
95 \-v
96 Verbosity: let svnimport report what it is doing\&.
97
98 .TP
99 \-d
100 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\&.
101
102 .TP
103 \-D
104 Use direct HTTP requests if possible\&. The "<path>" argument is used for retrieving the logs, as well as for the contents\&.
105
106 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\&.
107
108 .TP
109 <SVN_repository_URL>
110 The URL of the SVN module you want to import\&. For local repositories, use "file:///absolute/path"\&.
111
112 If you're using the "\-d" or "\-D" option, this is the URL of the SVN repository itself; it usually ends in "/svn"\&.
113
114 .TP
115 <SVN_repository_URL>
116 The URL of the SVN module you want to import\&. For local repositories, use "file:///absolute/path"\&.
117
118
119 <path> The path to the module you want to check out\&.
120
121 .TP
122 \-h
123 Print a short usage message and exit\&.
124
125 .SH "OUTPUT"
126
127
128 If \-v is specified, the script reports what it is doing\&.
129
130
131 Otherwise, success is indicated the Unix way, i\&.e\&. by simply exiting with a zero exit status\&.
132
133 .SH "AUTHOR"
134
135
136 Written by Matthias Urlichs <smurf@smurf\&.noris\&.de>, with help from various participants of the git\-list <git@vger\&.kernel\&.org>\&.
137
138
139 Based on a cvs2git script by the same author\&.
140
141 .SH "DOCUMENTATION"
142
143
144 Documentation by Matthias Urlichs <smurf@smurf\&.noris\&.de>\&.
145
146 .SH "GIT"
147
148
149 Part of the \fBgit\fR(7) suite
150