blob: 6280c2da92dc7b7df48cac0aa1667c30175923e7 [file] [log] [blame]
Junio C Hamano34b18112006-02-23 11:21:401<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Junio C Hamanoba4b9282008-07-06 05:20:316<meta name="generator" content="AsciiDoc 8.2.5" />
Junio C Hamano34b18112006-02-23 11:21:407<style type="text/css">
8/* Debug borders */
9p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
10/*
11 border: 1px solid red;
12*/
13}
14
15body {
16 margin: 1em 5% 1em 5%;
17}
18
Junio C Hamanoba4b9282008-07-06 05:20:3119a {
20 color: blue;
21 text-decoration: underline;
22}
23a:visited {
24 color: fuchsia;
25}
Junio C Hamano34b18112006-02-23 11:21:4026
27em {
28 font-style: italic;
29}
30
31strong {
32 font-weight: bold;
33}
34
35tt {
36 color: navy;
37}
38
39h1, h2, h3, h4, h5, h6 {
40 color: #527bbd;
41 font-family: sans-serif;
42 margin-top: 1.2em;
43 margin-bottom: 0.5em;
44 line-height: 1.3;
45}
46
Junio C Hamanoba4b9282008-07-06 05:20:3147h1, h2, h3 {
Junio C Hamano34b18112006-02-23 11:21:4048 border-bottom: 2px solid silver;
49}
50h2 {
Junio C Hamano34b18112006-02-23 11:21:4051 padding-top: 0.5em;
52}
Junio C Hamanoba4b9282008-07-06 05:20:3153h3 {
54 float: left;
55}
56h3 + * {
57 clear: left;
58}
Junio C Hamano34b18112006-02-23 11:21:4059
60div.sectionbody {
61 font-family: serif;
62 margin-left: 0;
63}
64
65hr {
66 border: 1px solid silver;
67}
68
69p {
70 margin-top: 0.5em;
71 margin-bottom: 0.5em;
72}
73
74pre {
75 padding: 0;
76 margin: 0;
77}
78
79span#author {
80 color: #527bbd;
81 font-family: sans-serif;
82 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:3183 font-size: 1.1em;
Junio C Hamano34b18112006-02-23 11:21:4084}
85span#email {
86}
87span#revision {
88 font-family: sans-serif;
89}
90
91div#footer {
92 font-family: sans-serif;
93 font-size: small;
94 border-top: 2px solid silver;
95 padding-top: 0.5em;
96 margin-top: 4.0em;
97}
98div#footer-text {
99 float: left;
100 padding-bottom: 0.5em;
101}
102div#footer-badges {
103 float: right;
104 padding-bottom: 0.5em;
105}
106
107div#preamble,
108div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
109div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
110div.admonitionblock {
111 margin-right: 10%;
112 margin-top: 1.5em;
113 margin-bottom: 1.5em;
114}
115div.admonitionblock {
116 margin-top: 2.5em;
117 margin-bottom: 2.5em;
118}
119
120div.content { /* Block element content. */
121 padding: 0;
122}
123
124/* Block element titles. */
125div.title, caption.title {
126 font-family: sans-serif;
127 font-weight: bold;
128 text-align: left;
129 margin-top: 1.0em;
130 margin-bottom: 0.5em;
131}
132div.title + * {
133 margin-top: 0;
134}
135
136td div.title:first-child {
137 margin-top: 0.0em;
138}
139div.content div.title:first-child {
140 margin-top: 0.0em;
141}
142div.content + div.title {
143 margin-top: 0.0em;
144}
145
146div.sidebarblock > div.content {
147 background: #ffffee;
148 border: 1px solid silver;
149 padding: 0.5em;
150}
151
Junio C Hamanoba4b9282008-07-06 05:20:31152div.listingblock {
153 margin-right: 0%;
154}
Junio C Hamano34b18112006-02-23 11:21:40155div.listingblock > div.content {
156 border: 1px solid silver;
157 background: #f4f4f4;
158 padding: 0.5em;
159}
160
161div.quoteblock > div.content {
162 padding-left: 2.0em;
163}
Junio C Hamanoba4b9282008-07-06 05:20:31164
165div.attribution {
Junio C Hamano34b18112006-02-23 11:21:40166 text-align: right;
167}
Junio C Hamanoba4b9282008-07-06 05:20:31168div.verseblock + div.attribution {
169 text-align: left;
170}
Junio C Hamano34b18112006-02-23 11:21:40171
172div.admonitionblock .icon {
173 vertical-align: top;
174 font-size: 1.1em;
175 font-weight: bold;
176 text-decoration: underline;
177 color: #527bbd;
178 padding-right: 0.5em;
179}
180div.admonitionblock td.content {
181 padding-left: 0.5em;
182 border-left: 2px solid silver;
183}
184
185div.exampleblock > div.content {
186 border-left: 2px solid silver;
187 padding: 0.5em;
188}
189
190div.verseblock div.content {
191 white-space: pre;
192}
193
194div.imageblock div.content { padding-left: 0; }
195div.imageblock img { border: 1px solid silver; }
196span.image img { border-style: none; }
197
198dl {
199 margin-top: 0.8em;
200 margin-bottom: 0.8em;
201}
202dt {
203 margin-top: 0.5em;
204 margin-bottom: 0;
205 font-style: italic;
206}
207dd > *:first-child {
208 margin-top: 0;
209}
210
211ul, ol {
212 list-style-position: outside;
213}
Junio C Hamanoba4b9282008-07-06 05:20:31214div.olist2 ol {
Junio C Hamano34b18112006-02-23 11:21:40215 list-style-type: lower-alpha;
216}
217
218div.tableblock > table {
Junio C Hamanoba4b9282008-07-06 05:20:31219 border: 3px solid #527bbd;
Junio C Hamano34b18112006-02-23 11:21:40220}
221thead {
222 font-family: sans-serif;
223 font-weight: bold;
224}
225tfoot {
226 font-weight: bold;
227}
228
229div.hlist {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
Junio C Hamanoba4b9282008-07-06 05:20:31233div.hlist td {
234 padding-bottom: 5px;
235}
Junio C Hamano34b18112006-02-23 11:21:40236td.hlist1 {
237 vertical-align: top;
238 font-style: italic;
239 padding-right: 0.8em;
240}
241td.hlist2 {
242 vertical-align: top;
243}
244
245@media print {
246 div#footer-badges { display: none; }
247}
Junio C Hamanoba4b9282008-07-06 05:20:31248
249div#toctitle {
250 color: #527bbd;
251 font-family: sans-serif;
252 font-size: 1.1em;
253 font-weight: bold;
254 margin-top: 1.0em;
255 margin-bottom: 0.1em;
256}
257
258div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
259 margin-top: 0;
260 margin-bottom: 0;
261}
262div.toclevel2 {
263 margin-left: 2em;
264 font-size: 0.9em;
265}
266div.toclevel3 {
267 margin-left: 4em;
268 font-size: 0.9em;
269}
270div.toclevel4 {
271 margin-left: 6em;
272 font-size: 0.9em;
273}
274include1::./stylesheets/xhtml11-manpage.css[]
Junio C Hamano34b18112006-02-23 11:21:40275/* Workarounds for IE6's broken and incomplete CSS2. */
276
277div.sidebar-content {
278 background: #ffffee;
279 border: 1px solid silver;
280 padding: 0.5em;
281}
282div.sidebar-title, div.image-title {
283 font-family: sans-serif;
284 font-weight: bold;
285 margin-top: 0.0em;
286 margin-bottom: 0.5em;
287}
288
289div.listingblock div.content {
290 border: 1px solid silver;
291 background: #f4f4f4;
292 padding: 0.5em;
293}
294
295div.quoteblock-content {
296 padding-left: 2.0em;
297}
298
299div.exampleblock-content {
300 border-left: 2px solid silver;
301 padding-left: 0.5em;
302}
Junio C Hamanoba4b9282008-07-06 05:20:31303
304/* IE6 sets dynamically generated links as visited. */
305div#toc a:visited { color: blue; }
Junio C Hamano34b18112006-02-23 11:21:40306</style>
307<title>git-cvsserver(1)</title>
308</head>
309<body>
310<div id="header">
311<h1>
312git-cvsserver(1) Manual Page
313</h1>
314<h2>NAME</h2>
315<div class="sectionbody">
316<p>git-cvsserver -
317 A CVS server emulator for git
318</p>
319</div>
320</div>
321<h2>SYNOPSIS</h2>
322<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31323<div class="para"><p>SSH:</p></div>
Junio C Hamano34b18112006-02-23 11:21:40324<div class="verseblock">
Junio C Hamano7c2d9ea2008-08-19 09:01:44325<div class="content">export CVS_SERVER="git cvsserver"
Junio C Hamano34b18112006-02-23 11:21:40326<em>cvs</em> -d :ext:user@server/path/repo.git co &lt;HEAD_name&gt;</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31327<div class="para"><p>pserver (/etc/inetd.conf):</p></div>
Junio C Hamano6926bef2007-06-16 09:54:05328<div class="verseblock">
329<div class="content">cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver pserver</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31330<div class="para"><p>Usage:</p></div>
Junio C Hamano6926bef2007-06-16 09:54:05331<div class="verseblock">
Junio C Hamanofce7c7e2008-07-02 03:06:38332<div class="content"><em>git cvsserver</em> [options] [pserver|server] [&lt;directory&gt; &#8230;]</div></div>
Junio C Hamano6926bef2007-06-16 09:54:05333</div>
Junio C Hamanoba4b9282008-07-06 05:20:31334<h2 id="_options">OPTIONS</h2>
Junio C Hamano6926bef2007-06-16 09:54:05335<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31336<div class="para"><p>All these options obviously only make sense if enforced by the server side.
Junio C Hamano6926bef2007-06-16 09:54:05337They have been implemented to resemble the <a href="git-daemon.html">git-daemon(1)</a> options as
Junio C Hamanoba4b9282008-07-06 05:20:31338closely as possible.</p></div>
339<div class="vlist"><dl>
Junio C Hamano6926bef2007-06-16 09:54:05340<dt>
341--base-path &lt;path&gt;
342</dt>
343<dd>
344<p>
345Prepend <em>path</em> to requested CVSROOT
346</p>
347</dd>
348<dt>
349--strict-paths
350</dt>
351<dd>
352<p>
353Don't allow recursing into subdirectories
354</p>
355</dd>
356<dt>
357--export-all
358</dt>
359<dd>
360<p>
361Don't check for <tt>gitcvs.enabled</tt> in config. You also have to specify a list
362of allowed directories (see below) if you want to use this option.
363</p>
364</dd>
365<dt>
Junio C Hamanoeb415992008-06-08 22:49:47366-V
367</dt>
368<dt>
369--version
Junio C Hamano6926bef2007-06-16 09:54:05370</dt>
371<dd>
372<p>
373Print version information and exit
374</p>
375</dd>
376<dt>
Junio C Hamanoeb415992008-06-08 22:49:47377-h
378</dt>
379<dt>
380-H
381</dt>
382<dt>
383--help
Junio C Hamano6926bef2007-06-16 09:54:05384</dt>
385<dd>
386<p>
387Print usage information and exit
388</p>
389</dd>
390<dt>
391&lt;directory&gt;
392</dt>
393<dd>
394<p>
395You can specify a list of allowed directories. If no directories
396are given, all are allowed. This is an additional restriction, gitcvs
397access still needs to be enabled by the <tt>gitcvs.enabled</tt> config option
398unless <em>--export-all</em> was given, too.
399</p>
400</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31401</dl></div>
Junio C Hamano34b18112006-02-23 11:21:40402</div>
Junio C Hamanoba4b9282008-07-06 05:20:31403<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano34b18112006-02-23 11:21:40404<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31405<div class="para"><p>This application is a CVS emulation layer for git.</p></div>
406<div class="para"><p>It is highly functional. However, not all methods are implemented,
Junio C Hamano34b18112006-02-23 11:21:40407and for those methods that are implemented,
Junio C Hamanoba4b9282008-07-06 05:20:31408not all switches are implemented.</p></div>
409<div class="para"><p>Testing has been done using both the CLI CVS client, and the Eclipse CVS
410plugin. Most functionality works fine with both of these clients.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40411</div>
Junio C Hamanoba4b9282008-07-06 05:20:31412<h2 id="_limitations">LIMITATIONS</h2>
Junio C Hamano34b18112006-02-23 11:21:40413<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31414<div class="para"><p>Currently cvsserver works over SSH connections for read/write clients, and
415over pserver for anonymous CVS access.</p></div>
416<div class="para"><p>CVS clients cannot tag, branch or perform GIT merges.</p></div>
417<div class="para"><p><em>git-cvsserver</em> maps GIT branches to CVS modules. This is very different
Junio C Hamanoa2ad99e2007-04-18 09:57:04418from what most CVS users would expect since in CVS modules usually represent
Junio C Hamanoba4b9282008-07-06 05:20:31419one or more directories.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40420</div>
Junio C Hamanoba4b9282008-07-06 05:20:31421<h2 id="_installation">INSTALLATION</h2>
Junio C Hamano34b18112006-02-23 11:21:40422<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31423<div class="olist"><ol>
Junio C Hamano34b18112006-02-23 11:21:40424<li>
425<p>
Junio C Hamanodecf50e2006-03-05 10:51:14426If you are going to offer anonymous CVS access via pserver, add a line in
427 /etc/inetd.conf like
Junio C Hamano34b18112006-02-23 11:21:40428</p>
Junio C Hamanof1d14802006-06-08 00:48:17429<div class="listingblock">
Junio C Hamanodecf50e2006-03-05 10:51:14430<div class="content">
Junio C Hamanof1d14802006-06-08 00:48:17431<pre><tt> cvspserver stream tcp nowait nobody git-cvsserver pserver
432</tt></pre>
Junio C Hamanodecf50e2006-03-05 10:51:14433</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31434<div class="para"><p>Note: Some inetd servers let you specify the name of the executable
Junio C Hamano591dc6a2007-05-29 09:18:19435independently of the value of argv[0] (i.e. the name the program assumes
436it was executed with). In this case the correct line in /etc/inetd.conf
Junio C Hamanoba4b9282008-07-06 05:20:31437looks like</p></div>
Junio C Hamanof1d14802006-06-08 00:48:17438<div class="listingblock">
Junio C Hamanodecf50e2006-03-05 10:51:14439<div class="content">
Junio C Hamano591dc6a2007-05-29 09:18:19440<pre><tt> cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver pserver
Junio C Hamanof1d14802006-06-08 00:48:17441</tt></pre>
Junio C Hamanodecf50e2006-03-05 10:51:14442</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31443<div class="para"><p>No special setup is needed for SSH access, other than having GIT tools
Junio C Hamanodecf50e2006-03-05 10:51:14444in the PATH. If you have clients that do not accept the CVS_SERVER
Junio C Hamanoba4b9282008-07-06 05:20:31445environment variable, you can rename <em>git-cvsserver</em> to <tt>cvs</tt>.</p></div>
446<div class="para"><p>Note: Newer CVS versions (&gt;= 1.12.11) also support specifying
447CVS_SERVER directly in CVSROOT like</p></div>
Junio C Hamano591dc6a2007-05-29 09:18:19448<div class="listingblock">
449<div class="content">
Junio C Hamano7c2d9ea2008-08-19 09:01:44450<pre><tt>cvs -d ":ext;CVS_SERVER=git cvsserver:user@server/path/repo.git" co &lt;HEAD_name&gt;</tt></pre>
Junio C Hamano591dc6a2007-05-29 09:18:19451</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31452<div class="para"><p>This has the advantage that it will be saved in your <em>CVS/Root</em> files and
Junio C Hamano591dc6a2007-05-29 09:18:19453you don't need to worry about always setting the correct environment
Junio C Hamanoba4b9282008-07-06 05:20:31454variable. SSH users restricted to <em>git-shell</em> don't need to override the default
455with CVS_SERVER (and shouldn't) as <em>git-shell</em> understands <tt>cvs</tt> to mean
456<em>git-cvsserver</em> and pretends that the other end runs the real <em>cvs</em> better.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40457</li>
458<li>
459<p>
460For each repo that you want accessible from CVS you need to edit config in
461 the repo and add the following section.
462</p>
Junio C Hamanof1d14802006-06-08 00:48:17463<div class="listingblock">
Junio C Hamano34b18112006-02-23 11:21:40464<div class="content">
Junio C Hamanof1d14802006-06-08 00:48:17465<pre><tt> [gitcvs]
466 enabled=1
467 # optional for debugging
468 logfile=/path/to/logfile
469</tt></pre>
Junio C Hamano34b18112006-02-23 11:21:40470</div></div>
Junio C Hamanoba4b9282008-07-06 05:20:31471<div class="para"><p>Note: you need to ensure each user that is going to invoke <em>git-cvsserver</em> has
Junio C Hamanoa2ad99e2007-04-18 09:57:04472write access to the log file and to the database (see
473<a href="#dbbackend">Database Backend</a>. If you want to offer write access over
Junio C Hamanoba4b9282008-07-06 05:20:31474SSH, the users of course also need write access to the git repository itself.</p></div>
475<div class="para"><p>You also need to ensure that each repository is "bare" (without a git index
476file) for <tt>cvs commit</tt> to work. See <a href="gitcvs-migration.html">gitcvs-migration(7)</a>.</p></div>
477<div class="para" id="configaccessmethod"><p>All configuration variables can also be overridden for a specific method of
Junio C Hamanoa2ad99e2007-04-18 09:57:04478access. Valid method names are "ext" (for SSH access) and "pserver". The
479following example configuration would disable pserver access while still
Junio C Hamanoba4b9282008-07-06 05:20:31480allowing access over SSH.</p></div>
Junio C Hamanoa2ad99e2007-04-18 09:57:04481<div class="listingblock">
482<div class="content">
483<pre><tt> [gitcvs]
484 enabled=0
485
486 [gitcvs "ext"]
487 enabled=1</tt></pre>
488</div></div>
Junio C Hamano34b18112006-02-23 11:21:40489</li>
490<li>
491<p>
Junio C Hamano33f98432008-04-16 09:10:05492If you didn't specify the CVSROOT/CVS_SERVER directly in the checkout command,
493 automatically saving it in your <em>CVS/Root</em> files, then you need to set them
494 explicitly in your environment. CVSROOT should be set as per normal, but the
495 directory should point at the appropriate git repo. As above, for SSH clients
Junio C Hamano4604fe52008-09-19 06:37:10496 _not_ restricted to <em>git-shell</em>, CVS_SERVER should be set to <em>git-cvsserver</em>.
Junio C Hamanodecf50e2006-03-05 10:51:14497</p>
Junio C Hamanof1d14802006-06-08 00:48:17498<div class="listingblock">
Junio C Hamanodecf50e2006-03-05 10:51:14499<div class="content">
Junio C Hamanof1d14802006-06-08 00:48:17500<pre><tt> export CVSROOT=:ext:user@server:/var/git/project.git
Junio C Hamano7c2d9ea2008-08-19 09:01:44501 export CVS_SERVER="git cvsserver"</tt></pre>
Junio C Hamanodecf50e2006-03-05 10:51:14502</div></div>
503</li>
504<li>
505<p>
Junio C Hamano33f98432008-04-16 09:10:05506For SSH clients that will make commits, make sure their server-side
507 .ssh/environment files (or .bashrc, etc., according to their specific shell)
508 export appropriate values for GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL,
509 GIT_COMMITTER_NAME, and GIT_COMMITTER_EMAIL. For SSH clients whose login
510 shell is bash, .bashrc may be a reasonable alternative.
Junio C Hamano34b18112006-02-23 11:21:40511</p>
512</li>
513<li>
514<p>
Junio C Hamanodecf50e2006-03-05 10:51:14515Clients should now be able to check out the project. Use the CVS <em>module</em>
Junio C Hamano33f98432008-04-16 09:10:05516 name to indicate what GIT <em>head</em> you want to check out. This also sets the
517 name of your newly checked-out directory, unless you tell it otherwise with
518 <tt>-d &lt;dir_name&gt;</tt>. For example, this checks out <em>master</em> branch to the
519 <tt>project-master</tt> directory:
Junio C Hamano34b18112006-02-23 11:21:40520</p>
Junio C Hamanof1d14802006-06-08 00:48:17521<div class="listingblock">
Junio C Hamanodecf50e2006-03-05 10:51:14522<div class="content">
Junio C Hamanof1d14802006-06-08 00:48:17523<pre><tt> cvs co -d project-master master</tt></pre>
Junio C Hamanodecf50e2006-03-05 10:51:14524</div></div>
Junio C Hamano34b18112006-02-23 11:21:40525</li>
Junio C Hamanoba4b9282008-07-06 05:20:31526</ol></div>
Junio C Hamano34b18112006-02-23 11:21:40527</div>
Junio C Hamanoba4b9282008-07-06 05:20:31528<h2 id="dbbackend">Database Backend</h2>
Junio C Hamanoa2ad99e2007-04-18 09:57:04529<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31530<div class="para"><p><em>git-cvsserver</em> uses one database per git head (i.e. CVS module) to
Junio C Hamanoa2ad99e2007-04-18 09:57:04531store information about the repository for faster access. The
Junio C Hamano591dc6a2007-05-29 09:18:19532database doesn't contain any persistent data and can be completely
Junio C Hamanoa2ad99e2007-04-18 09:57:04533regenerated from the git repository at any time. The database
Junio C Hamanoba4b9282008-07-06 05:20:31534needs to be updated (i.e. written to) after every commit.</p></div>
535<div class="para"><p>If the commit is done directly by using <tt>git</tt> (as opposed to
536using <em>git-cvsserver</em>) the update will need to happen on the
537next repository access by <em>git-cvsserver</em>, independent of
538access method and requested operation.</p></div>
539<div class="para"><p>That means that even if you offer only read access (e.g. by using
540the pserver method), <em>git-cvsserver</em> should have write access to
Junio C Hamanoa2ad99e2007-04-18 09:57:04541the database to work reliably (otherwise you need to make sure
Junio C Hamanoba4b9282008-07-06 05:20:31542that the database is up-to-date any time <em>git-cvsserver</em> is executed).</p></div>
543<div class="para"><p>By default it uses SQLite databases in the git directory, named
Junio C Hamanoa2ad99e2007-04-18 09:57:04544<tt>gitcvs.&lt;module_name&gt;.sqlite</tt>. Note that the SQLite backend creates
545temporary files in the same directory as the database file on
546write so it might not be enough to grant the users using
Junio C Hamanoba4b9282008-07-06 05:20:31547<em>git-cvsserver</em> write access to the database file without granting
548them write access to the directory, too.</p></div>
549<div class="para"><p>You can configure the database backend with the following
550configuration variables:</p></div>
551<h3 id="_configuring_database_backend">Configuring database backend</h3><div style="clear:left"></div>
552<div class="para"><p><em>git-cvsserver</em> uses the Perl DBI module. Please also read
Junio C Hamanoa2ad99e2007-04-18 09:57:04553its documentation if changing these variables, especially
Junio C Hamanoba4b9282008-07-06 05:20:31554about <tt>DBI-&gt;connect()</tt>.</p></div>
555<div class="vlist"><dl>
Junio C Hamanoa2ad99e2007-04-18 09:57:04556<dt>
557gitcvs.dbname
558</dt>
559<dd>
560<p>
561 Database name. The exact meaning depends on the
Junio C Hamano1f511962008-01-30 08:28:52562 selected database driver, for SQLite this is a filename.
Junio C Hamanoa2ad99e2007-04-18 09:57:04563 Supports variable substitution (see below). May
564 not contain semicolons (<tt>;</tt>).
565 Default: <em>%Ggitcvs.%m.sqlite</em>
566</p>
567</dd>
568<dt>
569gitcvs.dbdriver
570</dt>
571<dd>
572<p>
573 Used DBI driver. You can specify any available driver
574 for this here, but it might not work. cvsserver is tested
575 with <em>DBD::SQLite</em>, reported to work with
576 <em>DBD::Pg</em>, and reported <strong>not</strong> to work with <em>DBD::mysql</em>.
577 Please regard this as an experimental feature. May not
Junio C Hamano1f511962008-01-30 08:28:52578 contain colons (<tt>:</tt>).
Junio C Hamanoa2ad99e2007-04-18 09:57:04579 Default: <em>SQLite</em>
580</p>
581</dd>
582<dt>
583gitcvs.dbuser
584</dt>
585<dd>
586<p>
587 Database user. Only useful if setting <tt>dbdriver</tt>, since
588 SQLite has no concept of database users. Supports variable
589 substitution (see below).
590</p>
591</dd>
592<dt>
593gitcvs.dbpass
594</dt>
595<dd>
596<p>
597 Database password. Only useful if setting <tt>dbdriver</tt>, since
598 SQLite has no concept of database passwords.
599</p>
600</dd>
Junio C Hamanoa74efce2008-04-02 08:39:08601<dt>
602gitcvs.dbTableNamePrefix
603</dt>
604<dd>
605<p>
606 Database table name prefix. Supports variable substitution
607 (see below). Any non-alphabetic characters will be replaced
608 with underscores.
609</p>
610</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31611</dl></div>
612<div class="para"><p>All variables can also be set per access method, see <a href="#configaccessmethod">above</a>.</p></div>
613<h4 id="_variable_substitution">Variable substitution</h4>
614<div class="para"><p>In <tt>dbdriver</tt> and <tt>dbuser</tt> you can use the following variables:</p></div>
615<div class="vlist"><dl>
Junio C Hamanoa2ad99e2007-04-18 09:57:04616<dt>
617%G
618</dt>
619<dd>
620<p>
621 git directory name
622</p>
623</dd>
624<dt>
625%g
626</dt>
627<dd>
628<p>
629 git directory name, where all characters except for
630 alpha-numeric ones, <tt>.</tt>, and <tt>-</tt> are replaced with
631 <tt>_</tt> (this should make it easier to use the directory
632 name in a filename if wanted)
633</p>
634</dd>
635<dt>
636%m
637</dt>
638<dd>
639<p>
640 CVS module/git head name
641</p>
642</dd>
643<dt>
644%a
645</dt>
646<dd>
647<p>
648 access method (one of "ext" or "pserver")
649</p>
650</dd>
651<dt>
652%u
653</dt>
654<dd>
655<p>
Junio C Hamanoba4b9282008-07-06 05:20:31656 Name of the user running <em>git-cvsserver</em>.
Junio C Hamanoa2ad99e2007-04-18 09:57:04657 If no name can be determined, the
658 numeric uid is used.
659</p>
660</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31661</dl></div>
Junio C Hamanoa2ad99e2007-04-18 09:57:04662</div>
Junio C Hamanoba4b9282008-07-06 05:20:31663<h2 id="_eclipse_cvs_client_notes">Eclipse CVS Client Notes</h2>
Junio C Hamano9512fcf2006-03-01 12:05:14664<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31665<div class="para"><p>To get a checkout with the Eclipse CVS client:</p></div>
666<div class="olist"><ol>
Junio C Hamano9512fcf2006-03-01 12:05:14667<li>
668<p>
Junio C Hamanodecf50e2006-03-05 10:51:14669Select "Create a new project -&gt; From CVS checkout"
Junio C Hamano9512fcf2006-03-01 12:05:14670</p>
671</li>
672<li>
673<p>
Junio C Hamanodecf50e2006-03-05 10:51:14674Create a new location. See the notes below for details on how to choose the
675 right protocol.
Junio C Hamano9512fcf2006-03-01 12:05:14676</p>
677</li>
678<li>
679<p>
Junio C Hamanodecf50e2006-03-05 10:51:14680Browse the <em>modules</em> available. It will give you a list of the heads in
681 the repository. You will not be able to browse the tree from there. Only
682 the heads.
Junio C Hamano9512fcf2006-03-01 12:05:14683</p>
684</li>
685<li>
686<p>
Junio C Hamanodecf50e2006-03-05 10:51:14687Pick <em>HEAD</em> when it asks what branch/tag to check out. Untick the
688 "launch commit wizard" to avoid committing the .project file.
Junio C Hamano9512fcf2006-03-01 12:05:14689</p>
690</li>
Junio C Hamanoba4b9282008-07-06 05:20:31691</ol></div>
692<div class="para"><p>Protocol notes: If you are using anonymous access via pserver, just select that.
Junio C Hamanodecf50e2006-03-05 10:51:14693Those using SSH access should choose the <em>ext</em> protocol, and configure <em>ext</em>
694access on the Preferences-&gt;Team-&gt;CVS-&gt;ExtConnection pane. Set CVS_SERVER to
Junio C Hamano7c2d9ea2008-08-19 09:01:44695"<em>git cvsserver</em>". Note that password support is not good when using <em>ext</em>,
Junio C Hamanoba4b9282008-07-06 05:20:31696you will definitely want to have SSH keys setup.</p></div>
697<div class="para"><p>Alternatively, you can just use the non-standard extssh protocol that Eclipse
Junio C Hamanodecf50e2006-03-05 10:51:14698offer. In that case CVS_SERVER is ignored, and you will have to replace
Junio C Hamanoba4b9282008-07-06 05:20:31699the cvs utility on the server with <em>git-cvsserver</em> or manipulate your <tt>.bashrc</tt>
700so that calling <em>cvs</em> effectively calls <em>git-cvsserver</em>.</p></div>
Junio C Hamano9512fcf2006-03-01 12:05:14701</div>
Junio C Hamanoba4b9282008-07-06 05:20:31702<h2 id="_clients_known_to_work">Clients known to work</h2>
Junio C Hamano9512fcf2006-03-01 12:05:14703<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31704<div class="ilist"><ul>
Junio C Hamano103ad7f2007-03-14 11:19:26705<li>
706<p>
707CVS 1.12.9 on Debian
708</p>
709</li>
710<li>
711<p>
Junio C Hamano9512fcf2006-03-01 12:05:14712CVS 1.11.17 on MacOSX (from Fink package)
Junio C Hamano103ad7f2007-03-14 11:19:26713</p>
714</li>
715<li>
716<p>
Junio C Hamano9512fcf2006-03-01 12:05:14717Eclipse 3.0, 3.1.2 on MacOSX (see Eclipse CVS Client Notes)
Junio C Hamano103ad7f2007-03-14 11:19:26718</p>
719</li>
720<li>
721<p>
722TortoiseCVS
723</p>
724</li>
Junio C Hamanoba4b9282008-07-06 05:20:31725</ul></div>
Junio C Hamano9512fcf2006-03-01 12:05:14726</div>
Junio C Hamanoba4b9282008-07-06 05:20:31727<h2 id="_operations_supported">Operations supported</h2>
Junio C Hamano34b18112006-02-23 11:21:40728<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31729<div class="para"><p>All the operations required for normal use are supported, including
Junio C Hamano34b18112006-02-23 11:21:40730checkout, diff, status, update, log, add, remove, commit.
731Legacy monitoring operations are not supported (edit, watch and related).
Junio C Hamanoba4b9282008-07-06 05:20:31732Exports and tagging (tags and branches) are not supported at this stage.</p></div>
733<h3 id="_crlf_line_ending_conversions">CRLF Line Ending Conversions</h3><div style="clear:left"></div>
734<div class="para"><p>By default the server leaves the <em>-k</em> mode blank for all files,
Junio C Hamanodfccbb02008-05-26 01:16:14735which causes the cvs client to treat them as a text files, subject
Junio C Hamanoba4b9282008-07-06 05:20:31736to crlf conversion on some platforms.</p></div>
737<div class="para"><p>You can make the server use <tt>crlf</tt> attributes to set the <em>-k</em> modes
Junio C Hamanodfccbb02008-05-26 01:16:14738for files by setting the <tt>gitcvs.usecrlfattr</tt> config variable.
739In this case, if <tt>crlf</tt> is explicitly unset (<em>-crlf</em>), then the
740server will set <em>-kb</em> mode for binary files. If <tt>crlf</tt> is set,
741then the <em>-k</em> mode will explicitly be left blank. See
742also <a href="gitattributes.html">gitattributes(5)</a> for more information about the <tt>crlf</tt>
Junio C Hamanoba4b9282008-07-06 05:20:31743attribute.</p></div>
744<div class="para"><p>Alternatively, if <tt>gitcvs.usecrlfattr</tt> config is not enabled
Junio C Hamanodfccbb02008-05-26 01:16:14745or if the <tt>crlf</tt> attribute is unspecified for a filename, then
746the server uses the <tt>gitcvs.allbinary</tt> config for the default setting.
747If <tt>gitcvs.allbinary</tt> is set, then file not otherwise
748specified will default to <em>-kb</em> mode. Otherwise the <em>-k</em> mode
749is left blank. But if <tt>gitcvs.allbinary</tt> is set to "guess", then
750the correct <em>-k</em> mode will be guessed based on the contents of
Junio C Hamanoba4b9282008-07-06 05:20:31751the file.</p></div>
752<div class="para"><p>For best consistency with <em>cvs</em>, it is probably best to override the
Junio C Hamanodfccbb02008-05-26 01:16:14753defaults by setting <tt>gitcvs.usecrlfattr</tt> to true,
Junio C Hamanoba4b9282008-07-06 05:20:31754and <tt>gitcvs.allbinary</tt> to "guess".</p></div>
Junio C Hamano34b18112006-02-23 11:21:40755</div>
Junio C Hamanoba4b9282008-07-06 05:20:31756<h2 id="_dependencies">Dependencies</h2>
Junio C Hamano34b18112006-02-23 11:21:40757<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31758<div class="para"><p><em>git-cvsserver</em> depends on DBD::SQLite.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40759</div>
Junio C Hamanoba4b9282008-07-06 05:20:31760<h2 id="_copyright_and_authors">Copyright and Authors</h2>
Junio C Hamano34b18112006-02-23 11:21:40761<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31762<div class="para"><p>This program is copyright The Open University UK - 2006.</p></div>
763<div class="para"><p>Authors:</p></div>
764<div class="ilist"><ul>
Junio C Hamano103ad7f2007-03-14 11:19:26765<li>
766<p>
767Martyn Smith &lt;martyn@catalyst.net.nz&gt;
768</p>
769</li>
770<li>
771<p>
772Martin Langhoff &lt;martin@catalyst.net.nz&gt;
773</p>
774</li>
Junio C Hamanoba4b9282008-07-06 05:20:31775</ul></div>
776<div class="para"><p>with ideas and patches from participants of the git-list &lt;git@vger.kernel.org&gt;.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40777</div>
Junio C Hamanoba4b9282008-07-06 05:20:31778<h2 id="_documentation">Documentation</h2>
Junio C Hamano34b18112006-02-23 11:21:40779<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31780<div class="para"><p>Documentation by Martyn Smith &lt;martyn@catalyst.net.nz&gt;, Martin Langhoff &lt;martin@catalyst.net.nz&gt;, and Matthias Urlichs &lt;smurf@smurf.noris.de&gt;.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40781</div>
Junio C Hamanoba4b9282008-07-06 05:20:31782<h2 id="_git">GIT</h2>
Junio C Hamano34b18112006-02-23 11:21:40783<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31784<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano34b18112006-02-23 11:21:40785</div>
786<div id="footer">
787<div id="footer-text">
Junio C Hamano73d812c2009-07-01 02:33:06788Last updated 2009-07-01 02:30:47 UTC
Junio C Hamano34b18112006-02-23 11:21:40789</div>
790</div>
791</body>
792</html>