b86b8f46a8ad10e87467e6f0f41bf20bf2a58730
[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 .nf
26 \fIgit\-svnimport\fR [ \-o <branch\-for\-HEAD> ] [ \-h ] [ \-v ] [ \-d | \-D ]
27                 [ \-C <GIT_repository> ] [ \-i ] [ \-u ] [\-l limit_rev]
28                 [ \-b branch_subdir ] [ \-T trunk_subdir ] [ \-t tag_subdir ]
29                 [ \-s start_chg ] [ \-m ] [ \-r ] [ \-M regex ]
30                 [ \-I <ignorefile_name> ] [ \-A <author_file> ]
31                 <SVN_repository_URL> [ <path> ]
32 .fi
33
34 .SH "DESCRIPTION"
35
36
37 Imports a SVN repository into git\&. It will either create a new repository, or incrementally import into an existing one\&.
38
39
40 SVN access is done by the SVN::Perl module\&.
41
42
43 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\&.
44
45
46 git\-svnimport creates a file "\&.git/svn2git", which is required for incremental SVN imports\&.
47
48 .SH "OPTIONS"
49
50 .TP
51 \-C <target\-dir>
52 The GIT repository to import to\&. If the directory doesn't exist, it will be created\&. Default is the current directory\&.
53
54 .TP
55 \-s <start_rev>
56 Start importing at this SVN change number\&. The default is 1\&.
57
58 When importing incrementally, you might need to edit the \&.git/svn2git file\&.
59
60 .TP
61 \-i
62 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\&.
63
64 .TP
65 \-T <trunk_subdir>
66 Name the SVN trunk\&. Default "trunk"\&.
67
68 .TP
69 \-t <tag_subdir>
70 Name the SVN subdirectory for tags\&. Default "tags"\&.
71
72 .TP
73 \-b <branch_subdir>
74 Name the SVN subdirectory for branches\&. Default "branches"\&.
75
76 .TP
77 \-o <branch\-for\-HEAD>
78 The \fItrunk\fR branch from SVN is imported to the \fIorigin\fR branch within the git repository\&. Use this option if you want to import into a different branch\&.
79
80 .TP
81 \-r
82 Prepend \fIrX: \fR to commit messages, where X is the imported subversion revision\&.
83
84 .TP
85 \-I <ignorefile_name>
86 Import the svn:ignore directory property to files with this name in each directory\&. (The Subversion and GIT ignore syntaxes are similar enough that using the Subversion patterns directly with "\-I \&.gitignore" will almost always just work\&.)
87
88 .TP
89 \-A <author_file>
90 Read a file with lines on the form
91
92 .nf
93 username = User's Full Name <email@addr\&.es>
94 .fi
95
96 .nf
97 and use "User's Full Name <email@addr\&.es>" as the GIT
98 author and committer for Subversion commits made by
99 "username"\&. If encountering a commit made by a user not in the
100 list, abort\&.
101 .fi
102
103 .nf
104 For convenience, this data is saved to $GIT_DIR/svn\-authors
105 each time the \-A option is provided, and read from that same
106 file each time git\-svnimport is run with an existing GIT
107 repository without \-A\&.
108 .fi
109
110 .TP
111 \-m
112 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\&.
113
114 .TP
115 \-M <regex>
116 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\&.
117
118 .TP
119 \-l <max_rev>
120 Specify a maximum revision number to pull\&.
121
122 .nf
123 Formerly, this option controlled how many revisions to pull,
124 due to SVN memory leaks\&. (These have been worked around\&.)
125 .fi
126
127 .TP
128 \-v
129 Verbosity: let \fIsvnimport\fR report what it is doing\&.
130
131 .TP
132 \-d
133 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\&.
134
135 .TP
136 \-D
137 Use direct HTTP requests if possible\&. The "<path>" argument is used for retrieving the logs, as well as for the contents\&.
138
139 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\&.
140
141 .TP
142 <SVN_repository_URL>
143 The URL of the SVN module you want to import\&. For local repositories, use "file:///absolute/path"\&.
144
145 If you're using the "\-d" or "\-D" option, this is the URL of the SVN repository itself; it usually ends in "/svn"\&.
146
147 .TP
148 <path>
149 The path to the module you want to check out\&.
150
151 .TP
152 \-h
153 Print a short usage message and exit\&.
154
155 .SH "OUTPUT"
156
157
158 If \fI\-v\fR is specified, the script reports what it is doing\&.
159
160
161 Otherwise, success is indicated the Unix way, i\&.e\&. by simply exiting with a zero exit status\&.
162
163 .SH "AUTHOR"
164
165
166 Written by Matthias Urlichs <smurf@smurf\&.noris\&.de>, with help from various participants of the git\-list <git@vger\&.kernel\&.org>\&.
167
168
169 Based on a cvs2git script by the same author\&.
170
171 .SH "DOCUMENTATION"
172
173
174 Documentation by Matthias Urlichs <smurf@smurf\&.noris\&.de>\&.
175
176 .SH "GIT"
177
178
179 Part of the \fBgit\fR(7) suite
180