b0d44850e53744900577ebcbb67f41162d9557f4
[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 \fIgit\-svnimport\fR [ \-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::Perl module\&.
35
36
37 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\&.
38
39
40 git\-svnimport creates a file "\&.git/svn2git", which is required for incremental SVN imports\&.
41
42 .SH "OPTIONS"
43
44 .TP
45 \-C <target\-dir>
46 The GIT repository to import to\&. If the directory doesn't exist, it will be created\&. Default is the current directory\&.
47
48 .TP
49 \-s <start_rev>
50 Start importing at this SVN change number\&. The default is 1\&.
51
52 When importing incrementally, you might need to edit the \&.git/svn2git file\&.
53
54 .TP
55 \-i
56 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\&.
57
58 .TP
59 \-T <trunk_subdir>
60 Name the SVN trunk\&. Default "trunk"\&.
61
62 .TP
63 \-t <tag_subdir>
64 Name the SVN subdirectory for tags\&. Default "tags"\&.
65
66 .TP
67 \-b <branch_subdir>
68 Name the SVN subdirectory for branches\&. Default "branches"\&.
69
70 .TP
71 \-o <branch\-for\-HEAD>
72 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\&.
73
74 .TP
75 \-r
76 Prepend \fIrX: \fR to commit messages, where X is the imported subversion revision\&.
77
78 .TP
79 \-m
80 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\&.
81
82 .TP
83 \-M <regex>
84 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\&.
85
86 .TP
87 \-l <max_rev>
88 Specify a maximum revision number to pull\&.
89
90 .nf
91 Formerly, this option controlled how many revisions to pull,
92 due to SVN memory leaks\&. (These have been worked around\&.)
93 .fi
94
95 .TP
96 \-v
97 Verbosity: let \fIsvnimport\fR report what it is doing\&.
98
99 .TP
100 \-d
101 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\&.
102
103 .TP
104 \-D
105 Use direct HTTP requests if possible\&. The "<path>" argument is used for retrieving the logs, as well as for the contents\&.
106
107 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\&.
108
109 .TP
110 <SVN_repository_URL>
111 The URL of the SVN module you want to import\&. For local repositories, use "file:///absolute/path"\&.
112
113 If you're using the "\-d" or "\-D" option, this is the URL of the SVN repository itself; it usually ends in "/svn"\&.
114
115 .TP
116 <path>
117 The path to the module you want to check out\&.
118
119 .TP
120 \-h
121 Print a short usage message and exit\&.
122
123 .SH "OUTPUT"
124
125
126 If \fI\-v\fR is specified, the script reports what it is doing\&.
127
128
129 Otherwise, success is indicated the Unix way, i\&.e\&. by simply exiting with a zero exit status\&.
130
131 .SH "AUTHOR"
132
133
134 Written by Matthias Urlichs <smurf@smurf\&.noris\&.de>, with help from various participants of the git\-list <git@vger\&.kernel\&.org>\&.
135
136
137 Based on a cvs2git script by the same author\&.
138
139 .SH "DOCUMENTATION"
140
141
142 Documentation by Matthias Urlichs <smurf@smurf\&.noris\&.de>\&.
143
144 .SH "GIT"
145
146
147 Part of the \fBgit\fR(7) suite
148