1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8"/>
6 <style type=
"text/css"> /* <![CDATA[ */
7 @import
"branding/css/tigris.css";
8 @import
"branding/css/inst.css";
10 <link rel=
"stylesheet" type=
"text/css" media=
"print"
11 href=
"branding/css/print.css"/>
12 <script type=
"text/javascript" src=
"branding/scripts/tigris.js"></script>
13 <title>Subversion FAQ
</title>
19 <h1>Subversion FAQ
</h1>
22 <div class=
"h2"><!-- no 'id' or 'title' attribute for TOC -->
23 <h2>Table of Contents
</h2>
25 <h4>General questions:
</h4>
27 <li><a href=
"#why">Why does this project exist?
</a></li>
28 <li><a href=
"#collab">Is Subversion proprietary? I heard that it
29 belongs to CollabNet.
</a></li>
30 <li><a href=
"#stable">Is Subversion stable enough for me to use for my
31 own projects?
</a></li>
32 <li><a href=
"#interop">What is Subversion's client/server interoperability
34 <li><a href=
"#portability">What operating systems does Subversion run
36 <li><a href=
"#filesystem">What's all this about a new filesystem? Is
37 it like ext2?
</a></li>
38 <li><a href=
"#server-requirements">What kind of hardware do I need to run
39 a Subversion server?
</a></li>
40 <li><a href=
"#apache-extension">I heard that Subversion is an Apache
41 extension? What does it use for servers?
</a></li>
42 <li><a href=
"#need-apache">Does this mean I have to set up Apache to
43 use Subversion?
</a></li>
44 <li><a href=
"#multiple-apachim">I run Apache
1.x right now, and can't
45 switch to Apache
2.0 just to serve Subversion repositories.
46 Does that mean I can't run a Subversion server?
</a></li>
47 <li><a href=
"#feature-x">Why don't you do X, just like SCM system Y?
</a></li>
48 <li><a href=
"#globalrev">Why does the entire repository share the
49 same revision number? I want each of my projects to have their
50 own revision numbers.
</a></li>
51 <li><a href=
"#changesets">Does Subversion have changesets?
</a></li>
52 <li><a href=
"#release">When's the next release?
</a></li>
53 <li><a href=
"#symlinks">Does Subversion support symlinks?
</a></li>
54 <li><a href=
"#logo">I need a high resolution version of the Subversion logo,
55 where can I get it?
</a></li>
56 <li><a href=
"#more-information">I have other questions. Where can I
57 get more information?
</a></li>
58 <li><a href=
"#moderation">Why isn't my post showing up on the mailing
64 <li><a href=
"#co-svn">How do I check out the Subversion code?
</a></li>
65 <li><a href=
"#repository">How do I create a repository? How do I
66 import data into it?
</a></li>
67 <li><a href=
"#cvs2svn">How do I convert an existing CVS repository
68 into a Subversion repository?
</a></li>
69 <li><a href=
"#proxy">What if I'm behind a proxy?
</a></li>
70 <li><a href=
"#paranoid">My admins don't want me to have a HTTP server for
71 Subversion. What can I do if I still want remote usage?
</a></li>
72 <li><a href=
"#multi-proj">How do I manage several different projects
73 under Subversion?
</a></li>
74 <li><a href=
"#multi-merge">How do I merge two completely separate repositories?
</a></li>
75 <li><a href=
"#nfs">Should I store my repository / working copy on a
77 <li><a href=
"#bdblogs">Why is my repository taking up so much disk space?
</a></li>
78 <li><a href=
"#reposperms">How do I set repository permissions correctly?
</a></li>
79 <li><a href=
"#readonly">Why do read-only operations still need repository write access?
</a></li>
80 <li><a href=
"#removal">How do I completely remove a file from the repository's history?
</a></li>
81 <li><a href=
"#change-log-msg">How do I change the log message for a revision
82 after it's been committed?
</a></li>
83 <li><a href=
"#patch">How do I submit a patch for Subversion?
</a></li>
84 <li><a href=
"#in-place-import">How can I do an in-place 'import'
85 (i.e. add a tree to Subversion such that the original data becomes
86 a working copy directly)?
</a></li>
87 <li><a href=
"#dumpload">What is this
"dump/load cycle" people
88 sometimes talk about when upgrading a Subversion server?
</a></li>
89 <li><a href=
"#sspi">How do I allow clients to authenticate against a
90 Windows domain controller using SSPI Authentication?
</a></li>
91 <li><a href=
"#adm-dir">I don't like the
".svn" directory name, and
92 prefer
"SVN" or something else. How do I change it?
</a></li>
93 <li><a href=
"#case-change">How do I change the case of a filename?
</a></li>
94 <li><a href=
"#merge-using-tags">I can't use tags to merge changes from a
95 branch into the trunk like I used to with CVS, can I?
</a></li>
96 <li><a href=
"#version-value-in-source">Why doesn't the $Revision$
97 keyword do what I want? It expands to the file's last-changed
98 revision, but I want something that will expand to the file's
99 current revision.
</a></li>
100 <li><a href=
"#log-in-source">Does Subversion have a keyword which behaves
101 like $Log$ in CVS?
</a></li>
102 <li><a href=
"#ignore-commit">I have a file in my project that every
103 developer must change, but I don't want those local mods to ever be
104 committed. How can I make 'svn commit' ignore the file?
</a></li>
105 <li><a href=
"#ssh-auth-cache">When I access a repository using
106 svn+ssh, my password is not cached in ~/.subversion/auth/. How do
107 I avoid having to type it so often?
</a></li>
108 <li><a href=
"#ssh-svnserve-location">My
109 <tt>svnserve
</tt> binary is in a directory that isn't on my
110 users' default
<tt>PATH
</tt>s, they use svn+ssh, and I can't figure
111 out how to modify their
<tt>PATH
</tt> so that they can run
<tt>svnserve
</tt>.
</a></li>
112 <li><a href=
"#ssh-authorized-keys-trick">
113 I want to allow access via svn+ssh://, but am paranoid. I hate the
114 idea of giving each user a login; I would then have to worry about
115 what they are, and are not, allowed to access on my machine.
117 <li><a href=
"#auto-props">How can I set certain properties on
118 everything in the repository? Also, how can I make sure that every
119 new file coming into the repository has these properties?
</a></li>
120 <li><a href=
"#svn-editor">How do I handle spaces in the editor path?
</a></li>
121 <li><a href=
"#divining-bdb-version">How do I determine which version of
122 Berkeley DB a repository is using?
</a></li>
123 <li><a href=
"#website-auto-update">I'm managing a website in my
124 repository. How can I make the live site automatically update after
125 every commit?
</a></li>
126 <li><a href=
"#single-file-checkout">How do I check out a single
128 <li><a href=
"#wc-change-detection">How do I detect adds, deletes,
129 copies and renames in a working copy after they've already
131 <li><a href=
"#svnserve-win-service">How do I run svnserve as a service
133 <li><a href=
"#bdb-fsfs-convert">How do I convert my repository from using BDB
134 to FSFS or from FSFS to BDB?
</a></li>
135 <li><a href=
"#binary-files">How does Subversion handle binary files?
</a></li>
136 <li><a href=
"#terse-diff">How can I make
<tt>svn diff
</tt> show me
137 just the names of the changed files, not their contents?
</a></li>
139 <a href=
"#sorry-no-globbing">How can I use wildcards or globbing to move many files at once?
</a>
141 <li><a href=
"#vendor-branch">How can I maintain a modified version (a
142 "vendor branch") of third-party software using Subversion?
</a></li>
145 <h4>Troubleshooting:
</h4>
147 <li><a href=
"#stuck-bdb-repos">My repository seems to get stuck all the
148 time, giving me errors about needing recovery (DB_RUNRECOVERY).
149 What could be the cause?
</a></li>
150 <li><a href=
"#bdb-recovery">Every time I try to access
151 my repository, the process just hangs. Is my repository
153 <li><a href=
"#bdb-cannot-allocate-memory">My repository keeps giving
154 errors saying
"Cannot allocate memory". What should I do?
</a></li>
155 <li><a href=
"#wedged-wc">Every time I try to run a svn
156 command, it says my working copy is locked. Is my working copy
158 <li><a href=
"#wc-out-of-date">I'm trying to commit, but Subversion says my
159 working copy is out of date?
</a></li>
160 <li><a href=
"#obstructed-add">I've contributed a patch to a project and the patch added a new file.
161 Now
<tt>svn update
</tt> does not work.
</a></li>
162 <li><a href=
"#unrecognized-url-error">I just built the distribution
163 binary, and when I try to check out Subversion, I get an error
164 about an
"Unrecognized URL scheme." What's up with that?
</a></li>
165 <li><a href=
"#db-recover">I'm getting errors finding or opening a repository,
166 but I know my repository URL is correct. What's wrong?
</a></li>
167 <li><a href=
"#configure-sed-error">When I run `
<tt>configure
</tt>', I
168 get errors
<tt>subs-
1.sed
line
38:
Unterminated
`s'
command
</tt>. What's wrong?
</a></li>
169 <li><a href=
"#windows-msvc-build">I'm having trouble building
170 Subversion under Windows with MSVC++
6.0. What should I do?
</a></li>
171 <li><a href=
"#windows-drive-letter">How can I specify a Windows drive letter in
172 a
<tt>file:
</tt> URL?
</a></li>
173 <li><a href=
"#write-over-dav">I'm having trouble doing write
174 operations to a Subversion repository over a network.
</a></li>
175 <li><a href=
"#vs-asp-net">VS.NET/ASP.NET seems to have a problem with
176 the
".svn" directory name. What should I do?
</a></li>
177 <li><a href=
"#windows-xp-server">Under Windows XP, the Subversion
178 server sometimes seems to send out corrupted data. Can this really be
180 <li><a href=
"#net-trace">What is the best method of doing a network
181 trace of the conversation between a Subversion client and server?
</a></li>
182 <li><a href=
"#revert">Why does the
<tt>svn revert
</tt> require an
183 explicit target? Why is it not recursive by default? These
184 behaviors differ from almost all the other subcommands.
</a></li>
185 <li><a href=
"#db3db4">When I start Apache, mod_dav_svn complains about
186 a
"bad database version", that it found db-
3.X, rather than
188 <li><a href=
"#redhat-db">I'm getting
"Function not implemented" errors on
189 Red Hat
9, and nothing works. How do I fix this?
</a></li>
190 <li><a href=
"#no-author">Why does SVN log say
"(no author)" for files
191 committed or imported via Apache (ra_dav)?
</a></li>
192 <li><a href=
"#windows-access-denied">I'm getting occasional
"Access Denied"
193 errors on Windows. They seem to happen at random. Why?
</a></li>
194 <li><a href=
"#freebsd-hang">On FreeBSD, certain operations (especially
195 svnadmin create) sometimes hang. Why?
</a></li>
196 <li><a href=
"#http-301-error">I can see my repository in a web browser, but
197 'svn checkout' gives me an error about
"301 Moved Permanently".
198 What's wrong?
</a></li>
199 <li><a href=
"#no-copy-history">I'm trying to look at an old version of my
200 file, but svn says something about
"path not found". What's going
202 <li><a href=
"#digest-auth">Why doesn't HTTP Digest auth work?
</a></li>
203 <li><a href=
"#xlc-compile">Compiling with xlc on AIX, I get compilation
204 errors. What's wrong?
</a></li>
205 <li><a href=
"#nonrecursive-checkout">I checked out a directory
206 non-recursively (with -N), and now I want to make certain
207 subdirectories
"appear". But
<tt>svn up subdir
</tt> doesn't
209 <li><a href=
"#mod_dav_svn-win32">I am trying to use mod_dav_svn
210 with Apache on Win32 and I'm getting an error saying that the
211 module cannot be found, yet the mod_dav_svn.so file is right
212 there in
<tt>\Apache\modules.
</tt></a></li>
213 <li><a href=
"#hook-debugging">Why aren't my repository hooks working?
</a></li>
214 <li><a href=
"#diff-cmd">Why does my --diff-cmd complain about '-u'?
215 I tried to override it with --extensions, but it's not working.
</a></li>
216 <li><a href=
"#plaintext-passwords">Ahhh! I just discovered that my
217 Subversion client is caching passwords in plain-text on disk!
219 <li><a href=
"#bdb41-tabletype-bug">I'm getting the error
"svn: bdb: call
220 implies an access method which is inconsistent with previous
221 calls". How do I fix this?
</a></li>
222 <li><a href=
"#hotcopy-large-repos">I can't hotbackup my repository, svnadmin
223 fails on files larger than
2Gb!
</a></li>
224 <li><a href=
"#hidden-log">I cannot see the log entry for the file
225 I just committed. Why?
</a></li>
226 <li><a href=
"#bdb43-upgrade">After upgrading to Berkeley DB
227 4.3 or later, I'm seeing repository errors.
</a></li>
228 <li><a href=
"#tiger-apr-0.9.6">Why do I get occasional, seemingly
229 inconsistent errors when checking out over http:// from a repository
230 running on MacOS X
10.4 (Tiger)?
</a></li>
231 <li><a href=
"#debian-libtool">I can't build Subversion from working
232 copy source on Debian GNU/Linux; I get errors at the final link
233 stage. What's wrong?
</a></li>
234 <li><a href=
"#freebsd-listen-host">I'm using FreeBSD, and I've started
235 svnserve, but it doesn't seem to be listening on port
3690.
</a></li>
236 <li><a href=
"#already-under-version-control">I can't add a directory
237 because Subversion says it's
"already under version control".
</a></li>
238 <li><a href=
"#slow-private-svnserve">Accessing non-public repositories
239 via svnserve is really slow sometimes.
</a></li>
240 <li><a href=
"#ssl-negotiation-error">When performing Subversion
241 operations involving a lot of data over SSL, I get the error
242 <tt>SSL negotiation failed: SSL error: decryption failed or bad
243 record mac
</tt>.
</a></li>
244 <li><a href=
"#broken-subclipse">I get an error that says
"This client is too
246 <li><a href=
"#switch-problems">Why doesn't
<tt>svn switch
</tt> work
247 in some cases?
</a></li>
248 <li><a href=
"#long-paths">In Windows, when doing an update with the
249 command-line client, I get an error saying
"The
250 system cannot find the path specified" and suggesting that my
251 working copy might be corrupt. But I can update with TortoiseSVN
252 just fine. What's going on?
</a></li>
253 <li><a href=
"#working-copy-format-change">I got an error saying
"This
254 client is too old to work with working copy '...' ". How can I
255 fix it without upgrading Subversion?
</a></li>
256 <li><a href=
"#relocation-against-local-symbol">I got an error saying
257 "relocation R_X86_64_32 against `a local symbol' can not be used
258 when making a shared object" when building the Neon library on
64-bit
262 <h4>Developer questions:
</h4>
264 <li><a href=
"#ramdisk-tests">How do I run the regression tests in a
266 <li><a href=
"#dynamic-exe-debugging">How do I run a debugger on
267 dynamic Subversion binaries without having to install
269 <li><a href=
"#avoiding-compiler-inlining">How do I run a debugger on
270 Subversion binaries without compiler inlining obfuscating the
276 <li><a href=
"#http-methods">What are all the HTTP methods Subversion
278 <li><a href=
"#bikeshed">What's a 'bikeshed'?
</a></li>
279 <li><a href=
"#pronounce">How do you pronounce
"Subversion"?
</a></li>
280 <li><a href=
"#baton">What's a 'baton'?
</a></li>
281 <li><a href=
"#def-wedged-repository">What do you mean when you say that
282 repository is 'wedged'?
</a></li>
290 <div class=
"h2" id=
"general-questions" title=
"general-questions">
291 <h2>General questions:
</h2>
294 <div class=
"h3" id=
"why" title=
"why">
295 <h3>Why does this project exist?
</h3>
297 <p>To take over the CVS user base. Specifically, we're writing a new
298 version control system that is very similar to CVS, but fixes many
299 things that are broken. See our front page.
</p>
304 <div class=
"h3" id=
"collab" title=
"collab">
305 <h3>Is Subversion proprietary? I heard that it
306 belongs to CollabNet.
</h3>
308 <p>No, Subversion is open source / free software. CollabNet pays the
309 salaries of several full-time developers, and holds the copyright on
310 the code, but that copyright is
<a
311 href=
"http://subversion.tigris.org/license-1.html">an
312 Apache/BSD-style license
</a>
313 which is fully compliant with the
<a
314 href=
"http://www.debian.org/social_contract#guidelines">Debian Free
315 Software Guidelines
</a>. In other words, you are free to download,
316 modify, and redistribute Subversion as you please; no permission from
317 CollabNet or anyone else is required.
</p>
322 <div class=
"h3" id=
"stable" title=
"stable">
323 <h3>Is Subversion stable enough for me to use for my
326 <p>Yes, absolutely. It's ready for prime-time production.
</p>
328 <p>Subversion has been in development since
2000, and became
329 self-hosting after one year. A year later when we declared
"alpha",
330 Subversion was already being used by dozens of private developers and
331 shops for real work. After that, it was two more years of bugfixing
332 and stabilization until we reached
1.0. Most other projects probably
333 would have called the product
"1.0" much earlier, but we deliberately
334 decided to delay that label as long as possible. We were aware that
335 many people were waiting for a
1.0 before using Subversion, and had
336 very specific expectations about the meaning of that label. So we
337 stuck to that same standard.
</p>
343 <div class=
"h3" id=
"interop" title=
"interop">
344 <h3>What is Subversion's client/server
345 interoperability policy?
</h3>
347 <p>The client and server are designed to work as long as they aren't
348 more than one major release version apart. For example, any
1.X
349 client will work with a
1.Y server. However, if the client and
350 server versions don't match, certain features may not be available.
</p>
352 <p>See the client/server interoperability policy is documented in the
353 "Compatibility" section of the
<a href=
"hacking.html">Hacker's Guide
354 to Subversion
</a>.
</p>
359 <div class=
"h3" id=
"portability" title=
"portability">
360 <h3>What operating systems does Subversion run
363 <p>All modern flavors of Unix, Win32, BeOS, OS/
2, MacOS X.
</p>
365 <p>Subversion is written in ANSI C and uses APR, the
<a
366 href=
"http://apr.apache.org">Apache Portable Runtime
</a> library, as a
367 portability layer. The Subversion client will run anywhere APR runs,
368 which is most places. The Subversion server (i.e., the repository
369 side) is the same, except that it will not host a Berkeley DB repository
370 on Win9x platforms (Win95/Win98/WinME), because Berkeley DB has
371 shared-memory segment problems on Win9x. FSFS repositories
372 (introduced in version
1.1) do not have this restriction; however, due
373 to a limitation in Win9x's file-locking support, they also don't work
376 <p>To reiterate, the Subversion client can be run on any platform
377 where APR runs. The Subversion server can also be run on any
378 platform where APR runs, but cannot host a repository on
379 Win95/Win98/WinMe.
</p>
384 <div class=
"h3" id=
"filesystem" title=
"filesystem">
385 <h3>What's all this about a new filesystem? Is
388 <p>No. The
"Subversion Filesystem" is not a kernel-level filesystem
389 that one would install in an operating system. Instead, it is
390 Subversion's repository interface, which is a
"versioned filesystem"
391 in the sense that it stores a directory tree whose state is remembered
392 from revision to revision. Writing programs to access the repository
393 is similar to writing programs that use other filesystem APIs. The
394 main difference is that this particular filesystem doesn't lose data
395 when written to; old tree states can be retrieved as easily the most
401 <div class=
"h3" id=
"server-requirements" title=
"server-requirements">
402 <h3>What kind of hardware do I need to run a Subversion server?
</h3>
404 <p>Server requirements depend on many factors, such as number of
405 users, frequency of commits and other server related operations,
406 repository size, and the load generated by custom repository hooks.
407 When using Apache, it is likely that Apache itself will be the biggest
408 factor in memory usage. See
409 <a href=
"http://subversion.tigris.org/servlets/BrowseList?list=users&by=thread&from=330941"
410 >this discussion
</a> on the mailing list for some concrete
413 <p>Remember to take in account other applications running on the same
414 server; for example, repository browsers use resources too,
415 independently of Subversion itself.
</p>
417 <p>In general, you can expect to need much less server memory than you
418 would for comparable CVS repositories.
</p>
423 <div class=
"h3" id=
"apache-extension" title=
"apache-extension">
424 <h3>I heard that Subversion is an Apache
425 extension? What does it use for servers?
</h3>
427 <p>No. Subversion is a set of libraries. It comes with a
428 command-line client that uses them. There are two different
429 Subversion server processes: either
<b>svnserve
</b>, which is small
430 standalone program similar to cvs pserver, or Apache
<b>httpd-
2.0</b>
431 using a special
<b>mod_dav_svn
</b> module.
<b>svnserve
</b> speaks a
432 custom protocol, while
<b>mod_dav_svn
</b> uses WebDAV as its network
434 href=
"http://svnbook.red-bean.com/html-chunk/ch06.html">chapter
6</a>
435 in the Subversion book to learn more.
</p>
441 <div class=
"h3" id=
"need-apache" title=
"need-apache">
442 <h3>Does this mean I have to set up Apache to
445 <p>The short answer: no.
</p>
447 <p>The long answer: if you just want to access a repository, then you
448 only need to build a Subversion client. If you want to
<b>host
</b> a
449 networked repository, then you need to set up either Apache2 or an
450 "svnserve" server.
</p>
452 <p>For more details about setting up a network accessible Subversion
454 href=
"http://svnbook.red-bean.com/html-chunk/ch06.html">chapter
6</a>
455 in the Subversion book.
</p>
461 <div class=
"h3" id=
"multiple-apachim" title=
"multiple-apachim">
462 <h3>I run Apache
1.x right now, and can't
463 switch to Apache
2.0 just to serve Subversion repositories.
464 Does that mean I can't run a Subversion server?
</h3>
466 <p>No, you can run
<b>svnserve
</b> as a Subversion server. It works
469 <p>If you want WebDAV and all the other
"goodies" that come with the
470 Apache server, then yes, you'll need Apache
2.0. It's always an
471 option to run Apache
2.0 on a different port while continuing to run
472 Apache
1.x on port
80. Different versions of Apache can happily
473 coexist on the same machine. Just change the
<tt>Listen
</tt>
474 directive in httpd.conf from
"<tt>Listen 80</tt>" to
475 "<tt>Listen 8080</tt>" or whatever port number you want, and make
476 sure to specify that port when you publish your repository URL (e.g.,
477 <tt>http://svn.mydomain.com:
8080/repos/blah/trunk/
</tt>).
</p>
482 <div class=
"h3" id=
"feature-x" title=
"feature-x">
483 <h3>Why don't you do X, just like SCM system Y?
</h3>
485 <p>We aren't attempting to break new ground in SCM systems, nor are we
486 attempting to imitate all the best features of every SCM system out
487 there. We're trying to replace CVS. See the first question.
</p>
492 <div class=
"h3" id=
"globalrev" title=
"globalrev">
493 <h3>Why does the entire repository share the
494 same revision number? I want each of my projects to have their
495 own revision numbers.
</h3>
497 The global revision number attached to the repository as a whole is
498 meaningless from a user's perspective. It's an internal mechanism that
499 accomplishes the goal of the underlying schema design. It just so
500 happens to be exposed so that the user's interface can sometimes be a
501 little more convenient than always having to type obnoxiously long
506 The revision number is only relevant to the repository, and user
507 convenience. It has
<b>no
</b> impact on any other factor of what you
508 store in the repository. Repository revision number bumps aren't
509 nearly useful enough to be an accurate indication of the real rate of
510 change of a given code base. There are other more complicated ways to
511 get a much better picture of a code-base's rate of change.
517 <div class=
"h3" id=
"changesets" title=
"changesets">
518 <h3>Does Subversion have Changesets?
</h3>
520 <p>The question is a bit loaded, because everyone seems to have a
521 slightly different definition of
"changeset", or a least a slightly
522 different expectation of what it means for a version control system to
523 have
"changeset features".
</p>
525 <p>For the purposes of this discussion, here's a simple definition of
526 changeset: it's a collection of changes with a unique name. The
527 changes might include textual edits to file contents, modifications to
528 tree structure, or tweaks to metadata. In more common speak, a
529 changeset is just a patch with a name you can refer to.
</p>
531 <p>Subversion manages versioned trees as first order objects (the
532 repository is an array of trees), and the changesets are things that
533 are derived (by comparing adjacent trees.) Systems like Arch or
534 Bitkeeper are built the other way around: they're designed to manage
535 changesets as first order objects (the repository is a bag of
536 patches), and trees are derived by composing sets of patches
539 <p>Neither philosophy is better in absolute terms: the debate goes
540 back at least
30 years. The two designs are better or worse for
541 different types of software development. We're not going to discuss
542 that here. Instead, here's an explanation of what you can do with
545 <p>In Subversion, a global revision number 'N' names a tree in the
546 repository: it's the way the repository looked after the Nth commit.
547 It's also the name of an implicit changeset: if you compare tree N
548 with tree N-
1, you can derive the exact patch that was committed.
</p>
550 <p>For this reason, it's easy to think of
"revision N" as not just a
551 tree, but a changeset as well. If you use an issue tracker to manage
552 bugs, you can use the revision numbers to refer to particular patches
553 that fix bugs -- for example,
"this issue was fixed by revision 9238."
554 Somebody can then run 'svn log -r9238' to read about the exact
555 changeset which fixed the bug, and run 'svn diff -r9237:
9238' to see
556 the patch itself. And svn's merge command also uses revision numbers.
557 You can merge specific changesets from one branch to another by naming
558 them in the merge arguments: 'svn merge -r9237:
9238 branchURL' would
559 merge changeset #
9238 into your working copy.
</p>
561 <p>This is nowhere near as complicated as a system built around
562 changesets as primary objects, but it's still a vast convenience over
568 <div class=
"h3" id=
"release" title=
"release">
569 <h3>When's the next release?
</h3>
571 <p>See our status page,
<a
572 href=
"http://subversion.tigris.org/project_status.html">
573 http://subversion.tigris.org/project_status.html
</a>.
</p>
578 <div class=
"h3" id=
"symlinks" title=
"symlinks">
579 <h3>Does Subversion support symlinks?
</h3>
581 <p>Subversion
1.1 (and later) has the ability to put a symlink under
582 version control, via the usual
<tt>svn add
</tt> command.
</p>
584 <p>Details: the Subversion repository has no internal concept of a
585 symlink. It stores a
"versioned symlink" as an ordinary file with an
586 'svn:special' property attached. The svn client (on unix) sees the
587 property and translates the file into a symlink in the working copy.
588 Win32 has no symlinks, so a win32 client won't do any such
589 translation: the object appears as a normal file.
</p>
594 <div class=
"h3" id=
"logo" title=
"logo">
595 <h3>I need a high resolution version of the Subversion logo,
596 where can I get it?
</h3>
598 <p>Vectorized versions of the Subversion logo are available in the
<a
599 href=
"http://svn.collab.net/repos/svn/trunk/www">logo directory of the www
600 tree
</a> of the
<a href=
"http://svn.collab.net/repos/svn/trunk">Subversion
603 <p>Specifically, an
<a
604 href=
"http://svn.collab.net/repos/svn/trunk/www/logo/subversion_logo.eps">EPS
605 version
</a>, as well as an
<a
606 href=
"http://svn.collab.net/repos/svn/trunk/www/logo/subversion_logo.ai">Adobe
607 Illustrator document
</a> are available.
</p>
612 <div class=
"h3" id=
"more-information" title=
"more-information">
613 <h3>I have other questions. Where can I get more information?
</h3>
615 <p>If you don't find an answer after browsing this FAQ, there are several
616 other resources available:
</p>
618 <li><a href=
"http://svnbook.red-bean.com">The Subversion Book
</a></li>
619 <li><a href=
"http://subversion.tigris.org/servlets/ProjectMailingListList">The
620 Subversion Users mailing list
</a> (
<a
621 href=
"mailto:users@subversion.tigris.org"
622 >users@subversion.tigris.org
</a>)
623 — note that the list is
<a href=
"#moderation">moderated
</a>, so
624 there may be a delay before your post shows up
</li>
625 <li><a href=
"http://svn.haxx.se/users/">The Subversion Users list
627 <li>IRC on channel #svn on irc.freenode.net
</li>
628 <li><a href=
"http://www.svnforum.org/">svnforum.org
</a>, an unofficial
629 web-based forum with approximately the same target audience as the mailing
636 <div class=
"h3" id=
"moderation" title=
"moderation">
637 <h3>Why isn't my post showing up on the mailing list?
</h3>
639 <p>Our mailing lists are moderated to prevent spam from getting
640 through, so your first post to any list may be delayed, until the
641 moderator has a chance to let it through. Once that post is allowed
642 through, all subsequent posts from the same address are automatically
643 approved, so you should experience no more delay. Of course, if your
644 sending address changes, then you'll have to go through moderation
652 <div class=
"h2" id=
"how-to" title=
"how-to">
657 <div class=
"h3" id=
"co-svn" title=
"co-svn">
658 <h3>How do I check out the Subversion code?
</h3>
659 <p>Use the Subversion client:
</p>
661 $ svn co http://svn.collab.net/repos/svn/trunk subversion
663 <p>That will check out a copy of the Subversion source tree into a
664 directory named subversion on your local machine.
</p>
669 <div class=
"h3" id=
"repository" title=
"repository">
670 <h3>How do I create a repository? How do I
671 import data into it?
</h3>
674 href=
"http://svn.collab.net/repos/svn/trunk/README">
675 http://svn.collab.net/repos/svn/trunk/README
</a>; specifically, look
676 at section IV, the
"Quickstart Guide".
</p>
678 <p>For even more detail, read chapter
5 in
<a
679 href=
"http://svnbook.red-bean.com">The Subversion Book
</a>.
</p>
685 <div class=
"h3" id=
"cvs2svn" title=
"cvs2svn">
686 <h3>How do I convert an existing CVS repository
687 into a Subversion repository?
</h3>
689 <p>Try the cvs2svn conversion tool, from
<a
690 href=
"http://cvs2svn.tigris.org/">http://cvs2svn.tigris.org/
</a> (see
691 also its
<a href=
"http://cvs2svn.tigris.org/features.html" >feature
692 list
</a> and
<a href=
"http://cvs2svn.tigris.org/cvs2svn.html"
693 >documentation
</a>). cvs2svn seems to be what most people use, but if
694 for some reason it doesn't meet your needs, there are at least two
695 other tools you could try:
</p>
700 href=
"http://public.perforce.com/public/revml/index.html">VCP
</a>
701 written by Chia-liang Kao can be found on
<a
702 href=
"http://search.cpan.org/perldoc?VCP::Dest::svk">CPAN
</a>.
</li>
704 <li>refinecvs written by Lev Serebryakov is at
<a
705 href=
"http://lev.serebryakov.spb.ru/refinecvs/"
706 >http://lev.serebryakov.spb.ru/refinecvs/
</a>.
</li>
710 <p>See also the
<a href=
"links.html">Subversion links
</a>
717 <div class=
"h3" id=
"proxy" title=
"proxy">
718 <h3>What if I'm behind a proxy?
</h3>
720 <p>The Subversion client can go through a proxy, if you configure it
721 to do so. First, edit your
"servers" configuration file
722 to indicate which proxy to use. The files location depends on your
723 operating system. On Linux or Unix it is located in the directory
724 "~/.subversion". On Windows it is in
"%APPDATA%\Subversion". (Try
725 "echo %APPDATA%", note this is a hidden directory.)
</p>
727 <p>There are comments in the file explaining what to do. If you don't
728 have that file, get the latest Subversion client and run any command;
729 this will cause the configuration directory and template files to be
732 <p>Next, you need to make sure the proxy server itself supports all
733 the HTTP methods Subversion uses. Some proxy servers do not support
734 these methods by default: PROPFIND, REPORT, MERGE, MKACTIVITY,
735 CHECKOUT. In general, solving this depends on the particular proxy
736 software. For Squid, the config option is
</p>
739 # TAG: extension_methods
740 # Squid only knows about standardized HTTP request methods.
741 # You can add up to
20 additional
"extension" methods here.
745 extension_methods REPORT MERGE MKACTIVITY CHECKOUT
748 <p>(Squid
2.4 and later already knows about PROPFIND.)
</p>
750 <p>See also
"<a href="#http-methods
">What are all the HTTP methods
751 Subversion uses?</a>" for advice on additional HTTP methods to allow
752 through your proxy.
</p>
754 <p>If it's difficult or impossible to get the proxy to allow
755 Subversion traffic, but you want to check out the Subversion sources,
756 you may be able to go around the proxy. Some proxies that filter port
757 80 nevertheless allow anything on port
81. For this reason, the
758 <tt>svn.collab.net
</tt> repository server listens on port
81 as well
759 as on port
80. Try:
</p>
762 svn checkout http://svn.collab.net:
81/repos/svn/trunk subversion
765 <p>and maybe the proxy will let you through. Another strategy is to
766 attempt the checkout over SSL, which many proxies allow:
</p>
769 svn checkout https://svn.collab.net/repos/svn/trunk subversion
772 <p>Of course, your svn client will have to have been built with ssl
773 support; just pass
<tt>--with-ssl
</tt> to Subversion's
774 <tt>./configure
</tt> script. You can check to see whether the 'https'
775 scheme is supported by running
<tt>svn --version
</tt>.
</p>
780 <div class=
"h3" id=
"paranoid" title=
"paranoid">
781 <h3>My admins don't want me to have a HTTP server for
782 Subversion. What can I do if I still want remote usage?
</h3>
784 <p>A simple option is to use the
<b>svnserve
</b> server instead of
786 href=
"http://svnbook.red-bean.com/html-chunk/ch06.html">chapter
6</a>
787 in the Subversion book for details.
</p>
789 <p>However, if your admins don't want you to run Apache, it's very
790 likely they don't want you to run a custom server process on port
3690
791 either! So the rest of this answer assumes that your admins
792 <i>are
</i> okay with you using an existing SSH infrastructure.
</p>
794 <p>If you previously used CVS, you may have used SSH to login to the
795 CVS server. The ra_svn Subversion access method is the equivalent way
796 of doing this with Subversion. Just use the
"svn+ssh" prefix to your
797 Subversion repository URL.
</p>
799 $ svn checkout svn+ssh://your.domain.com/full/path/to/repository
802 <p>This makes your SSH program launch a private 'svnserve' process on
803 the remote box, which accesses the repository as your UID and tunnels
804 the information back over the encrypted link.
</p>
806 <p>However, another solution that can be used instead is to leverage
807 SSH port forwarding to connect to the protected server via ra_dav.
808 You would connect via SSH to a machine behind your firewall that can
809 access your Subversion server. Note that this SSH server does
810 <b>not
</b> have to be the same as where Subversion is installed. It
811 can be, but it doesn't have to be.
</p>
813 <p>Then, you create a local port forward that connects to the HTTP
814 server that houses your Subversion repository. You would then
815 'connect' to the Subversion repository via this local port. Then,
816 the request will be sent 'tunneled' via SSH server to your Subversion
819 <p>An example: a Subversion ra_dav setup is behind your company firewall
820 at
10.1.1.50 (call it svn-server.example.com). Your company allows SSH
821 access via publicly accessible ssh-server.example.com. Internally, you
822 can access the Subversion repository via
823 http://svn-server.example.com/repos/ours.
</p>
825 <p><i>Example
</i>: client connecting to ssh-server with port-forwarding
826 and checking out via the port forward
</p>
829 % ssh -L
8888:svn-server.example.com:
80 me@ssh-server.example.com
830 % svn checkout http://localhost:
8888/repos/ours
833 <p>Note that your svn-server.example.com could also have its httpd
834 instance running on an unprivileged port by a non-trusted user. This
835 will allow your Subversion server not to require root access.
</p>
837 <!-- Can you use svn switch to switch your WC between your internal and
838 external Subversion server? I think so. -->
840 <p>Joe Orton notes
</p>
842 The server is sensitive to the hostname used in the Destination header
843 in MOVE and COPY requests, so you have to be a little careful here - a
844 "ServerAlias localhost" may be required to get this working properly.
847 <p>Some links on SSH port forwarding
</p>
850 <li><a href=
"http://www.onlamp.com/pub/a/onlamp/excerpt/ssh_11/index3.html"
851 >http://www.onlamp.com/pub/a/onlamp/excerpt/ssh_11/index3.html
</a></li>
852 <li><a href=
"http://csociety.ecn.purdue.edu/~sigos/projects/ssh/forwarding/"
853 >http://csociety.ecn.purdue.edu/~sigos/projects/ssh/forwarding/
</a></li>
854 <li><a href=
"http://www.zip.com.au/~roca/ttssh.html">TTSSH: A Win32 SSH client capable of port forwarding
</a></li>
860 <div class=
"h3" id=
"multi-proj" title=
"multi-proj">
861 <h3>How do I manage several different projects under Subversion?
</h3>
863 <p>It depends upon the projects involved. If the projects are
864 related, and are likely to share data, then it's best to create one
865 repository with several subdirectories like this:
</p>
867 $ svnadmin create /repo/svn
868 $ svn mkdir file:///repo/svn/projA
869 $ svn mkdir file:///repo/svn/projB
870 $ svn mkdir file:///repo/svn/projC
873 <p>If the projects are completely unrelated, and not likely to share data
874 between them, then it's probably best to create separate and unrelated
878 $ svnadmin create /repo/svn/projA
879 $ svnadmin create /repo/svn/projB
880 $ svnadmin create /repo/svn/projC
883 The difference between these two approaches is this (as explained by
884 Ben Collins-Sussman
<sussman@collab.net
>):
</p>
888 In the first case, code can easily be copied or moved around
889 between projects, and the history is preserved. ('svn cp/mv'
890 currently only works within a single repository.)
893 Because revision numbers are repository-wide, a commit to any
894 project in the first case causes a global revision bump. So it
895 might seem a bit odd if somebody has 'projB' checked out, notices
896 that
10 revisions have happened, but projB hasn't changed at
897 all. Not a big deal, really. Just a little weird at first.
898 This used to happen to svn everytime people committed to
899 rapidsvn, when rapidsvn was in the same repository. :-)
902 The second case might be easier to secure; it's easier to insulate
903 projects from each other (in terms of users and permissions)
904 using Apache's access control. In the
1st case, you'll need a
905 fancy hook script in the repository that distinguishes projects
906 (
"is this user allowed to commit to this particular subdir?") Of
907 course, we already have such a script, ready for you to use.
914 <div class=
"h3" id=
"multi-merge" title=
"multi-merge">
915 <h3>How do I merge two completely separate repositories?
</h3>
917 <p>If you don't care about retaining all the history of one of the
918 repositories, you can just create a new directory under one project's
919 repository, then import the other.
</p>
921 <p>If you care about retaining the history of both, then you can use
922 'svnadmin dump' to dump one repository, and 'svnadmin load' to load it into
923 the other repository. The revision numbers will be off, but you'll
924 still have the history.
</p>
926 <p>Peter Davis
<peter@pdavis.cx
> also explains a method using svn's
927 equivalent to CVS modules:
</p>
930 <p>As long as the merging takes place in separate directory
931 trees, you can use svn's version of CVS modules.
</p>
933 <p>Set the
<em>svn:externals
</em> property on a directory to checkout
934 directories from other repositories whenever the original
935 directory is checked out. The repository remains separate,
936 but in the working copy it appears that they have been merged.
937 If you commit to the imported directory, it will affect the
938 external repository.
</p>
940 <p>The merge isn't completely clean: the import only affects
941 working copies, so you won't be able to use a URL in the first
942 repository to access modules imported from the second. They
943 remain separate URLs.
</p>
946 <p>See also
<a href=
"links.html#misc_utils">miscellaneous utilities
</a>
947 for helpful tools to select and reorder revisions when merging
948 several repositories, especially the
949 <a href=
"http://www.coelho.net/svn-merge-repos.html">svn-merge-repos.pl
</a>
950 perl script for basic operations and the
951 <a href=
"http://svn.borg.ch/svndumptool/">SvnDumpTool
</a> python classes
952 for advanced reorganisations.
</p>
957 <div class=
"h3" id=
"nfs" title=
"nfs">
958 <h3>Should I store my repository / working copy on a NFS
961 <p>If you are using a repository with the Berkeley DB back end
962 (default for repositories created with Subversion
1.0 and
1.1, not the
963 default thereafter), we recommend
<i>not
</i> storing the repository on
964 a remote filesystem (for example, NFS). While Berkeley DB databases
965 and log files can be stored on remote filesystems, the Berkeley DB
966 shared region files cannot be stored on a remote filesystem, so the
967 repository may be safely accessed by only a single filesystem client,
968 and not all Subversion functionality will be available to even that
971 <p>If you are using the
<a
972 href=
"http://svn.collab.net/repos/svn/trunk/notes/fsfs">FSFS
</a>
973 repository back end, then storing the repository on a modern NFS
974 server (i.e., one that supports locking) should be fine.
</p>
976 <p>Working copies can be stored on NFS (one common scenario is when
977 your home directory is on a NFS server). On Linux NFS servers, due to
978 the volume of renames used internally in Subversion when checking out
979 files, some users have reported that 'subtree checking' should be
980 disabled (it's enabled by default). Please see
<a
981 href=
"http://nfs.sourceforge.net/nfs-howto/server.html" >NFS Howto
982 Server Guide
</a> and
<b>exports(
5)
</b> for more information on how to
983 disable subtree checking.
</p>
985 <p>We've had at least one report of working copies getting wedged
986 after being accessed via SMB. The server in question was running a
987 rather old version of Samba (
2.2.7a). The problem didn't recur with a
988 newer Samba (
3.0.6).
</p>
993 <div class=
"h3" id=
"bdblogs" title=
"bdblogs">
994 <h3>Why is my repository taking up so much disk space?
</h3>
996 <p>The repository stores all your data in a Berkeley DB
"environment"
997 in the repos/db/ subdirectory. The environment contains a collection
998 of tables and bunch of logfiles (log.*). Berkeley DB journals all
999 changes made to the tables, so that the tables can be recovered to a
1000 consistent state in case of interruptions (
<a
1001 href=
"#bdb-recovery">more info
</a>).
</p>
1003 <p>The logfiles will grow forever, eating up disk space, unless you,
1004 (as the repository administrator) do something about it. At any given
1005 moment, Berkeley DB is only using a few logfiles actively (see
<a
1006 href=
"http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=15194"
1007 >this post
</a> and its associated thread); the rest can be safely
1008 deleted. If you keep all the logfiles around forever, then in theory
1009 Berkeley DB can replay every change to your repository from the day it
1010 was born. But in practice, if you're making backups, it's probably
1011 not worth the cost in disk space.
</p>
1013 <p>Use
<code>svnadmin
</code> to see
1014 which log files can be deleted. You may want a cron job to do this.
</p>
1017 $ svnadmin list-unused-dblogs /repos
1018 /repos/db/log
.000003
1019 /repos/db/log
.000004
1022 $ svnadmin list-unused-dblogs /repos | xargs rm
1023 # disk space reclaimed!
1026 <p>You could instead use Berkeley DB's
<code>db_archive
</code> command:
</p>
1029 $ db_archive -a -h /repos/db | xargs rm
1030 # disk space reclaimed!
1033 <p>See also
<code>svnadmin hotcopy
</code> or
<code>hotbackup.py
</code>.
</p>
1035 <p><strong>Note:
</strong> If you use Berkeley DB
4.2, Subversion will
1036 create new repositories with automatic log file removal enabled. You
1037 can change this by passing the
<code>--bdb-log-keep
</code> option to
1038 <code>svnadmin create
</code>. Refer to the section about the
<a
1039 href=
"http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_set_flags.html#DB_LOG_AUTOREMOVE">
1040 <code>DB_LOG_AUTOREMOVE
</code></a> flag in the Berkeley DB manual.
</p>
1045 <div class=
"h3" id=
"reposperms" title=
"reposperms">
1046 <h3>How do I set repository
1047 permissions correctly?
</h3>
1049 <p>Try to have as
<em>few
</em> users access the repository as
1050 possible. For example, run apache or 'svnserve -d' as a specific
1051 user, and make the repository wholly owned by that user. Don't allow
1052 any other users to access the repository via
<tt>file:///
</tt> urls,
1053 and be sure to run 'svnlook' and 'svnadmin' only as the user which
1054 owns the repository.
</p>
1056 <p>If your clients are accessing via
<tt>file:///
</tt> or
1057 <tt>svn+ssh://
</tt>, then there's no way to avoid access by multiple
1058 users. In that case, read
<a
1059 href=
"http://svnbook.red-bean.com/html-chunk/ch06s05.html">the last
1060 section in chapter
6</a>, and pay particular attention to the
1061 "checklist" sidebar at the bottom. It outlines a number of steps to
1062 make this scenario safer.
</p>
1064 <b>Note for SELinux / Fedora Core
3+ / Red Hat Enterprise users:
</b>
1066 <p>In addition to regular Unix permissions, under SELinux every file,
1067 directory, process, etc. has a 'security context'. When a process
1068 attempts to access a file, besides checking the Unix permissions the
1069 system also checks to see if the security context of the process is
1070 compatible with the security context of the file.
</p>
1072 <p>Fedora Core
3, among other systems, comes with SELinux installed by
1073 default, configured so that Apache runs in a fairly restricted
1074 security context. To run Subversion under Apache, you have to set the
1075 security context of the repository to allow Apache access (or turn off
1076 the restrictions on Apache, if you think all this is overkill). The
1077 <tt>chcon
</tt> command is used to set the security context of files
1078 (similarly to how the
<tt>chmod
</tt> sets the traditional Unix
1079 permissions). For example, one user had to issue this command
</p>
1081 <pre> $ chcon -R -h -t httpd_sys_content_t
<i>PATH_TO_REPOSITORY
</i></pre>
1083 <p>to set the security context to be able to successfully
1084 access the repository.
</p>
1090 <div class=
"h3" id=
"readonly" title=
"readonly">
1091 <h3>Why do read-only operations still need repository
1094 <p>Certain client operations are
"read-only", like checkouts and
1095 updates. From an access-control standpoint, Apache treats them as
1096 such. But libsvn_fs (the repository filesystem API) still has to
1097 write temporary data in order to produce tree-deltas. So the process
1098 accessing the repository always requires both read
<em>and
</em> write
1099 access to the Berkeley DB files in order to function.
</p>
1101 <p>In particular, the repository responds to many
"read-only"
1102 operations by comparing two trees. One tree is the usually the HEAD
1103 revision, and the other is often a temporary transaction-tree -- thus
1104 the need for write access.
</p>
1106 <p>This limitation only applies to the Berkeley DB backend; the
<a
1107 href=
"http://svnbook.red-bean.com/svnbook-1.1/ch05.html#svn-ch-5-sect-1.2.A">FSFS
1108 backend
</a> does not exhibit this behaviour.
</p>
1113 <div class=
"h3" id=
"removal" title=
"removal">
1115 How do I completely remove a file from the repository's history?
1118 <p>There are special cases where you might want to destroy all
1119 evidence of a file or commit. (Perhaps somebody accidentally committed
1120 a confidential document.) This isn't so easy, because Subversion is
1121 deliberately designed to never lose information. Revisions are
1122 immutable trees which build upon one another. Removing a revision from
1123 history would cause a domino effect, creating chaos in all subsequent
1124 revisions and possibly invalidating all working copies.
</p>
1126 <p>The project has plans, however, to someday implement an
<b>svnadmin
1127 obliterate
</b> command which would accomplish the task of permanently
1128 deleting information. (See
<a
1129 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=516">issue
1132 <p>In the meantime, your only recourse is to
<b>svnadmin dump
</b> your
1133 repository, then pipe the dumpfile through
<b>svndumpfilter
</b>
1134 (excluding the bad path) into an
<b>svnadmin load
</b> command. See
<a
1135 href=
"http://svnbook.red-bean.com/html-chunk/ch05.html">chapter
5</a>
1136 of the Subversion book for details about this.
</p>
1141 <div class=
"h3" id=
"change-log-msg" title=
"change-log-msg">
1143 How do I change the log message for a revision after it's been committed?
1146 <p>Log messages are kept in the repository as properties attached to each
1147 revision. By default, the log message property (
<em>svn:log
</em>) cannot be
1148 edited once it is committed. That is because changes to
<a
1149 href=
"http://svnbook.red-bean.com/svnbook/ch05.html#svn-ch-5-sect-1.2">revision
1150 properties
</a> (of which
<em>svn:log
</em> is one) cause the property's
1151 previous value to be permanently discarded, and Subversion tries to prevent
1152 you from doing this accidentally. However, there are a couple of ways to get
1153 Subversion to change a revision property.
</p>
1155 <p>The first way is for the repository administrator to enable revision
1156 property modifications. This is done by creating a hook called
1157 "pre-revprop-change" (see
<a
1158 href=
"http://svnbook.red-bean.com/svnbook/ch05s02.html#svn-ch-5-sect-2.1">this
1159 section
</a> in the Subversion book for more details about how to do this).
1160 The
"pre-revprop-change" hook has access to the old log message before it is
1161 changed, so it can preserve it in some way (for example, by sending an email).
1162 Once revision property modifications are enabled, you can change a revision's
1163 log message by passing the --revprop switch to
<b>svn propedit
</b> or
<b>svn
1164 propset
</b>, like either one of these:
</p>
1167 $ svn propedit -r N --revprop svn:log URL
1168 $ svn propset -r N --revprop svn:log
"new log message" URL
1171 <p>where N is the revision number whose log message you wish to change, and
1172 URL is the location of the repository. If you run this command from within a
1173 working copy, you can leave off the URL.
</p>
1175 <p>The second way of changing a log message is to use
<b>svnadmin setlog
</b>.
1176 This must be done by referring to the repository's location on the filesystem.
1177 You cannot modify a remote repository using this command.
</p>
1180 $ svnadmin setlog REPOS_PATH -r N FILE
1183 <p>where REPOS_PATH is the repository location, N is the revision number whose
1184 log message you wish to change, and FILE is a file containing the new log
1185 message. If the
"pre-revprop-change" hook is not in place (or you want to
1186 bypass the hook script for some reason), you can also use the --bypass-hooks
1187 option. However, if you decide to use this option, be very careful. You may
1188 be bypassing such things as email notifications of the change, or backup
1189 systems that keep track of revision properties.
</p>
1194 <div class=
"h3" id=
"patch" title=
"patch">
1195 <h3>How do I submit a patch for Subversion?
</h3>
1197 <p>FIRST, read the
<a href=
"hacking.html">Hacker's Guide to
1200 <p>Once you've digested that, send a mail to the dev list with the
1201 word [PATCH] and a one-line description in the subject, and include
1202 the patch inline in your mail (unless your MUA munges it up
1203 totally). Then a committer will pick it up, apply it (making any
1204 formatting or content changes necessary), and check it in.
</p>
1206 <p>The basic process looks like this:
</p>
1209 $ svn co http://svn.collab.net/repos/svn/trunk subversion
1212 [ make changes to faq.html ]
1214 $ svn diff faq.html
> /tmp/foo
1216 $ Mail -s
"[PATCH] FAQ updates" < /tmp/foo
1219 <p>Of course, the email you send should contain a nice long
1220 explanation about what the patch does, as per the
1221 <a href=
"hacking.html">Hacker's Guide to Subversion
</a>, but you
1222 already know that, since you read and completely understood
1223 it
<em>before
</em> actually hacking the code, right? :)
</p>
1228 <div class=
"h3" id=
"in-place-import" title=
"in-place-import">
1229 <h3>How can I do an in-place 'import'
1230 (i.e. add a tree to Subversion such that the original data becomes
1231 a working copy directly)?
</h3>
1233 <p>Suppose, for example, that you wanted to put some of /etc under
1234 version control inside your repository:
</p>
1237 # svn mkdir file:///root/svn-repository/etc \
1238 -m
"Make a directory in the repository to correspond to /etc"
1240 # svn checkout file:///root/svn-repository/etc .
1241 # svn add apache samba alsa X11
1242 # svn commit -m
"Initial version of my config files"
1245 <p>This takes advantage of a not-immediately-obvious feature of
1246 <tt>svn
checkout
</tt>: you can check out a directory from the repository
1247 directly into an existing directory. Here, we first make a new empty directory
1248 in the repository, and then check it out into
<tt>/etc
</tt>, transforming
1249 <tt>/etc
</tt> into a working copy. Once that is done, you can use normal
1250 <tt>svn
add
</tt> commands to select files and subtrees to add to the
1253 <p>There is an issue filed for enhancing
<tt>svn
import
</tt> to
1254 be able to convert the imported tree to a working copy automatically;
1255 see
<a href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=1328"
1256 >issue
1328</a>.
</p>
1261 <div class=
"h3" id=
"dumpload" title=
"dumpload">
1262 <h3>What is this
"dump/load cycle" people
1263 sometimes talk about when upgrading a Subversion server?
</h3>
1265 <p>Subversion's repository database schema has changed occasionally
1266 during development. Old repositories, created with a pre-
1.0
1267 development version of Subversion, may require the following operation
1268 when upgrading. If a schema change happens between Subversion
1269 releases X and Y, then repository administrators upgrading to Y must
1270 do the following:
</p>
1273 <li>Shut down svnserve, Apache, and anything else that might be
1274 accessing the repository.
1279 <tt>svnadmin
dump
/path/to/repository
> dumpfile.txt
</tt>
1281 using version X of svnadmin.
1286 <tt>mv
/path/to/repository
/path/to/saved-old-repository
</tt>
1290 <li>Now upgrade to Subversion Y (i.e., build and install Y, replacing X).
1294 <b><tt>svnadmin
create
/path/to/repository
</tt></b>, using version
1300 <tt>svnadmin
load
/path/to/repository
< dumpfile.txt
</tt>
1302 again using version Y of svnadmin.
1305 <li>Copy over hook scripts, etc, from the old repository to the new one.
1308 <li>Restart svnserve, Apache, etc.
1313 <a href=
"http://svnbook.red-bean.com/html-chunk/ch05s03.html#svn-ch-5-sect-3.4"
1314 >http://svnbook.red-bean.com/html-chunk/ch05s03.html#svn-ch-
5-sect-
3.4</a>
1315 for more details on dumping and loading.
</p>
1317 <p> <b>Note
</b>: Most upgrades of Subversion do
<i>not
</i> involve a
1318 dump and load. When one is required, the release announcement and the
1319 CHANGES file for the new version will carry prominent notices about
1320 it. If you don't see such a notice, then there has been no schema
1321 change, and no dump/load is necessary.
</p>
1326 <div class=
"h3" id=
"sspi" title=
"sspi">
1327 <h3>How do I allow clients to authenticate against a
1328 Windows domain controller using SSPI authentication?
</h3>
1330 <p><a href=
"http://tortoisesvn.tigris.org">TortoiseSVN
</a> has an excellent
1331 document that describes setting up a Subversion server on Windows. Go to
1332 <a href=
"http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup.html#tsvn-serversetup-apache-5"
1333 >http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup.html#tsvn-serversetup-apache-
5</a>,
1334 to see the section on SSPI authentication.
</p>
1336 <p>An important part of the configuration is the line:
</p>
1341 <p>Without this line, browsers that support SSPI will prompt for the user's
1342 credentials, but clients that do not suppport SSPI such as Subversion
1343 will not prompt. (The current release of Neon - Subversion's HTTP
1344 library - handles only basic authentication.) Because the client never
1345 asks for credentials, any action that requires authentication will fail.
1346 Adding this line tells
<tt>mod_auth_sspi
</tt> to use basic authentication with
1347 the client, but to use the Windows domain controller to authenticate
1348 the credentials.
</p>
1353 <div class=
"h3" id=
"adm-dir" title=
"adm-dir">
1354 <h3>I don't like the
".svn" directory name, and
1355 prefer
"SVN" or something else. How do I change it?
</h3>
1357 <p>We recommend that you live with
".svn" if you possibly can.
1358 However, if you are using ASP.NET under Windows, you might need to set
1359 the environment variable SVN_ASP_DOT_NET_HACK, as
1360 described
<a href=
"#vs-asp-net">here
</a>.
</p>
1362 <p>Or you could use a completely custom name for the administrative
1363 directory. We recommend against this, because your working copy would
1364 probably not work with Subversion clients other than the one you
1365 customized. However, if you absolutely must do this, just change this
1366 line in
<tt>subversion/include/svn_wc.h
</tt> from
</p>
1369 #define SVN_WC_ADM_DIR_NAME
".svn"
1377 #define SVN_WC_ADM_DIR_NAME
"SVN"
1381 then recompile your client.
1387 <div class=
"h3" id=
"case-change" title=
"case-change">
1388 <h3>How do I change the case of a filename?
</h3>
1390 <p>This problem comes up in two situations. If you're adding files on
1391 an operating system with a case-insensitive filesystem, such as
1392 Windows, you might find you accidentally add a file with the wrong
1393 case in the filename. Alternatively, you may just decide to change
1394 the case of an existing file in the repository.
</p>
1396 <p>If you're working in a case-sensitive file system, this is no
1397 problem at all. Just move the file to the new name, e.g.,
</p>
1400 svn
mv
file.java
File.java
1403 <p>But this won't work in a case-insensitive operating system like
1404 Windows. In Windows you can accomplish this by copying the file
1405 somewhere temporary, deleting the file from Subversion, then adding
1406 the copy with the correct case. Or a better way is to perform a move
1407 operation with Subversion URLs. Using URLs is recommended, because it
1408 will preserve history for the file, and will take effect
1411 <p>Both ways will leave Windows working copies with problems, however,
1412 because Windows can still get confused when trying to update the
1413 conflicting filenames. (You'll get a message like
<tt>svn: Failed to
1414 add file 'File.java': object of the same name already
1415 exists
</tt>). One way of fixing the problem is to delete your working
1416 copy and check out again. If you do not want to do this, you must
1417 perform a two step update.
</p>
1419 <p>For each file with the wrong case, the following command will change
1423 svn mv svn://svnserver/path/to/file.java svn://svnserver/path/to/File.java
1426 <p>To update the working copy, change to the relevant directory and do:
</p>
1429 svn update file.java
1433 <p>The first update will remove
<tt>file.java
</tt> from your working
1434 copy, the second update will add
<tt>File.java
</tt>, leaving you with
1435 a correct working copy. Or if you had a lot of problematic files, you
1436 can update the working copy this way:
</p>
1443 <p>As you can see, adding a file with the wrong case is tricky to fix on
1444 an operating system that has a case insensitive filesystem. Do try to
1445 get it right when you add the file the first time! To prevent the
1446 problem from occurring in the first place, you can create a pre-commit hook that
1447 calls the file
<tt>check-case-insensitive.pl
</tt>. That file lives
1449 source tarball, in the directory
<tt>contrib/hook-scripts
</tt>.
</p>
1454 <div class=
"h3" id=
"merge-using-tags" title=
"merge-using-tags">
1455 <h3>I can't use tags to merge changes from a
1456 branch into the trunk like I used to with CVS, can I?
</h3>
1458 <p>As shown below it is possible to merge from a branch to the trunk
1459 without remembering one revision number. Or vice versa (not shown in the
1462 <p>The example below presumes an existing repository in
<tt>/home/repos
</tt>
1463 in which you want to start a branch named
<tt>bar
</tt> containing a file
1464 named
<tt>foo
</tt> you are going to edit.
</p>
1466 <p>For the purpose of tracing branch merges, this repository has set up
1467 <tt>tags/branch_traces/
</tt> to keep tags.
</p>
1469 <pre># setup branch and tags
1470 $ svn copy file:///home/repos/trunk \
1471 file:///home/repos/branches/bar_branch \
1472 -m
"start of bar branch"
1473 $ svn copy file:///home/repos/branches/bar_branch \
1474 file:///home/repos/tags/branch_traces/bar_last_merge \
1477 # checkout branch working copy
1478 $ svn checkout file:///home/repos/branches/bar_branch wc
1481 # edit foo.txt file and commit
1482 $ echo
"some text" >>foo.txt
1483 $ svn commit -m
"edited foo"
1485 # switch to trunk and merge changes from branch
1486 $ svn switch file:///home/repos/trunk
1487 $ svn merge file:///home/repos/tags/branch_traces/bar_last_merge \
1488 file:///home/repos/branches/bar_branch
1490 # Now check the file content of 'foo.txt', it should contain the changes.
1493 $ svn commit -m
"Merge change X from bar_branch."
1495 # finally, update the trace branch to reflect the new state of things
1496 $ svn delete -m
"Remove old trace branch in preparation for refresh." \
1497 file:///home/repos/tags/branch_traces/bar_last_merge
1498 $ svn copy file:///home/repos/branches/bar_branch \
1499 file:///home/repos/tags/branch_traces/bar_last_merge \
1500 -m
"Reflect merge of change X."
1506 <div class=
"h3" id=
"version-value-in-source" title=
"version-value-in-source">
1507 <h3>Why doesn't the $Revision$
1508 keyword do what I want? It expands to the file's last-changed revision,
1509 but I want something that will expand to the file's current revision.
</h3>
1512 Subversion increments the revision number of the repository as a
1513 whole, so it can't expand any keyword to be that number - it would
1514 have to search and possibly modify every file in your working copy on
1515 every update and commit.
1519 The information you want (the revision of your working copy) is
1520 available from the command
<tt>svnversion
</tt>; it gives you
1521 information on the revision level of a working copy given a path (see
1522 <tt>svnversion --help
</tt> for details).
1526 You can incorporate it into your build or release process to get the
1527 information you need into the source itself. For example, in a build
1528 environment based on
<tt>GNU
make
</tt>, add
<a
1529 href=
"http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=112564"
1530 >something like this
</a> to your
<tt>Makefile
</tt>:
1535 ## To use this, in yourfile.c do something like this:
1536 ## printf(
"this program was compiled from SVN revision %s\n",SVN_REV);
1539 SVNDEF := -D'
SVN_REV=
"$(shell svnversion -n .)"'
1540 CFLAGS := $(SVNDEF) ... continue with your other flags ...
1544 (Note that this will not work on non-GNU versions of
<tt>make
</tt>.
1545 Don't use it if your build process needs to be portable.)
</p>
1547 <p>Or try this recipe:
</p>
1551 ## on every build, record the working copy revision string
1553 svn_version.c: FORCE
1554 echo -n 'const char* svn_version(void) { const char* SVN_Version =
"' \
1556 svnversion -n . >> svn_version.c
1557 echo '"; return SVN_Version; }'
>> svn_version.c
1560 ## Then any executable that links in
<tt>svn_version.o
</tt> will be able
1561 ## to call the function
<tt>svn_version()
</tt> to get a string that
1562 ## describes exactly what revision was built.
1567 Windows users may want to use
<tt>SubWCRev.exe
</tt>, available from
1569 href='http://tortoisesvn.net/downloads'
>TortoiseSVN
1570 download page
</a>; it replaces all
<tt>$WCREV$
</tt> tags in a given
1571 file with the current working copy revision.
1577 <div class=
"h3" id=
"log-in-source" title=
"log-in-source">
1578 <h3>Does Subversion have a keyword which
1579 behaves like $Log$ in CVS?
</h3>
1581 <p>No. There is no equivalent for the $Log$ keyword in CVS. If you
1582 want to retrieve a log for a specific file, you can run
1583 'svn log your-file-name' or 'svn log url-to-your-file'.
1584 From the mailing list some explanations why $Log$ is bad:
</p>
1586 <pre>"$Log$ is a total horror the moment you start merging changes
1587 between branches. You're practically guaranteed to get conflicts there,
1588 which -- because of the nature of this keyword -- simply cannot be
1589 resolved automatically."</pre>
1593 <pre>Subversion log messages are mutable, they can be changed by setting
1594 the svn:log revision property. So the expansion of $Log:$ in any
1595 given file could be out of date. Update may well need to retrieve the
1596 appropriate log message for each occurrence of the $Log:$ keyword,
1597 even if the file that contained it was not otherwise updated.
</pre>
1599 <p><i>I don't care about that. I want to use it anyway.
1600 Will you implement it?
</i></p>
1602 <p>No. There are no plans to implement it ourselves or accept patches
1603 which implement this feature. If you want to distribute your files
1604 with some kind of changelog included, you might be able to work
1605 around this limitation in your build system.
</p>
1611 <div class=
"h3" id=
"ignore-commit" title=
"ignore-commit">
1612 <h3>I have a file in my project that every
1613 developer must change, but I don't want those local mods to ever be
1614 committed. How can I make 'svn commit' ignore the file?
</h3>
1616 <p>The answer is: don't put that file under version control. Instead,
1617 put a
<em>template
</em> of the file under version control, something
1618 like
"file.tmpl".
</p>
1620 <p>Then, after the initial 'svn checkout', have your users (or your
1621 build system) do a normal OS copy of the template to the proper
1622 filename, and have users customize the copy. The file is unversioned,
1623 so it will never be committed. And if you wish, you can add the file
1624 to its parent directory's svn:ignore property, so it doesn't show up
1625 as '?' in the 'svn status' command.
</p>
1630 <div class=
"h3" id=
"ssh-auth-cache" title=
"ssh-auth-cache">
1631 <h3>When I access a repository using
1632 svn+ssh, my password is not cached in ~/.subversion/auth/. How do
1633 I avoid having to type it so often?
</h3>
1635 <p>ssh has its own passphrases and its own authentication-caching
1636 scheme. Its auth caching is external to Subversion, and must be set
1637 up independently of Subversion.
</p>
1639 <p>OpenSSH includes
<b><tt>ssh-keygen
</tt></b> to create the keys,
1640 <b><tt>ssh-agent
</tt></b> to cache passphrases, and
1641 <b><tt>ssh-add
</tt></b> to add passphrases to the agent's cache. A
1642 popular script to simplify usage of
<tt>ssh-agent
</tt> is
1643 <b><tt>keychain
</tt></b>. On Windows,
<b><tt>PuTTY
</tt></b> is a
1644 popular alternative ssh client; see
<b><tt>PuTTYgen
</tt></b> to import
1645 OpenSSH keys and
<b><tt>pageant
</tt></b> to cache passphrases.
</p>
1647 <p>Setting up
<tt>ssh-agent
</tt> is outside the scope of this
1649 href=
"http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=%22ssh-agent%22"
1650 >Google search for
"ssh-agent"</a> will quickly get you answers. Or
1651 if you're
<i>really
</i> impatient, try one of these:
</p>
1654 <a href=
"http://mah.everybody.org/docs/ssh"
1655 >http://mah.everybody.org/docs/ssh
</a>
1656 <a href=
"http://kimmo.suominen.com/docs/ssh/"
1657 >http://kimmo.suominen.com/docs/ssh/
</a>
1663 <div class=
"h3" id=
"ssh-svnserve-location" title=
"ssh-svnserve-location">
1665 <tt>svnserve
</tt> binary is in a directory that isn't on my
1666 users' default
<tt>PATH
</tt>s, they use svn+ssh, and I can't figure
1667 out how to modify their
<tt>PATH
</tt> so that they can run
<tt>svnserve
</tt>.
</h3>
1669 <p>Note: this all assumes you're using OpenSSH. There are other
1670 ssh implementations out there, and presumably they will allow
1671 you to do something similar, but we don't yet know the details.
</p>
1673 <p>You've tried fiddling with their various login files, like
1674 <tt>.bash_profile
</tt>, and nothing works! That's because ssh
1675 ignores those files when the Subversion client invokes it.
1676 But there's no need to modify
<tt>PATH
</tt>; instead, you can
1677 directly give ssh the full name of the
<tt>svnserve
</tt> command.
1678 Here's how to do it:
</p>
1680 <p>For each user who needs svn+ssh access, generate a new ssh
1681 public-key pair which they will use
<em>only
</em> for
1682 Subversion
—not for logging in normally. Have them give
1683 the keypair a distinctive name, like
1684 <tt>~/.ssh/id_dsa.subversion
</tt>. Add the public part of the
1685 key to their
<tt>~/.ssh/authorized_keys
</tt> file on the
1686 server machine, after first inserting a bit of magic at the
1687 beginning of the line before the word
<tt>ssh-rsa
</tt> or
1688 <tt>ssh-dss
</tt>, like this:
</p>
1690 <table border=
"1" cellspacing=
"2" cellpadding=
"2">
1691 <tr><th>before
</th></tr>
1692 <tr><td><tt>ssh-dss
AAAAB3Nblahblahblahblah
</tt></td></tr>
1693 <tr><th>after
</th></tr>
1695 command=
"/opt/subversion/bin/svnserve -t" ssh-dss
AAAAB3Nblahblahblahblah
1699 <p>Obviously, replace
<tt>/opt/subversion/bin/svnserve
</tt> with
1700 whatever is appropriate for your system. You also might want to
1701 specify the full path to the Subversion repository in the
1702 command (by using the
<tt>-r
</tt> option), to save your users
1705 <p>The
<tt>command=
</tt> magic causes sshd on the remote machine
1706 to invoke
<tt>svnserve
</tt>, even if your user tries to run
1707 some other command. See the sshd(
8) man page (section
1708 <tt>AUTHORIZED_KEYS FILE FORMAT
</tt>) for details.
</p>
1710 <p>Now when your users run the Subversion client, make sure they
1711 have an
<tt>SVN_SSH
</tt> environment variable that
"points to"
1712 the private half of their keypair, by doing something like this
1713 (for the Bourne Again shell):
</p>
1716 SVN_SSH=
"ssh -i $HOME/.ssh/id_dsa.subversion"
1721 href=
"http://svn.collab.net/repos/svn/trunk/notes/ssh-tricks">This
1722 file
</a> discusses this topic in more detail.
</p>
1727 <div class=
"h3" id=
"ssh-authorized-keys-trick" title=
"ssh-authorized-keys-trick">
1728 <h3>I want to allow access via svn+ssh://, but am paranoid. I hate the
1729 idea of giving each user a login; I would then have to worry about
1730 what they are, and are not, allowed to access on my machine.
</h3>
1731 <p>See the section about hacking
1732 the
<tt>~/.ssh/authorized_keys
</tt> file in the answer
1733 to
<a href=
"#ssh-svnserve-location">this other question
</a>; ignore the stuff
1734 about getting
<tt>svnserve
</tt> on your PATH.
</p>
1738 <div class=
"h3" id=
"auto-props" title=
"auto-props">
1739 <h3>How can I set certain properties on
1740 everything in the repository? Also, how can I make sure that every
1741 new file coming into the repository has these properties?
</h3>
1743 <p>Subversion will not change a file's contents by default; you have
1744 to deliberately set the
<tt>svn:eol-style
</tt> or
1745 <tt>svn:keywords
</tt> property on a file for that to happen. That
1746 makes Subversion a lot safer than CVS's default behavior, but with
1747 that safety comes some inconvenience.
</p>
1749 <p>Answering the first question: to set properties on all files
1750 already in the repository, you'll need to do it the hard way. All you
1751 can do is run
<tt>svn propset
</tt> on every file (in a working copy),
1752 and then
<tt>svn commit
</tt>. Scripting can probably help you with
1755 <p>But what about future files? Unfortunately, there's no server
1756 mechanism to automatically set properties on files being committed.
1757 This means that all of your users need to remember to set certain
1758 properties whenever they
<tt>svn add
</tt> a file. Fortunately,
1759 there's a client-side tool to help with this. Read about the
<a
1760 href=
"http://svnbook.red-bean.com/svnbook-1.1/ch07s02.html#svn-ch-7-sect-2.4">
1761 auto-props
</a> feature in the book. You need to make sure all your
1762 users configure their clients' auto-props settings appropriately.
</p>
1764 <p>You could write a pre-commit hook script to reject any commit which
1765 forgets to add properties to new files (see
<a
1766 href=
"http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/check-mime-type.pl"
1767 >http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/check-mime-type.pl
</a>
1768 for example). However, this approach may be overkill. If somebody
1769 forgets to set
<tt>svn:eol-style
</tt>, for example, it will be noticed
1770 the minute somebody else opens the file on a different OS. Once
1771 noticed, it's easy to fix: just set the property and commit.
</p>
1773 <p>Note: many users have asked for a feature whereby the server
1774 automatically
"broadcasts" run-time settings to clients, such as
1775 auto-props settings. There's already a feature request filed for this
1777 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=1974">issue
1778 1974</a>), though this feature is still being debated by developers,
1779 and isn't being worked on yet.
</p>
1784 <div class=
"h3" id=
"svn-editor" title=
"auto-props">
1785 <h3>How do I deal with spaces in the editor path?
Also, how can
1786 I define command line options for the editor?
</h3>
1788 <p>The Subversion command line client will invoke the editor defined
1789 in the environment variable SVN_EDITOR.
This environment variable
1790 is passed directly to the operating system along with the name of a
1791 temporary file used to enter/edit the log message.
</p>
1793 <p>Due to the fact that the SVN_EDITOR string is passed as-is to the
1794 system's command shell, spaces in the editor name, or in the path name
1795 to the editor, will not work unless the editor name is in quotes.
</p>
1797 <p>For example, on Windows if your editor is in
1798 <code>C:\Program
Files\Posix
Tools\bin\vi
</code> you would
1799 want to set the variable as follows:
1802 set
SVN_EDITOR=
"C:\Program Files\Posix Tools\bin\vi"
1805 <p>Note that there is no need to escape the quotes in the Windows
1806 shell as they are not part of the syntax for the
<code>set
</code>
1810 <p>On UNIX systems you would need to follow your shell's specific
1811 methods for setting the variable.
For example, in a bash shell,
1812 the following should work:
1815 SVN_EDITOR='
"/usr/local/more editors/bin/xemacs"'
1819 <p>In case a command line option would be needed for the invocation
1820 of the editor, just add that after the editor name in the SVN_EDITOR
1821 environment variable just like you would us on the command line.
1822 For example, if the options
<code>-nx -r
</code> would be wanted for
1823 the above editors, the following will provide those options:
1828 set
SVN_EDITOR=
"C:\Program Files\Posix Tools\bin\vi" -nx -r
1831 <p>For UNIX/bash:
</p>
1833 SVN_EDITOR='
"/usr/local/more editors/bin/xemacs" -nx -r'
1837 <p>Note that SVN_EDITOR is the Subversion specific environment variable
1838 setting for the editor selection.
Subversion also supports
1839 using the more generic EDITOR variable but if you need special behaviors
1840 with Subversion it is best to use the SVN_EDITOR variable.
1846 <div class=
"h3" id=
"divining-bdb-version" title=
"divining-bdb-version">
1847 <h3>How do I determine which version of
1848 Berkeley DB a repository is using?
</h3>
1850 <p>If it's a live repository, then the easy answer is
"Whatever
1851 version of Berkeley DB you have installed". If, however, it is a
1852 repository from a backup, or some unknown source, and you have no idea
1853 which version of Berkeley DB it was made with, here's how you find
1856 <p>Run some command to view the two
4-byte integers at offsets
12 and
1857 16 (decimal) in the highest-numbered db/log.* file in the repository.
1858 Here is an example using GNU od:
"<tt>od -j12 -N8 -tx4
1859 log.<i><number></i></tt>". Here is an example using Mac OS X
1860 hexdump:
"<tt>hexdump -s12 -n8 -x log.<i><number></i></tt>".
1861 The first integer should be the magic number
0x00040988, which
1862 identifies the file as a Berkeley DB logfile. The second number is
1863 the log format version
1864 - match it to a Berkeley DB version using the table below:
</p>
1866 <table border=
"1" cellspacing=
"2" cellpadding=
"2">
1867 <tr><th>Log format version
</th><th>Berkeley DB version
</th></tr>
1868 <tr><td>5 (
0x00000005)
</td><td>4.0</td></tr>
1869 <tr><td>7 (
0x00000007)
</td><td>4.1</td></tr>
1870 <tr><td>8 (
0x00000008)
</td><td>4.2</td></tr>
1871 <tr><td>10 (
0x0000000a)
</td><td>4.3</td></tr>
1872 <tr><td>11 (
0x0000000b)
</td><td>4.4</td></tr>
1873 <tr><td>12 (
0x0000000c)
</td><td>4.5</td></tr>
1874 <tr><td>13 (
0x0000000d)
</td><td>4.6</td></tr>
1880 <div class=
"h3" id=
"website-auto-update" title=
"website-auto-update">
1881 <h3>I'm managing a website in my
1882 repository. How can I make the live site automatically update after
1885 <p>This is done all the time, and is easily accomplished by adding a
1886 post-commit hook script to your repository. Read about hook scripts
1888 href=
"http://svnbook.red-bean.com/en/1.1/ch05s02.html#svn-ch-5-sect-2.1">Chapter
1889 5</a> of the book. The basic idea is to make the
"live site" just an
1890 ordinary working copy, and then have your post-commit hook script run
1891 'svn update' on it.
</p>
1893 <p>In practice, there are a couple of things to watch out for. The
1894 server program performing the commit (svnserve or apache) is the same
1895 program that will be running the post-commit hook script. That means
1896 that this program must have proper permissions to update the working
1897 copy. In other words, the working copy must be owned by the same user
1898 that svnserve or apache runs as -- or at least the working copy must
1899 have appropriate permissions set.
</p>
1901 <p>If the server needs to update a working copy that it doesn't own
1902 (for example, user joe's ~/public_html/ area), one technique is create
1903 a +s binary program to run the update, since Unix won't allow scripts
1904 to run +s. Compile a tiny C program:
</p>
1907 #include
<stddef.h
>
1908 #include
<stdlib.h
>
1909 #include
<unistd.h
>
1912 execl(
"/usr/local/bin/svn",
"svn",
"update",
"/home/joe/public_html/",
1913 (const char *) NULL);
1914 return(EXIT_FAILURE);
1918 <p>... and then
<tt>chmod +s
</tt> the binary, and make sure it's owned
1919 by user 'joe'. Then in the post-commit hook, add a line to run the
1922 <p>If you have problems getting the hook to work, see
<a
1923 href=
"#hook-debugging">"Why aren't my repository hooks
1926 <p>Also, you'll probably want to prevent apache from exporting the
1927 .svn/ directories in the live working copy. Add this to your
1928 <tt>httpd.conf
</tt>:
</p>
1931 # Disallow browsing of Subversion working copy administrative dirs.
1932 <DirectoryMatch
"^/.*/\.svn/">
1935 </DirectoryMatch
>
1941 <div class=
"h3" id=
"single-file-checkout" title=
"single-file-checkout">
1942 <h3>How do I check out a single file?
</h3>
1944 <p>Subversion does not support checkout of a single file, it only
1945 supports checkout of directory structures.
</p>
1947 <p>However, you can use 'svn export' to export a single file. This will
1948 retrieve the file's contents, it just won't create a versioned working
1954 <div class=
"h3" id=
"wc-change-detection" title=
"wc-change-detection">
1955 <h3>How do I detect adds, deletes,
1956 copies and renames in a working copy after they've already
1959 <p>You don't. It's a bad idea to try.
</p>
1961 <p>The basic design of the working copy has two rules: (
1) edit files
1962 as you please, and (
2) use a Subversion client to make any
1963 tree-changes (add, delete, move, copy). If these rules are followed,
1964 the client can sucessfully manage the working copy. If renames or
1965 other rearrangements happen outside of Subversion, then the UI has
1966 been violated and the working copy might be broken. The client cannot
1967 guess what happened.
</p>
1969 <p>People sometimes run into this problem because they want to make
1970 version control
"transparent". They trick users into using a working
1971 copy, then have a script run later that tries to guess what happened
1972 and run appropriate client commands. Unfortunately, this technique
1973 only goes a short distance. 'svn status' will show missing items and
1974 unversioned items, which the script can then automatically 'svn rm' or
1975 'svn add'. But if a move or copy has happened, you're out of luck.
1976 Even if the script has a foolproof way of detecting these things, 'svn
1977 mv' and 'svn cp' can't operate after the action has already
1980 <p>In summary: a working copy is wholly under Subversion's control,
1981 and Subversion wasn't designed to be transparent. If you're looking
1982 for transparency, try setting up an apache server and using the
1983 "SVNAutoversioning" feature described in appendix C of the book. This
1984 will allow users to mount the repository as a network disk, and any
1985 changes made to the volume cause automatic commits on the server.
</p>
1990 <div class=
"h3" id=
"svnserve-win-service" title=
"svnserve-win-service">
1991 <h3>How do I run svnserve as a service
1994 <p>For versions
1.4.0 and later, you can find
1996 href=
"http://svn.collab.net/repos/svn/trunk/notes/windows-service.txt">here
</a>.
</p>
1998 <p>In versions before
1.4.0, the
<tt>svnserve
</tt> binary itself could
1999 not be installed as a Windows service, but there are a number of
2000 “service wrappers
” that can do the job; for example:
</p>
2003 <li><a href=
"http://www.clanlib.org/~mbn/svnservice/">SVNService
</a>
2004 is a free tool written by Magnus Norddahl
</li>
2005 <li><a href=
"http://support.microsoft.com/kb/q137890/">SrvAny
</a>
2006 is avaliable free of charge from Microsoft
</li>
2009 <p>There is a bit more about running
<tt>svnserve
</tt> as a service in
2011 href=
"http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup-svnserve.html">the
2012 TortoiseSVN manual
</a>.
</p>
2017 <div class=
"h3" id=
"bdb-fsfs-convert" title=
"bdb-fsfs-convert">
2018 <h3>How do I convert my repository from using BDB
2019 to FSFS or from FSFS to BDB?
</h3>
2021 <p>There are three steps:
</p>
2024 <li>A
<a href=
"#dumpload">dump/load
</a> from the old format to the new
2026 <li>Copy the hook scripts.
</li>
2027 <li>Copy the configuration files.
</li>
2030 <p>Say you have a repository
<tt>/svn/myrepos
</tt> which is using the BDB
2031 backend and you would like to switch to using the FSFS backend:
</p>
2034 <li>Close down your server so that the data cannot change during this
2036 <li>Make a new repository specifying the fsfs backend (it is the default
2037 from
1.2 onwards), e.g.,
<tt>svnadmin create /svn/myreposfsfs --fs-type
2039 <li>Pipe the output of a dump from
<tt>/svn/myrepos
</tt> to the input of a
2040 load into
<tt>/svn/myreposfsfs
</tt>, e.g.,
<tt>svnadmin dump /svn/myrepos
2041 -q | svnadmin load /svn/myreposfsfs
</tt>. Windows users should dump
2042 to a file and load from that file in two separate steps.
</li>
2043 <li>Copy any hook scripts which are active in
<tt>/svn/myrepos/hooks
</tt>
2044 into
<tt>/svn/myreposfsfs/hooks
</tt>. Don't mindlessly copy everything, the
2045 templates generated by Subversion may have changed.
</li>
2046 <li>Compare the template scripts which the
<tt>svnadmin create
</tt> command
2047 put in
<tt>/svn/myreposfsfs/hooks
</tt> with those in
2048 <tt>/svn/myrepos/hooks
</tt> and incorporate any changes which you would like
2049 into your active hook scripts.
</li>
2050 <li>Copy configuration files from
<tt>/svn/myrepos/conf
</tt>
2051 into
<tt>/svn/myreposfsfs/conf
</tt> (and don't forget a password
2052 file, if you use one). Or you might instead want to merge
2053 the
<em>changes
</em> that you made to your configuration files into
2054 the new default ones.
</li>
2055 <li>Rename
<tt>/svn/myrepos
</tt> to
<tt>/svn/myreposbdb
</tt> and then
2056 <tt>/svn/myreposfsfs
</tt> to
<tt>/svn/myrepos
</tt> ensuring that the
2057 file permissions are the same as those that the BDB version had.
</li>
2058 <li>Restart the server.
</li>
2061 <p>Once you are happy that all is well with your new repository delete the old
2064 <p>To do the reverse and migrate from FSFS to BDB change the
<tt>svnadmin
2065 create
</tt> command to specify BDB.
</p>
2069 <div class=
"h3" id=
"binary-files" title=
"binary-files">
2070 <h3>How does Subversion handle binary files?
</h3>
2072 <p>When you first add or import a file into Subversion, the file is
2073 examined to determine if it is a binary file. Currently, Subversion
2074 just looks at the first
1024 bytes of the file; if any of the bytes
2075 are zero, or if more than
15% are not ASCII printing characters, then
2076 Subversion calls the file binary. This heuristic might be improved in
2077 the future, however.
</p>
2079 <p>If Subversion determines that the file is binary, the file receives
2080 an svn:mime-type property set to
"application/octet-stream". (You can
2081 always override this by using the
<a
2082 href=
"http://svnbook.red-bean.com/svnbook-1.1/ch07s02.html#svn-ch-7-sect-2.4"
2083 >auto-props feature
</a> or by setting the property manually with
2084 <tt>svn propset
</tt>.)
</p>
2086 <p>Subversion treats the following files as text:
</p>
2089 <li>Files with no svn:mime-type
</li>
2090 <li>Files with a svn:mime-type starting
"text/"</li>
2091 <li>Files with a svn:mime-type equal to
"image/x-xbitmap"</li>
2092 <li>Files with a svn:mime-type equal to
"image/x-xpixmap"</li>
2095 <p>All other files are treated as binary, meaning that Subversion will:
</p>
2098 <li>Not attempt to automatically merge received changes with local
2099 changes during
<tt>svn update
</tt> or
<tt>svn merge
</tt></li>
2100 <li>Not show the differences as part of
<tt>svn diff
</tt></li>
2101 <li>Not show line-by-line attribution for
<tt>svn blame
</tt></li>
2104 <p>In all other respects, Subversion treats binary files the same as
2105 text files, e.g. if you set the svn:keywords or svn:eol-style
2106 properties, Subversion will perform keyword substitution or newline
2107 conversion on binary files.
</p>
2109 <p>Note that whether or not a file is binary does not affect the
2110 amount of repository space used to store changes to that file, nor
2111 does it affect the amount of traffic between client and server. For
2112 storage and transmission purposes, Subversion uses a diffing method
2113 that works equally well on binary and text files; this is completely
2114 unrelated to the diffing method used by the 'svn
diff'
2119 <div class=
"h3" id=
"terse-diff" title=
"terse-diff">
2120 <h3>How can I make
<tt>svn diff
</tt> show me just the names of the
2121 changed files, not their contents?
</h3>
2123 <tt>svn diff
</tt> doesn't have an option to do this, but
2127 If you only are interested in the diffs between, say, revision
10
2128 and the revision just before it,
<pre>svn log -vq -r10
</pre> does
2129 exactly what you want;
2132 otherwise, if you're using Unix, this works for any range of revisions:
2134 svn log -vq -r123:
456 | egrep '^ {
3}[ADMR] ' | cut -c6- | sort | uniq
</pre> </li>
2136 Version
1.4 of the
<tt>svn diff
</tt> command will have a
"--summarize"
2140 <div class=
"h3" id=
"sorry-no-globbing" title=
"sorry-no-globbing">
2141 <h3>How can I use wildcards or globbing to move many files at once?
</h3>
2143 You want to do something like
2146 svn mv svn://server/trunk/stuff/* svn://server/trunk/some-other-dir
2152 svn: Path 'svn://server/trunk/stuff/*' does not exist in revision
123
2155 ... or some other inscrutable error message.
2159 The short, unhappy answer is: there's no built-in way to do this; many
2160 commands, like
<tt>mv
</tt>, refuse to take an arbitrary number of
2161 arguments ... and in any case, Subversion doesn't expand wildcards like
2162 "*" the way the shell does.
2166 If you happen to have a working copy that contains all the source
2167 files as well as the destination directory, then you can exploit your
2168 shell's wildcard feature to do the move, like this (for Bash):
2171 for i in stuff/*; do svn mv $i some-other-dir; done
2172 svn ci -m
"moved all the stuff into some other dir"
2176 In any case, you can always accumulate a list of the names of the
2177 source files, and then run
"svn mv" on each item in that list, like
2181 s=svn://server/trunk/stuff/
2184 do svn mv
"$s/$f" svn://server/trunk/some-other-dir -m
"Moved just one file"
2188 Note, however, that this will generate one commit per source file;
2189 that's in contrast to the above method (using a working copy) which
2190 generates just one commit total.
2194 There is a program called
"svnmucc" or
"mucc" depending upon which
2195 version of Subversion you have, whose source is distributed with
2196 Subversion (in ...
<tt>/contrib/client-side/mucc/mucc.c
</tt> for
2197 Subversion
1.4 or earlier, in
2198 ...
<tt>/contrib/client-side/svnmucc/svnmucc.c
</tt> for Subversion
1.5
2199 or later), that appears to solve this problem for you.
2203 Rumor has it that with release
1.5, Subversion will in fact allow you
2204 to
"cp" and
"mv" multiple files at once.
2208 <div class=
"h3" id=
"vendor-branch" title=
"vendor-branch">
2209 <h3>How can I maintain a modified version (a
"vendor branch") of
2210 third-party software using Subversion?
</h3>
2212 <p>People frequently want to use Subversion to track their local
2213 changes to third-party code, even across upgrades from the
2214 third-party
— that is, they want to maintain their own
2215 divergent branch, while still incorporating new releases from the
2216 upstream source. This is commonly called a
<em>vendor branch
</em>
2217 (the term long predates Subversion), and the techniques for
2218 maintaining one in Subversion are
<a
2219 href=
"http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.advanced.vendorbr"
2220 >described here
</a>.
</p>
2222 <p>If the vendor code is hosted in a remote Subversion repository,
2223 then you can use
<a href=
"http://piston.rubyforge.org/">Piston
</a> to
2224 manage your copy of the vendor's code.
</p>
2226 <p>As a last resort, if using
<tt>svn_load_dirs.pl
</tt> is taking too
2227 much time or you're looking for the lazy solution, see also Jon
2228 Stevens' step-by-step explanation at
<a
2229 href=
"http://lookfirst.com/2007/11/subversion-vendor-branches-howto.html"
2230 >Subversion Vendor Branches Howto
</a>. This solution does not make
2231 use of the space saving features in the Subversion backend when you
2232 copy new code over old code; in this solution, each import of a vendor
2233 code gets an entire new copy and there is no space savings for
2234 identical files.
</p>
2240 <div class=
"h2" id=
"troubleshooting" title=
"troubleshooting">
2241 <h2>Troubleshooting:
</h2>
2245 <div id=
"permissions"></div>
2246 <div class=
"h3" id=
"stuck-bdb-repos" title=
"stuck-bdb-repos">
2247 <h3>My repository seems to get stuck all the
2248 time, giving me errors about needing recovery (DB_RUNRECOVERY). What
2249 could be the cause?
</h3>
2251 <p>The Berkeley DB database in your repository is sensitive to
2252 interruptions. If a process accessing the database exits without
2253 "cleanly" closing the environment, then the database is left in an
2254 inconsistent state. Common causes of this include:
</p>
2257 <li>the process exiting when it hits a permission problem
</li>
2258 <li>the process crashing/segfaulting
</li>
2259 <li>the process being forcibly killed
</li>
2260 <li>running out of disk space
</li>
2263 <p>For most of these cases, you should run
"svnadmin recover", which
2264 rewinds the repository back to a consistent state; see
<a
2265 href=
"#bdb-recovery">this question
</a> for details. Note that running
2266 out of disk space, combined with frequent checkouts or updates, can
2267 cause the repository to crash in a way where recovery is not possible
2268 (so keep backups).
</p>
2270 <p>Segfaults, forced killings, and running out of disk space are
2271 pretty rare. Permission problems are far more common: one process
2272 accesses the repository and accidentally changes ownership or
2273 permissions, then another process tries to access and chokes on the
2276 <p>The best way to prevent this is to get your repository permissions
2277 and ownership set up correctly. See
<a href=
"#reposperms">here
</a>
2278 for our recommendations.
</p>
2283 <div id=
"wedged-repos"></div>
2284 <div class=
"h3" id=
"bdb-recovery" title=
"bdb-recovery">
2285 <h3>Every time I try to access my repository, the
2286 process just hangs. Is my repository corrupt?
</h3>
2289 Your repository is not corrupt, nor is your data lost. If your process
2290 accesses the repository directly (mod_dav_svn, svnlook, svnadmin, or
2291 if you access a `file://' URL), then it's using Berkeley DB to access
2292 your data. Berkeley DB is a journaling system, meaning that it logs
2293 everything it is about to do before it does so. If your process is
2294 interrupted (Control-C, or segfault), then a lockfile is left behind,
2295 along with a logfile describing unfinished business. Any other
2296 process that attempts to access the database will just hang, waiting
2297 for the lockfile to disappear. To awaken your repository, you need to
2298 ask Berkeley DB to either finish the work, or rewind the database to a
2299 previous state that is known to be consistent.
</p>
2301 <p><b><span style=
"color: red">WARNING:
</span> you can seriously corrupt
2302 your repository if you run recover and another process accesses the
2305 <p>Make absolutely sure you disable all access to the repository before
2306 doing this (by shutting down Apache, removing executable permissions from
2307 'svn'). Make sure you run this command as the user that owns and manages
2308 the database, and not as root, else it will leave root-owned files in the
2309 db directory which cannot be opened by the non-root user that manages the
2310 database, which is typically either you or your Apache process. Also be
2311 sure to have the correct umask set when you run recover, since failing to
2312 do so will lock out users that are in the group allowed to access the
2319 svnadmin recover /path/to/repos
2322 <p>Once the command has completed, check the permissions in the
2323 <code>db
</code> directory of the repository.
</p>
2325 <p>Sometimes
"svnadmin recover" doesn't work. You may see it
2326 give errors like this:
</p>
2329 Repository lock acquired.
2330 Please wait; recovering the repository may take some time...
2331 svnadmin: DB_RUNRECOVERY: Fatal error, run database recovery
2332 svnadmin: bdb: Recovery function for LSN
175 7066018 failed on backward pass
2333 svnadmin: bdb: PANIC: No such file or directory
2334 svnadmin: bdb: PANIC: fatal region error detected; run recovery
2337 <p>or like this:
</p>
2340 Repository lock acquired.
2341 Please wait; recovering the repository may take some time...
2342 svn: DB_RUNRECOVERY: Fatal error, run database recovery
2343 svn: bdb: DB_ENV-
>log_flush: LSN of
115/
802071 past current end-of-log
2345 svn: bdb: Database environment corrupt; the wrong log files may have
2346 been removed or incompatible database files imported from another
2349 svn: bdb: changes: unable to flush page:
0
2350 svn: bdb: txn_checkpoint: failed to flush the buffer cache Invalid argument
2351 svn: bdb: PANIC: Invalid argument
2352 svn: bdb: PANIC: fatal region error detected; run recovery
2353 svn: bdb: PANIC: fatal region error detected; run recovery
2357 <p>In that case, try Berkeley DB's native
<b>db_recover
</b> utility
2358 (see
<a href=
"http://www.oracle.com/technology/documentation/berkeley-db/db/utility/db_recover.html"
2359 >db_recover documentation
</a>). It
2360 usually lives in a
"bin/" subdirectory of the Berkeley DB installation,
2361 for example if you installed Berkeley DB from source, it might be
2362 <tt>/usr/local/BerkeleyDB
.4.2/bin/db_recover
</tt>; or on systems where
2363 Berkeley DB comes prepackaged it might just be
2364 <tt>/usr/bin/db_recover
</tt>. If you have multiple versions of
2365 Berkeley DB installed, make sure that the version of db_recover you
2366 use matches the version of Berkeley DB with which your repository was
2369 <p>Run db_recover with the
"-c" (
"catastrophic recovery") flag. You
2370 can also add
"-v" for verbosity, and
"-h" with an argument telling it
2371 what db environment to recover (so you don't have to cd into that
2372 directory). Thus:
</p>
2375 db_recover -c -v -h /path/to/repos/db
2378 <p>Run this command as the same user that owns the repository, and
2379 again, make absolutely sure that no other processes are accessing the
2380 repository while you do this (e.g., shut down svnserve or Apache).
</p>
2385 <div class=
"h3" id=
"bdb-cannot-allocate-memory" title=
"bdb-cannot-allocate-memory">
2386 <h3>My repository keeps giving errors saying
"Cannot allocate memory".
2387 What should I do?
</h3>
2389 <p>If you're using http:// access,
"<b>Cannot allocate memory</b>"
2390 errors show up in the httpd error log and look something like
2395 [Wed Apr
07 04:
26:
10 2004] [error] [client
212.151.130.227] (
20014)
2396 Error string not specified yet: Berkeley DB error while opening
2397 'strings' table for filesystem /usr/local/svn/repositories/svn/db:
2398 Cannot allocate memory
2399 [Wed Apr
07 04:
26:
10 2004] [error] [client
212.151.130.227]
2400 Could not fetch resource information. [
500, #
0]
2401 [Wed Apr
07 04:
26:
10 2004] [error] [client
212.151.130.227]
2402 Could not open the requested SVN filesystem [
500, #
160029]
2403 [Wed Apr
07 04:
26:
10 2004] [error] [client
212.151.130.227] (
17)
2404 File exists: Could not open the requested SVN filesystem [
500, #
160029]
2408 <p>It usually means that a Berkeley DB repository has run out of
2409 database locks (this does not happen with FSFS repositories). It
2410 shouldn't happen in the course of normal operations, but if it does,
2411 the solution is to run database recovery as described
<a
2412 href=
"#bdb-recovery">here
</a>. If it happens often, you probably need
2413 to raise the default lock parameters (
<tt>set_lk_max_locks
</tt>,
2414 <tt>set_lk_max_lockers
</tt>, and
<tt>set_lk_max_objects
</tt>) in the
2415 db/DB_CONFIG file. When changing DB_CONFIG in an existing repository,
2416 remember to run recovery afterwards.
</p>
2421 <div class=
"h3" id=
"wedged-wc" title=
"wedged-wc">
2422 <h3>Every time I try to run a svn command, it says my
2423 working copy is locked. Is my working copy corrupt?
</h3>
2426 Your working copy is not corrupt, nor is your data lost. Subversion's
2427 working copy is a journaling system, meaning that it logs everything it
2428 is about to do before it does so. If the svn client program is
2429 interrupted violently (segfault or killed, not with Control-C), then
2430 one or more lockfiles are left behind, along with logfiles describing
2431 unfinished business. (The `svn status' command will show an 'L' next
2432 to locked directories.) Any other process that attempts to access the
2433 working copy will fail when it sees the locks. To awaken your working
2434 copy, you need to tell the svn client to finish the work. Simply
2438 svn cleanup working-copy
2444 <div class=
"h3" id=
"wc-out-of-date" title=
"wc-out-of-date">
2445 <h3>I'm trying to commit, but Subversion says my
2446 working copy is out of date?
</h3>
2448 <p>Three kinds of situation that can cause this:
</p>
2452 <li><p>Debris from a failed commit is littering your working copy.
</p>
2454 <p>You may have had a commit that went sour between the time the
2455 new revision was added in the server and the time your client
2456 performed its post-commit admin tasks (including refreshing your
2457 local text-base copy). This might happen for various reasons
2458 including (rarely) problems in the database back end or (more
2459 commonly) network dropouts at exactly the wrong time.
</p>
2461 <p>If this happens, it's possible that you have already committed
2462 the very changes you are trying now to commit. You can use 'svn
2463 log -rHEAD' to see if your supposed-failed commit actually
2464 succeeded. If it did, run 'svn revert' to revert your local
2465 changes, then run 'svn update' to get your own changes back from the
2466 server. (Note that only 'svn update' brings your local copies
2467 up-to-date; revert doesn't do that.)
</p>
2470 <li><p>Mixed revisions.
</p>
2472 <p>When Subversion commits, the client only bumps the revision
2473 numbers of the nodes the commit touches, not all nodes in the
2474 working copy. This means that in a single working copy, the
2475 files and subdirectories might be at different revisions,
2476 depending on when you last committed them. In certain operations
2477 (for example, directory property modifications), if the
2478 repository has a more recent version of the node, the commit will
2479 be rejected, to prevent data loss. See
<a
2480 href=
"http://svnbook.red-bean.com/svnbook/ch02s03.html#svn-ch-2-sect-3.4">
2481 The Limitations of Mixed Revisions
</a> in the
<a
2482 href=
"http://svnbook.red-bean.com/">Version Control with
2483 Subversion
</a> for details.
</p>
2485 <p>You can fix the problem by running 'svn update' in the working
2489 <li><p>You might be genuinely out of date
— that is,
2490 you're trying to commit a change to a file that has been changed
2491 by someone else since you last updated your copy of that file.
2492 Again, 'svn update' is the way to fix this.
</p>
2498 <div class=
"h3" id=
"obstructed-add" title=
"obstructed-add">
2499 <h3>I've contributed a patch to a project and the patch added a new file.
2500 Now
<tt>svn update
</tt> does not work.
</h3>
2502 <p>In order to include your new file in the patch you likely ran the
<tt>svn add
</tt>
2503 command so that the
<tt>svn diff
</tt> command would include the new file in the patch.
2504 If your patch is committed to the code base and you run an
<tt>svn update
</tt>, then
2505 you might receive an error message of:
"svn: Failed to add file 'my.new.file':
2506 object of the same name already exists".
</p>
2508 <p>The reason that you recieved this error is that you still have your local copy of
2509 the file in your working copy. The steps to correct this problem are:
</p>
2512 <li>Run the
<tt>svn revert
</tt> command to remove the scheduled add within
2514 <li>Delete the file or move it to a location outside your working copy.
</li>
2515 <li>Now you should be able to run the
<tt>svn update
</tt> command.
</li>
2518 <p>You might want to compare the new file from the repository with your original file.
</p>
2522 <div class=
"h3" id=
"unrecognized-url-error" title=
"unrecognized-url-error">
2523 <h3>I just built the distribution binary,
2524 and when I try to check out Subversion, I get an error about an
2525 "Unrecognized URL scheme." What's up with that?
</h3>
2527 <p>Subversion uses a plugin system to allow access to repositories.
2528 Currently there are three of these plugins: ra_local allows access to
2529 a local repository, ra_dav which allows access to a repository via
2530 WebDAV, and ra_svn allows local or remote access via the svnserve
2531 server. When you attempt to perform an operation in Subversion, the
2532 program tries to dynamically load a plugin based on the URL scheme. A
2533 `file://' URL will try to load ra_local, and an `http://' URL will try
2536 <p>The error you are seeing means that the dynamic linker/loader can't find
2537 the plugins to load. This normally happens when you build Subversion with
2538 shared libraries, then attempt to run it without first running 'make
2539 install'. Another possible cause is that you ran make install, but the
2540 libraries were installed in a location that the dynamic linker/loader
2541 doesn't recognize. Under Linux, you can allow the linker/loader to find the
2542 libraries by adding the library directory to /etc/ld.so.conf and running
2543 ldconfig. If you don't wish to do this, or you don't have root access, you
2544 can also specify the library directory in the LD_LIBRARY_PATH environment
2550 <div class=
"h3" id=
"db-recover" title=
"db-recover">
2551 <h3>I'm getting errors finding or opening a repository,
2552 but I know my repository URL is correct. What's wrong?
</h3>
2554 <p>See
<a href=
"#bdb-recovery">this faq.
</a></p>
2560 <div class=
"h3" id=
"configure-sed-error" title=
"configure-sed-error">
2561 <h3>When I run `
<tt>configure
</tt>', I get errors about
2562 <tt>subs-
1.sed
line
38:
Unterminated
`s'
command
</tt>.
2566 You probably have old copies of
2567 <tt>/usr/local/bin/apr-config
</tt> and
2568 <tt>/usr/local/bin/apu-config
</tt> on your system. Remove them, make
2569 sure the
<tt>apr/
</tt> and
<tt>apr-util/
</tt> that you're
2570 building with are completely up-to-date, and try again.
2576 <div class=
"h3" id=
"windows-msvc-build" title=
"windows-msvc-build">
2577 <h3>I'm having trouble building Subversion
2578 under Windows with MSVC++
6.0. What should I do?
</h3>
2581 Probably you just need to get the latest platform SDK. The one that
2582 ships with VC++
6.0 is not recent enough.
2588 <div class=
"h3" id=
"windows-drive-letter" title=
"windows-drive-letter">
2589 <h3>How can I specify a Windows drive letter in
2590 a
<tt>file:
</tt> URL?
</h3>
2594 svn import file:///d:/some/path/to/repos/on/d/drive
2597 href=
"http://svnbook.red-bean.com/html-chunk/ch02s03.html#svn-ch-2-sidebar-1">
2598 Repository URLs
</a> in the Subversion Book for more details.
</p>
2603 <div class=
"h3" id=
"vs-asp-net" title=
"vs-asp-net">
2604 <h3>VS.NET/ASP.NET seems to have a problem with
2605 the
".svn" directory name. What should I do?
</h3>
2607 <p>VS.Net has a subsystem called ASP.Net, which uses WebDAV to do
2608 remote publishing through IIS. This subsystem rejects any pathname
2609 that starts with
".". This causes a problem when you try to remotely
2610 publish a Subversion working copy, because of the
".svn"
2611 subdirectories. The error message says something like
"unable to
2612 read project information".
</p>
2614 <p>To work around this, set the environment variable
2615 SVN_ASP_DOT_NET_HACK to any value
— this will tell
2616 Windows clients to use
"_svn" as a directory name in your working
2618 href=
"http://subversion.tigris.org/svn_1.3_releasenotes.html#_svn-hack"
2619 >the relevant section of the Subversion
1.3 release notes
</a> for more
2620 details, and see
<a href=
"#adm-dir">this question
</a> for other ways to
2621 customize the administrative directory name.
</p>
2626 <div class=
"h3" id=
"write-over-dav" title=
"write-over-dav">
2627 <h3>I'm having trouble doing write
2628 operations to a Subversion repository over a network.
</h3>
2630 <p>For example, one user reported that imports worked fine over local
2634 $ touch test/testfile
2635 $ svn import test file:///var/svn/test -m
"Initial import"
2636 Adding test/testfile
2637 Transmitting file data .
2638 Committed revision
1.
2640 But not from a remote host:
2642 $ svn import http://svn.sabi.net/test testfile -m
"import"
2643 nicholas's password: xxxxxxx
2645 svn_error: #
21110 :
<Activity not found
>
2647 The specified activity does not exist.
2650 <p> We've seen this when the REPOS/dav/ directory is not writable by
2651 the httpd process. Check the permissions to ensure Apache can write
2652 to the
<tt>dav/
</tt> directory (and to
<tt>db/
</tt>, of course).
</p>
2658 <div class=
"h3" id=
"windows-xp-server" title=
"windows-xp-server">
2659 <h3>Under Windows XP, the Subversion server
2660 sometimes seems to send out corrupted data. Can this really
2663 <p>You need to install Window XP Service Pack
1. You can get all
2664 sorts of information about that Service Pack here:
</p>
2667 <a href=
"http://support.microsoft.com/default.aspx?scid=kb;EN-US;q317949"
2668 >http://support.microsoft.com/default.aspx?scid=kb;EN-US;q317949
</a>
2674 <a name=
"ethereal"></a> <!-- for compatibility with old question -->
2675 <div class=
"h3" id=
"net-trace" title=
"net-trace">
2676 <h3>What is the best method of doing a network
2677 trace of the conversation between a Subversion client and
2680 <p>Use
<a href=
"http://www.wireshark.org/">Wireshark
</a> (formerly
2681 known as
"Ethereal") to eavesdrop on the conversation.
</p>
2683 <p>First, make sure that between captures within the same wireshark
2684 session, you hit
<em>Clear
</em>, otherwise filters from one capture
2685 (say, an HTTP capture) might interfere with others (say, an ra_svn
2688 <p>Assuming you're cleared, then:
</p>
2691 <li><p>Pull down the
<i>Capture
</i> menu, and choose
2692 <i>Capture
Filters
</i>.
</p></li>
2693 <li><p>If debugging the http:// (WebDAV) protocol, then in the window
2694 that pops up, choose
"<code>HTTP TCP port (80)</code>"
2695 (which should result in the filter string
2696 "<code><i>tcp port http</i></code>").
</p>
2697 <p>If debugging the svn:// (ra_svn) protocol, then choose
<i>New
</i>,
2698 give the new filter a name (say,
"ra_svn"), and type
2699 "<code>tcp port 3690</code>" into the filter string box.
</p>
2700 <p>When done, click OK.
</p></li>
2701 <li><p>Again go to the
<i>Capture
</i> menu, this time choose
2702 <i>Interfaces
</i>, and click
<i>Options
</i> next to the
2703 appropriate interface (probably you want interface
"lo", for
2704 "loopback", assuming the server will run on the same machine as
2705 the client).
</p></li>
2706 <li><p>Turn off promiscuous mode by unchecking the appropriate
2708 <li><p>Click the
<i>Start
</i> button in the lower right to start the
2710 <li><p>Run your Subversion client.
</p></li>
2711 <li><p>Click the Stop icon (a red X over an ethernet interface card) when
2712 the operation is finished (or
<i>Capture-
>Stop
</i> should
2713 work). Now you have a capture. It looks like a huge list of
2715 <li><p>Click on the
<i>Protocol
</i> column to sort.
</p></li>
2716 <li><p>Then, click on the first relevant line to select it; usually this
2717 is just the first line.
</p></li>
2718 <li><p>Right click, and choose
<i>Follow TCP Stream
</i>. You'll be
2719 presented with the request/response pairs of the Subversion
2720 client's HTTP conversion.
</p></li>
2723 <p>The above instructions are specific to the graphical version of
2724 Wireshark (version
0.99.6), and don't apply to the command-line
2725 version known as
"tshark" (which corresponds to
"tethereal", from back
2726 when Wireshark was called Ethereal).
</p>
2728 <p>Alternatively, you may set the
<tt>neon-debug-mask
</tt> parameter in your
2729 <tt>servers
</tt> configuration file to cause neon's debugging output
2730 to appear when you run the
<tt>svn
</tt> client. The numeric value of
2731 <tt>neon-debug-mask
</tt> is a combination of the
<tt>NE_DBG_...
</tt> values
2732 in the header file
<tt>ne_utils.h
</tt>. For current versions of neon, setting
2733 <tt>neon-debug-mask
</tt> to
130 (i.e.
<tt>NE_DBG_HTTP+NE_DBG_HTTPBODY)
</tt>
2734 will cause the HTTP data to be shown.
</p>
2736 <p>You may well want to disable compression when doing a network
2737 trace
—see the
<tt>http-compression
</tt> parameter in the
<tt>servers
</tt>
2738 configuration file.
</p>
2740 <p>Another alternative is to set up a logging proxy between the
2741 Subversion client and server. A simple way to do this is to use
2742 the
<tt>socat
</tt> program. For example, to log communication with
2743 an svnserve instance, run the following command:
</p>
2745 <p><tt>socat -v TCP4-LISTEN:
9630,reuseaddr,fork
2746 TCP4:localhost:svn
</tt></p>
2748 <p>Then run your svn commands using an URL base
2749 of
<tt>svn://
127.0.0.1:
9630/
</tt>;
<tt>socat
</tt> will forward the
2750 traffic from port
9630 to the normal svnserve port (
3690), and will
2751 print all traffic in both directions to standard error, prefixing it
2752 with
< and
> signs to show the direction of the traffic.
</p>
2757 <div class=
"h3" id=
"revert" title=
"revert">
2758 <h3>Why does the
<tt>svn revert
</tt> require an
2759 explicit target? Why is it not recursive by default? These
2760 behaviors differ from almost all the other subcommands.
</h3>
2762 <p>The short answer: it's for your own good.
</p>
2764 <p>Subversion places a very high priority on protecting your data, and
2765 not just your versioned data. Modifications that you make to
2766 already-versioned files, and new files scheduled for addition to the
2767 version control system, must be treated with care.
</p>
2769 <p>Making the
<tt>svn revert
</tt> command require an explicit
2770 target
—even if that target is just '.'
—is one way of
2771 accomplishing that. This requirement (as well as requiring you to
2772 supply the
<tt>--recursive (-R)
</tt> flag if you want that behavior)
2773 is intended to make you really think about what you're doing, because
2774 once your files are reverted, your local modifications are gone
2781 <div class=
"h3" id=
"db3db4" title=
"db3db4">
2782 <h3>When I start Apache, mod_dav_svn complains about
2783 a
"bad database version", that it found db-
3.X, rather than
2786 <p>Your apr-util linked against DB-
3, and svn linked against DB-
4.
2787 Unfortunately, the DB symbols aren't different. When mod_dav_svn is
2788 loaded into Apache's process-space, it ends up resolving the
2789 symbol names against apr-util's DB-
3 library.
</p>
2791 <p>The solution is to make sure apr-util compiles against DB-
4. You
2792 can do this by passing specific switches to either apr-util's or
2793 apache's configure:
"--with-dbm=db4 --with-berkeley-db=/the/db/prefix".
</p>
2799 <div class=
"h3" id=
"redhat-db" title=
"redhat-db">
2800 <h3>I'm getting
"Function not implemented" errors on Red Hat
2801 9, and nothing works. How do I fix this?
</h3>
2803 <p>This is not really a problem with Subversion, but it often affects
2804 Subversion users.
</p>
2806 <p>Red Hat
9 and Fedora ship with a Berkeley DB library that relies on
2807 the kernel support for NPTL (the Native Posix Threads Library).
</p>
2809 <p>The kernels that Red Hat provides have this support built in, but if you
2810 compile your own kernel, then you may well not have the NPTL support. If that
2811 is the case, then you will see errors like this:
</p>
2813 svn: Berkeley DB error
2814 svn: Berkeley DB error while creating environment for filesystem tester/db:
2815 Function not implemented
2817 <p>This can be fixed in one of several ways:
</p>
2819 <li>Rebuild Berkeley DB for the kernel you're using.
</li>
2820 <li>Use a Red Hat
9 kernel.
</li>
2821 <li>Apply the NPTL patches to the kernel you're using.
</li>
2822 <li>Use a recent (
2.5.x) kernel with the NPTL support included.
</li>
2823 <li>Check if environment variable
<code>LD_ASSUME_KERNEL
</code> is set
2824 to
<code>2.2.5</code>, and if so, unset it before starting
2825 Subversion (Apache). (You usually would set this variable to run
2826 Wine or Winex on Red Hat
9)
</li>
2828 <p>To use the NPTL version of Berkeley DB you also need to use a glibc
2829 library with NPTL support, which probably means the i686 version. See
2831 href=
"http://svn.haxx.se/users/archive-2004-03/0488.shtml">
2832 http://svn.haxx.se/users/archive-
2004-
03/
0488.shtml
2839 <div class=
"h3" id=
"no-author" title=
"no-author">
2840 <h3>Why does SVN log say
"(no author)" for files
2841 committed or imported via Apache (ra_dav)?
</h3>
2843 <p>If you allow anonymous write access to the repository via Apache,
2844 the Apache server never challenges the SVN client for a username, and
2845 instead permits the write operation without authentication. Since
2846 Subversion has no idea who did the operation, this results in a log
2851 ------------------------------------------------------------------------
2852 rev
24:
(no author) |
2003-
07-
29 19:
28:
35 +
0200 (Tue,
29 Jul
2003)
2855 <p>See the Subversion Book (
<a
2856 href=
"http://svnbook.red-bean.com/book.html#svn-ch-5-sect-4"
2857 >"Networking a Repository"</a>)
2858 to learn about configuring access restrictions in Apache.
</p>
2864 <div class=
"h3" id=
"windows-access-denied" title=
"windows-access-denied">
2865 <h3>I'm getting occasional
"Access Denied"
2866 errors on Windows. They seem to happen at random. Why?
</h3>
2868 <p>These appear to be due to the various Windows services that monitor
2869 the filesystem for changes (anti-virus software, indexing services, the
2870 COM+ Event Notification Service). This is not really a bug in Subversion,
2871 which makes it difficult for us to fix. A summary of the current state of
2872 the investigation is available
<a href=
2873 "http://svn.haxx.se/dev/archive-2003-10/0136.shtml">here
</a>.
2874 A workaround that should reduce the incidence rate for most people was
2875 implemented in revision
7598; if you have an earlier version, please
2876 update to the latest release.
2882 <div class=
"h3" id=
"freebsd-hang" title=
"freebsd-hang">
2883 <h3>On FreeBSD, certain operations (especially
2884 svnadmin create) sometimes hang. Why?
</h3>
2886 <p>This is usually due to a lack of available entropy on the system.
2887 You probably need to configure the system to gather entropy from
2888 sources such as hard-disk and network interrupts. Consult your system
2889 manpages, specifically random(
4) and rndcontrol(
8) on how to effect
2895 <a name=
"301-error"></a> <!-- for compatibility with old
2896 non-XML-name-compliant fragment id -->
2897 <div class=
"h3" id=
"http-301-error" title=
"http-301-error">
2898 <h3>I can see my repository in a web browser, but
2899 'svn checkout' gives me an error about
"301 Moved Permanently".
2902 <p>It means your httpd.conf is misconfigured. Usually this error happens
2903 when you've defined the Subversion virtual
"location" to exist within
2904 two different scopes at the same time.
</p>
2906 <p>For example, if you've exported a repository as
<tt><Location
2907 /www/foo
></tt>, but you've also set your
<tt>DocumentRoot
</tt> to
2908 be
<tt>/www
</tt>, then you're in trouble. When the request comes in
2909 for
<tt>/www/foo/bar
</tt>, apache doesn't know whether to find a
2910 <i>real
</i> file named
<tt>/foo/bar
</tt> within your
2911 <tt>DocumentRoot
</tt>, or whether to ask mod_dav_svn to fetch a file
2912 <tt>/bar
</tt> from the
<tt>/www/foo
</tt> repository. Usually the
2913 former case wins, and hence the
"Moved Permanently" error.
</p>
2915 <p>The solution is to make sure your repository
2916 <tt><Location
></tt> does
<b>not
</b> overlap or live within any
2917 areas already exported as normal web shares.
</p>
2919 <p>It's also possible that you have an object in the web root
2920 which has the same name as your repository URL. For example,
2921 imagine your web server's document root is
<tt>/var/www
</tt>
2922 and your Subversion repository is located at
2923 <tt>/home/svn/repo
</tt>. You then configure Apache to serve
2924 the repository at
<tt>http://localhost/myrepo
</tt>. If you then
2925 create the directory
<tt>/var/www/myrepo/
</tt> this will cause
2926 a
301 error to occur.
</p>
2932 <div class=
"h3" id=
"no-copy-history" title=
"no-copy-history">
2933 <h3>I'm trying to look at an old version of my
2934 file, but svn says something about
"path not found". What's going
2937 <p>A nice feature of Subversion is that the repository understands
2938 copies and renames, and preserves the historical connections. For
2939 example, if you copy
<tt>/trunk
</tt> to
<tt>/branches/mybranch
</tt>,
2940 then the repository understands that every file in the branch has a
2941 "predecessor" in the trunk. Running
<tt>svn log --verbose
</tt> will
2942 show you the historical copy, so you can see the rename:
</p>
2945 r7932 | joe |
2003-
12-
03 17:
54:
02 -
0600 (Wed,
03 Dec
2003) |
1 line
2947 A /branches/mybranch (from /trunk:
7931)
2950 <p>Unfortunately, while the repository is aware of copies and renames,
2951 almost all the svn client subcommands are
<b>not
</b> aware. Commands
2952 like
<tt>svn diff
</tt>,
<tt>svn merge
</tt>, and
<tt>svn cat
</tt> ought
2953 to understand and follow renames, but don't yet do this. It's
2954 scheduled as post-
1.0 feature, currently
<a
2955 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=1093">issue
2956 #
1093</a>. For example, if you ask
<tt>svn diff
</tt> to compare two
2957 earlier versions of
<tt>/branches/mybranch/foo.c
</tt>, the command
2958 will not automatically understand that the task actually requires
2959 comparing two versions of
<tt>/trunk/foo.c
</tt>, due to the rename.
2960 Instead, you'll see an error about how the branch-path doesn't exist
2961 in the earlier revisions.
</p>
2963 <p>The workaround for all problems of this sort is to do the legwork
2964 yourself. That is:
<i>you
</i> need to be aware of any renamed paths,
2965 discover them yourself using
<tt>svn log -v
</tt>, and then provide
2966 them explicitly to the svn client. For example, instead of
2970 $ svn diff -r
1000:
2000 http://host/repos/branches/mybranch/foo.c
2971 svn: Filesystem has no item
2972 svn: '/branches/mybranch/fooc..c' not found in the repository at revision
1000
2975 ...you would instead run
2978 $ svn diff -r1000:
2000 http://host/repos/trunk/foo.c
2985 <div class=
"h3" id=
"digest-auth" title=
"digest-auth">
2986 <h3>Why doesn't HTTP Digest auth work?
</h3>
2988 <p>This is probably due to a known bug in Apache HTTP Server (versions
2989 2.0.48 and earlier), for which a patch is available, see
2990 <a href=
"http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25040"
2991 >http://nagoya.apache.org/bugzilla/show_bug.cgi?id=
25040</a>. You
2992 may also want to read over
2993 <a href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=1608"
2994 >http://subversion.tigris.org/issues/show_bug.cgi?id=
1608</a>
2995 to see if the description there matches your symptoms.
3001 <div class=
"h3" id=
"xlc-compile" title=
"xlc-compile">
3002 <h3>Compiling with xlc on AIX, I get compilation
3003 errors. What's wrong?
</h3>
3005 <p>Adding
<tt>-qlanglvl=extended
</tt> to the
3006 environment variable CFLAGS for configuration and build
3007 will make xlc a bit more flexible and the code should
3008 compile without error. See
3009 <a href=
"http://svn.haxx.se/dev/archive-2004-01/0922.shtml"
3010 >http://svn.haxx.se/dev/archive-
2004-
01/
0922.shtml
</a> and
3011 its associated thread for more details.
3017 <div class=
"h3" id=
"nonrecursive-checkout" title=
"nonrecursive-checkout">
3018 <h3>I checked out a directory non-recursively
3019 (with -N), and now I want to make certain subdirectories
3020 "appear". But
<tt>svn up subdir
</tt> doesn't work.
</h3>
3023 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=695">issue
3024 695</a>. The current implementation of
<tt>svn checkout -N
</tt> is
3025 quite broken. It results in a working copy which has missing entries,
3026 yet is ignorant of its
"incompleteness". Apparently a whole bunch of
3027 CVS users are fairly dependent on this paradigm, but none of the
3028 Subversion developers were. For now, there's really no workaround
3029 other than to change your process: try checking out separate
3030 subdirectories of the repository and manually nesting your working
3036 <div class=
"h3" id=
"mod_dav_svn-win32" title=
"mod_dav_svn-win32">
3037 <h3>I am trying to use mod_dav_svn
3038 with Apache on Win32 and I'm getting an error saying that the
3039 module cannot be found, yet the mod_dav_svn.so file is right
3040 there in
<tt>\Apache\modules.
</tt></h3>
3042 <p>The error message in this case is a little misleading. Most likely
3043 Apache is unable to load one or more DLLs that
<tt>mod_dav_svn.so
</tt>
3044 relies on. If Apache is running as a service it will not have the
3045 same
<tt>PATH
</tt> as a regular user. Make sure that
3046 <tt>libdb4*.dll
</tt>,
<tt>intl3_svn.dll
</tt>,
<tt>libeay32.dll
</tt>
3047 and
<tt>ssleay32.dll
</tt> are present in either
<tt>\Apache\bin
</tt> or
3048 <tt>\Apache\modules
</tt>. You can copy them from your Subversion
3049 installation directory if they are not there.
</p>
3051 <p>If this still does not resolve the problem, you should use a tool
3052 like
<a href=
"http://www.dependencywalker.com">Dependency Walker
</a>
3053 on
<tt>mod_dav_svn.so
</tt> to see if there are any other unresolved
3059 <a name=
"win32-hooks"></a> <!-- for compatibility with old question -->
3060 <a name=
"hook-environment"></a> <!-- for yet more compatibility with old question -->
3061 <div class=
"h3" id=
"hook-debugging" title=
"hook-debugging">
3062 <h3>Why aren't my repository hooks working?
</h3>
3064 <p>They're supposed to invoke external programs, but the invocations
3065 never seem to happen.
</p>
3067 <p>Before Subversion calls a hook script, it removes
<em>all
</em>
3068 variables -- including $PATH on Unix, and %PATH% on Windows
3069 -- from the environment. Therefore, your script can only
3070 run another program if you
3071 spell out that program's absolute name.
</p>
3073 <p><b>Debugging tips:
</b></p>
3075 If you're using Linux or Unix, try running the script
"by hand", by
3076 following these steps:
</p>
3079 <li>Use
"su",
"sudo", or something similar, to become the user who
3080 normally would run the script. This might be
<tt>httpd
</tt> or
3081 <tt>www-data
</tt>, for example, if you're using Apache;
3082 it might be a user like
<tt>svn
</tt> if you're running
3083 svnserve and a special Subversion user exists. This
3084 will make clear any permissions problems that the script
3088 Invoke the script with an empty environment by using the
3089 "env" program. Here's an
3090 example for the post-commit hook:
3092 $ env - ./post-commit /var/lib/svn-repos
1234
3094 Note the first argument to
"env" is a dash; that's what
3095 ensures the environment is empty.
3098 Check your console for errors.
3105 <div class=
"h3" id=
"diff-cmd" title=
"diff-cmd">
3106 <h3>Why does my --diff-cmd complain about '-u'?
3107 I tried to override it with --extensions, but it's not working.
</h3>
3109 <p>When using an external diff command, Subversion builds a fairly
3110 complicated command line. First is the specified --diff-cmd. Next comes
3111 the specified --extensions (although empty --extensions are ignored), or
3112 '-u' if --extensions is unspecified (or specified as ''). Third and
3113 fourth, Subversion passes a '-L' and the first file's label (e.g.
3114 "project_issues.html (revision 11209)"). Fifth and sixth are another
3115 '-L' and the second label. Seventh and eighth are the first and second
3116 file names (e.g.
".svn/text-base/project_issues.html.svn-base" and
3117 ".svn/tmp/project_issues.html.tmp").
</p>
3119 <p>If your preferred diff command does not support these arguments, you
3120 may need to create a small wrapper script to discard arguments and just
3121 use the last couple file paths.
</p>
3123 <p>Warning: Beware that Subversion does not expect the external diff
3124 program to change the files it receives, and doing so may scramble the
3127 <p>For further information, see issue
3128 <a href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=2044">#
2044</a>.
</p>
3133 <div class=
"h3" id=
"plaintext-passwords" title=
"plaintext-passwords">
3134 <h3>Ahhh! I just discovered that my
3135 Subversion client is caching passwords in plain-text on disk!
3138 <p>Calm down, take a deep breath.
</p>
3140 <p>On Windows
2000 or later, svn
1.2 and above uses standard
3141 Windows APIs to encrypt the data, so only the user can decrypt the
3142 cached password.
</p>
3144 <p>On Mac OS X, svn
1.4 and later uses the system Keychain
3145 facility to encrypt/store your svn password.
</p>
3147 <p>On UNIX/Linux, there are no standard system encryption facilities,
3148 so the password is stored in ~/.subversion/auth/. Notice, however,
3149 that the directory which contains the cached passwords (usually
3150 ~/.subversion/auth/) has permissions of
700, meaning only you can read
3153 <p>Trust your OS to protect data on disk.
</p>
3155 <p>However, if you're really worried, you can permanently turn off
3156 password caching. With an svn
1.0 client, just set 'store-auth-creds
3157 = no' in your run-time config file. With an svn
1.1 client or later,
3158 you can use the more narrowly-defined 'store-passwords = no' (so that
3159 server certs are still cached). More information on password cacheing
3160 is in chapter
6 of the
<a
3161 href=
"http://svnbook.red-bean.com/nightly/en/index.html">"Nightly
3162 Build" Subversion book
</a>, under
3163 <a href=
"http://svnbook.red-bean.com/nightly/en/svn.serverconfig.netmodel.html#svn.serverconfig.netmodel.credcache">
3164 "Client Credentials Caching".
</a></p>
3166 <p>Lastly, we point out that CVS has been caching passwords for years
3167 in the .cvspass file. It may look like the passwords in .cvspass are
3168 encrypted, but in fact they're only lightly scrambled with an
3169 algorithm that's the moral equivalent to rot13. They can be cracked
3170 instantly. The only utility of the scrambling is to prevent users
3171 (like root) from accidentally seeing the password. Nobody's cared
3172 enough to do this for Subversion yet; if you're interested, send
3173 patches to the dev@ list.
</p>
3178 <div class=
"h3" id=
"bdb41-tabletype-bug" title=
"bdb41-tabletype-bug">
3179 <h3>I'm getting the error
"svn: bdb: call
3180 implies an access method which is inconsistent with previous
3181 calls". How do I fix this?
</h3>
3183 <p>Berkeley DB
4.1 has shown itself to be rather unstable - both
4.0
3184 and
4.2 are better. This error message is a symptom of one unique way
3185 in which
4.1 will sometimes break.
</p>
3187 <p>The problem is that the database format field for one of the tables
3188 that make up a Subversion repository using the Berkeley DB backend has
3189 become corrupted. For unknown reasons, this is almost always the
3190 'copies' table, which switches from the 'btree' type to the 'recno'
3191 type. Simple recovery procedures are outlined below - if they do not
3192 succeed, you should contact the Subversion Users
<a
3193 href=
"mailto:users@subversion.tigris.org">mailing list
</a>.
</p>
3196 <li>Ensure that no other processes will attempt to access your
3198 <li>Now,
<b>back up your repository
</b> to a tar or zip file or
3200 <li>Change to the
<tt>db
</tt> subdirectory of your repository.
</li>
3201 <li><tt>rm __db.* log.*
</tt></li>
3202 <li><tt>db_dump -p -r copies
> copies.dump
</tt></li>
3203 <li>Now edit
<tt>copies.dump
</tt>. In the section near the top,
3204 change
"<tt>type=recno</tt>" to
"<tt>type=btree</tt>", and delete
3205 the line beginning
"<tt>re_len=</tt>".
</li>
3206 <li><tt>rm copies
</tt></li>
3207 <li><tt>db_load copies
< copies.dump
</tt></li>
3208 <li><tt>svnadmin dump ..
> ../../my-recovered.svndump
</tt></li>
3209 <li>Now create a new repository, reload the dump file just produced,
3210 and copy across any custom hooks or configuration. Verify that the
3211 highest revision number in the new repository is what you think it
3218 <div class=
"h3" id=
"hotcopy-large-repos" title=
"hotcopy-large-repos">
3219 <h3>I can't hotbackup my repository,
3220 svnadmin fails on files larger than
2Gb!
</h3>
3222 <p>Early versions of APR on its
0.9 branch, which Apache
2.0.x and
3223 Subversion
1.x use, have no support for copying large files (
2Gb+).
3224 A fix which solves the 'svnadmin hotcopy' problem has been applied and
3225 is included in APR
0.9.5+ and Apache
2.0.50+. The fix doesn't work
3226 on all platforms, but works on Linux.
3232 <div class=
"h3" id=
"hidden-log" title=
"hidden-log">
3233 <h3>I cannot see the log entry for the file
3234 I just committed. Why?
</h3>
3236 <p>Assume you run '
<tt>svn
checkout
</tt>' on a repository and
3237 receive a working copy at revision
7 (aka, r7) with one file in it
3238 called
<tt>foo.c
</tt>. You modify the file and commit it
3239 successfully. Two things happen:
</p>
3242 <li>The repository moves to r8 on the server.
</li>
3243 <li>In your working copy, only the file
<tt>foo.c
</tt> moves to r8.
3244 The rest of your working copy remains at r7.
</li>
3247 <p>You now have what is known as a
<i>mixed revision working copy
</i>.
3248 One file is at r8, but all other files remain at r7 until they too are
3249 committed, or until '
<tt>svn
update
</tt>' is run.
</p>
3251 <pre> $ svn -v status
3256 <p>If you run the '
<tt>svn
log
</tt>' command without any
3257 arguments, it prints the log information for the current directory
3258 (named '
<tt>.
</tt>' in the above listing). Since the directory itself
3259 is still at r7, you do not see the log information for r8.
</p>
3261 <p>To see the latest logs, do one of the following:
</p>
3264 <li>Run '
<tt>svn
log
-rHEAD
</tt>'.
</li>
3265 <li>Run '
<tt>svn
log
URL
</tt>', where URL is the repository URL.
</li>
3266 <li>Ask for just that file's log information, by running
3267 '
<tt>svn
log
foo.c
</tt>'.
</li>
3268 <li>Update your working copy so it's all at r8, then run
3269 '
<tt>svn
log
</tt>'.
</li>
3275 <div class=
"h3" id=
"bdb43-upgrade" title=
"bdb43-upgrade">
3276 <h3>After upgrading to Berkeley DB
3277 4.3 or later, I'm seeing repository errors.
</h3>
3279 <p>Prior to Berkeley DB
4.3,
<tt>svnadmin recover
</tt> worked to upgrade a
3280 Berkeley DB repository in-place. However, due to a change in the behaviour
3281 of Berkeley DB in version
4.3, this now fails.
</p>
3283 <p>Use this procedure to upgrade your repository in-place to Berkeley
3284 DB
4.3 or later:
</p>
3288 <li>Make sure no process is accessing the repository (stop
3289 Apache, svnserve, restrict access via file://, svnlook, svnadmin,
3292 <li>Using an
<i>older
</i> <tt>svnadmin
</tt> binary (that is, linked to
3293 an older Berkeley DB):
3298 repository: '
<tt>svnadmin
recover
/path/to/repository
</tt>'
</li>
3300 <li>Make a backup of the repository.
</li>
3302 <li>Delete all unused log files. You can see them by running
3303 '
<tt>svnadmin
list-unused-dblogs
/path/to/repeository
</tt>'
</li>
3305 <li>Delete the shared-memory files. These are files in the
3306 repository's
<tt>db/
</tt> directory, of the form
<tt>__db
.00*
</tt></li>
3314 <p>The repository is now usable by Berkeley DB
4.3.
</p>
3319 <div class=
"h3" id=
"tiger-apr-0.9.6" title=
"tiger-apr-0.9.6">
3320 <h3>Why do I get occasional, seemingly inconsistent errors when checking
3321 out over http:// from a repository running on MacOS X
10.4 (Tiger)?
</h3>
3323 <p>Note: this assumes the repository is being served by Apache
2.0.x.
</p>
3325 <p>There is
<a href=
"http://issues.apache.org/bugzilla/show_bug.cgi?id=34332"
3326 >a bug in APR
0.9.6</a> that is present when it is running on Tiger,
3327 and shows up when you attempt to check out a file larger than
64Kb.
3328 The resulting checkout fails, often with unpredictable error messages.
3329 Here are some examples of what you might see on the client side, the
3330 specific errors may differ for you:
</p>
3333 svn: Invalid diff stream: [tgt] insn
1 starts beyond the target view position
3337 svn: Unexpected end of svndiff input
3341 svn: REPORT request failed on '/path/to/repository'
3342 svn: REPORT of '/path/to/repository/!svn/vcc/default': Chunk delimiter was invalid
3345 <p>There may also be errors in the Apache error_log, such as:
</p>
3348 [error] Provider encountered an error while streaming a REPORT response. [
500, #
0]
3349 [error] A failure occurred while driving the update report editor [
500, #
190004]
3352 <p>To confirm the presence of this bug
— assuming
3353 you have access to the machine that the repository is being served
3354 from
— try checking out using a file:// URL, which
3355 will access the filesystem directly instead of going through Apache.
3356 If the resulting checkout completes successfully, then it is almost
3357 certain that this is the problem.
</p>
3359 <p>Currently, the best solution is to upgrade to APR
1.2.0+.
</p>
3361 <p>Alternately, you can rebuild Apache and Subversion from their
3362 respective sources, setting the following environment variable before
3363 running configure for Apache:
</p>
3366 setenv ac_cv_func_poll no
3369 <p>or in Bourne shell syntax, like this:
</p>
3372 ac_cv_func_poll=no; export ac_cv_func_poll
3375 <p>If you built APR / APRUTIL separately (i.e., you did not use the
3376 ones that come as part of the Apache tarball), you must set that
3377 environment variable before running configure for APR, as this is
3378 where the problem lies.
</p>
3383 <div class=
"h3" id=
"debian-libtool" title=
"debian-libtool">
3384 <h3>I can't build Subversion from working copy
3385 source on Debian GNU/Linux; I get errors at the final link
3386 stage. What's wrong?
</h3>
3388 <p>If you see errors like this in the final link stage of a Subversion
3389 trunk source build:
</p>
3392 /usr/local/apache2/lib/libaprutil-
0.so
.0: undefined reference to `db_create'
3393 /usr/local/apache2/lib/libaprutil-
0.so
.0: undefined reference to `db_strerror'
3396 <p>it might be because you're on a Debian GNU/Linux system and need to
3397 upgrade 'libtool'. (I've also heard that the Debian packagers had to
3398 tweak 'libtool' and that this may cause some problems for Subversion
3399 builds. But that's hearsay
— I didn't have time to
3400 verify the details before writing this FAQ entry. However, see
<a
3401 href=
"http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=112617"
3402 >http://subversion.tigris.org/servlets/ReadMsg?list=dev
&msgNo=
112617</a>
3404 href=
"http://subversion.tigris.org/servlets/BrowseList?list=dev&by=thread&from=435265"
3405 >thread
</a> it spawned for a detailed discussion.)
</p>
3407 <p>In any case, after encountering this problem on a Debian GNU/Linux
3408 system running a newly-dist-upgraded 'testing' distribution on
15 Nov
3409 2005, the solution was to build
<a
3410 href=
"http://www.gnu.org/software/libtool/libtool.html">libtool
1.5.20</a>
3411 from source, using the standard
"./configure && make &&
3412 sudo make install" recipe. After that, I did a 'make
clean' in
3413 my Subversion working copy tree, './autogen.sh', './configure', 'make',
3414 and everything worked fine.
</p>
3416 <p>Note that another report of these symptoms appeared at
<a
3417 href=
"http://svn.haxx.se/dev/archive-2003-01/1125.shtml"
3418 >http://svn.haxx.se/dev/archive-
2003-
01/
1125.shtml
</a>, though the
3419 solution described here was not mentioned in that thread.
</p>
3424 <div class=
"h3" id=
"freebsd-listen-host" title=
"freebsd-listen-host">
3425 <h3>I'm using FreeBSD, and I've started svnserve, but it doesn't seem
3426 to be listening on port
3690.
</h3>
3428 <p>Short answer: invoke
<tt>svnserve
</tt> with
3429 the
<tt>--listen-host=
0.0.0.0</tt> option.
</p>
3430 <p>Slightly longer answer: FreeBSD daemons only listen on tcp6 by
3431 default; that option tells them to also listen on tcp4.
</p>
3434 <div class=
"h3" id=
"already-under-version-control" title=
"already-under-version-control">
3435 <h3>I can't add a directory
3436 because Subversion says it's
"already under version control".
</h3>
3437 <p>The directory you're trying to add already contains
3438 a
<tt>.svn
</tt> subdirectory, but it's from a different repository
3439 than the directory to which you're trying to add it. This probably
3440 happened because you used your operating system's
"copy" command to
3441 copy one working copy into the current one.
</p>
3443 The quick and dirty solution is to delete all
<tt>.svn
</tt>
3444 directories contained in the directory you're trying to add; this
3445 will let the
"add" command complete. If you're using Unix, this
3446 command will delete
<tt>.svn
</tt> directories
3447 under
<tt>dir
</tt>:
</p>
3449 find dir -type d -name .svn -exec rm -rf {} \;
3451 <p>However, you should ask yourself
<em>why
</em> you made this copy;
3452 and you should ensure that by adding this directory, you won't be
3453 making an unwanted copy of it in your repository.
3458 <div class=
"h3" id=
"slow-private-svnserve" title=
"slow-private-svnserve">
3459 <h3>Accessing non-public repositories
3460 via svnserve is really slow sometimes.
</h3>
3462 <p>This often happens when APR is compiled to use
<tt>/dev/random
</tt>
3463 and the server is unable to gather enough entropy. If Subversion is the
3464 only application using APR on the server, you can safely recompile APR
3465 with the
<tt>--with-devrandom=/dev/urandom
</tt> option passed to
3466 <tt>configure
</tt>. This should
<b>not
</b> be done on systems that use
3467 APR for other processes, however, as it could make other services
3472 <div class=
"h3" id=
"ssl-negotiation-error" title=
"ssl-negotiation-error">
3473 <h3>When performing Subversion operations involving a lot of data over
3474 SSL, I get the error
<tt>SSL negotiation failed: SSL error:
3475 decryption failed or bad record mac
</tt>.
</h3>
3477 <p>This can occur due to a problem with OpenSSL
0.9.8. Downgrading to
3478 an older version (or possibly upgrading to a newer version) is known
3479 to fix this issue.
</p>
3483 <div class=
"h3" id=
"broken-subclipse" title=
"broken-subclipse">
3484 <h3>I get an error that says
"This client is too old".
</h3>
3486 You're using both an older (pre-
1.4) version of the Subversion
3487 command-line client, and Subclipse. You recently upgraded Subclipse,
3488 and now your command-line client says
3491 svn: This client is too old to work with working copy
3492 '/path/to/your/working/copy'; please get a newer Subversion client
3495 This happened because Subversion's working-copy format changed
3496 incompatibly
—the new version of Subclipse upgraded your working
3497 copy, so now your command-line program, which is old, cannot read it.
3498 (This problem isn't specific to Subclipse; it would also have happened
3499 if you'd used a command-line client that was
1.4 or newer, along with
3500 your older command-line client.)
3502 The fix is simply to upgrade your command-line client to
1.4 or newer.
3506 <div class=
"h3" id=
"switch-problems" title=
"switch-problems">
3507 <h3>Why doesn't
<tt>svn switch
</tt> work in some cases?
</h3>
3509 <p>In some cases where there are unversioned (and maybe ignored) items
3510 in the working copy,
<tt>svn switch
</tt> can get an error. The switch
3511 stops, leaving the working copy half-switched.
</p>
3513 <p>Unfortunately, if you take the wrong corrective action you can end
3514 up with an unusable working copy. Sometimes with these situations,
3515 the user is directed to do
<tt>svn cleanup
</tt>. But the
<tt>svn
3516 cleanup
</tt> may also encounter an error. See
<a
3517 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=2505">issue
3520 <p>The user can manually remove the directories or files causing
3521 the problem, and then run
<tt>svn cleanup
</tt>, and continue the switch, to
3522 recover from this situation.
</p>
3524 <p>Note that a switch from a
<i>pristine
</i> clean checkout always
3525 works without error. There are three ways of working if you are using
3526 <tt>svn switch
</tt> as part of your development process:
</p>
3530 <li>Fully clean your working copy of unversioned (including ignored)
3531 files before switching.
<br/><b>WARNING! This deletes all unversioned
3532 dirs/files. Be VERY sure that you do not need anything that will be
3537 # Check and delete svn unversioned files:
3538 svn status --no-ignore | grep '^[I?]' | sed 's/^[I?]//'
3539 svn status --no-ignore | grep '^[I?]' | sed 's/^[I?]//' | xargs rm -rf
3545 <li>Keep a
<i>pristine
</i> clean checkout. Update that, then copy it,
3546 and switch the copy when a switch to another branch is desired.
</li>
3548 <li>Live dangerously :).
3549 Switch between branches without cleaning up BUT if you encounter a switch error
3550 know that you have to recover from this properly.
3551 Delete the unversioned files and the directory that the error was reported on.
3552 Then
"svn cleanup" if needed and then resume the switch.
3553 Unless you delete
<em>all
</em> unversioned files, you may have to repeat this
3554 process multiple times.
</li>
3558 <p>Some examples are detailed
3559 <a href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=2505">here in issue
2505</a>.
3560 The problem is that the svn client plays it
3561 safe and doesn't want to delete anything unversioned.
3564 <p>Two specific examples are detailed here to illustrate a problem like this.
3565 There are also other svn switch errors, not covered here, which you
3566 can avoid by switching only from a
<em>pristine
</em> checkout.
</p>
3570 <li>If any directory has been moved or renamed between the branches, then
3571 anything unversioned will cause a problem.
3572 In this case, you'll see this error:
3576 wc/$ svn switch $SVNROOT/$project/branches/$ticket-xxx
3577 svn: Won't delete locally modified directory '
<dir
>'
3578 svn: Left locally modified or unversioned files
3581 <p>Removing all unversioned files, and continuing the switch will recover from this.
</p>
3584 <li>If a temporary build file has ever been added and removed, then a switch
3585 in a repository with that unversioned file (likely after a build) fails.
3586 You'll see the same error:
3590 wc/$ svn switch $SVNROOT/$project/branches/$ticket-xxx
3591 svn: Won't delete locally modified directory '
<dir
>'
3592 svn: Left locally modified or unversioned files
3596 <p>In this case, just removing the unversioned items will not recover.
3597 A cleanup fails, but svnswitch directs you to run
"svn cleanup".
</p>
3601 wc/$ svn switch $SVNROOT/$project/branches/$ticket-xxx
3602 svn: Directory '
<dir
>/.svn' containing working copy admin area is missing
3604 svn: '
<dir
>' is not a working copy directory
3605 wc/$ svn switch $SVNROOT/$project/branches/$ticket-xxx
3606 svn: Working copy '.' locked
3607 svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
3611 <p>Removing the directory (and all other unversioned files, to prevent
3612 "switch" from breaking on a similar error repeatedly), and continuing the switch
3613 will recover from this.
</p>
3618 <p>The TortoiseSVN cleanup error is a bit different. You might encounter this:
3622 Subversion reported an error while doing a cleanup!
3623 <dir
>/
<anotherdir
> is not a working copy directory
3627 <p>In each case here, the
"svn switch" breaks leaving you with a half-switched
3628 working copy.
"svn status" will show items with S for switched items (different
3629 from top directory), ! for directories with problems, and ~ for the files that are
3630 the problem (and with maybe L for locked). Like this:
</p>
3636 S
<switched_things
>
3637 ~
<dir
>/
<thing_that_is_now_unversioned
>
3643 <div class=
"h3" id=
"long-paths" title=
"long-paths">
3644 <h3>In Windows, when doing an update with the command-line client, I
3645 get an error saying
"The system cannot find the path specified"
3646 and suggesting that my working copy might be corrupt. But I can
3647 update with TortoiseSVN just fine. What's going on?
</h3>
3649 <p>A careful examination of the Windows API documentation regarding
<a
3650 href=
"http://msdn2.microsoft.com/en-us/library/aa365247.aspx#maximum_path_length"
3651 >Naming a File
</a> reveals the most common reason why this happens. In
3652 short, you can address significantly longer path names when using the
3653 Unicode versions of the Windows path functions, and providing absolute
3654 path specifiers instead of relative path specifiers. Fortunately, the
3655 Apache Portable Runtime (APR) library that Subversion uses
3656 transparently converts absolute paths (like
3657 <tt>C:\WorkingCopy\file.txt
</tt>) into the form required by the
3658 Windows APIs (
<tt>\\?\C:\WorkingCopy\file.txt
</tt>), and back again.
3659 <em>Unfortunately
</em>, you only get these long-path benefits when
3660 using absolute paths.
</p>
3662 <p>To see if path length is the reason for the problem you're seeing,
3663 try providing an absolute target path to the Subversion command-line
3664 client instead of a relative one (or none at all). In other words,
3665 instead of doing this:
</p>
3669 C:\
> svn up WorkingCopy
3677 C:\
> cd C:\WorkingCopy
3678 C:\WorkingCopy
> svn up
3686 C:\
> svn update C:\WorkingCopy
3690 <p>If the problem goes away, congratulations
— you've hit a
3691 Windows path length limitation. And now you know the workaround.
</p>
3693 <p><strong>Why does this problem not affect TortoiseSVN?
</strong>
3694 Because TortoiseSVN
<em>always
</em> provides absolute paths to the
3695 Subversion APIs.
</p>
3697 <p><strong>Why, then, does the Subversion command-line client not
3698 always convert its input into absolute paths and use those?
</strong>
3699 The Subversion developers have been operating under the principle
3700 that, for reasons of user experience, the display of paths in the
3701 tool's output should match the syntax of the paths provided as input.
3702 And while conversion to an absolute path from a relative one is a
3703 fairly trivial operation, the reverse transformation is fraught with
3704 complexities. (In other words, it's a hard problem not high on our
3710 id=
"working-copy-format-change" title=
"working-copy-format-change">
3711 <h3>I got an error saying
"This client is too old to work with working
3712 copy '...' ". How can I fix it without upgrading Subversion?
</h3>
3714 <p>Sometimes the working copy metadata format changes incompatibly
3715 between minor releases. For example, say you have a working copy
3716 created with Subversion
1.4.4, but one day you decide to try out
3717 Subversion
1.5.0. Afterwards, you attempt to switch back to
1.4.4,
3718 but it doesn't work
— it just gives the above
3721 <p>This is because
1.5.0 upgraded your working copy format to support
3722 some new features (in this case, changelists, the keep-local flag, and
3723 variable-depth directories). Although
1.4.4 doesn't know anything
3724 about these new features, it can at least recognize that the working
3725 copy format has been upgraded to something higher than it can
3728 <p>1.5.0 upgraded the working copy for a good reason: it realizes that
3729 1.4.4 does not know about these new features, and that if
1.4.4 were
3730 to meddle with the working copy metadata now, important information
3731 might be lost, possibly causing corruption (see
<a
3732 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=2961" >issue
3733 #
2961</a>, for example).
</p>
3735 <p>But this automatic upgrade behavior can be annoying, if you just
3736 want to try out a new release of Subversion without installing it
3737 permanently. For this reason, we distribute a script that can
3738 downgrade working copies when doing so is safe:
</p>
3742 href=
"http://svn.collab.net/repos/svn/trunk/tools/client-side/change-svn-wc-format.py"
3743 >http://svn.collab.net/repos/svn/trunk/tools/client-side/change-svn-wc-format.py
</a></p>
3746 <p>Run that script with the
"<tt>--help</tt>" option to see how to use
3747 it. As future versions of Subversion are released, we will try to
3748 keep this FAQ entry up-to-date with potential downgrade scenarios and
3749 their implications.
</p>
3754 id=
"relocation-against-local-symbol"
3755 title=
"relocation-against-local-symbol">
3756 <h3>I got an error saying
"relocation R_X86_64_32 against `a local symbol'
3757 can not be used when making a shared object" when building the Neon
3758 library on
64-bit Linux.
</h3>
3760 <p>The Neon library, used for communication between a Subversion server and
3761 client over HTTP, is usually built as a static library. But it is
3762 subsequently linked into a different shared library. This causes an error
3763 during the build process on
64-bit AMD systems similar to this:
3767 subversion-
1.4.6/neon/src/.libs/libneon.a(ne_request.o): relocation R_X86_64_32
3768 against `a local symbol' can not be used when making a shared object;
3769 recompile with -fPIC
3770 /home/jrandom/subversion/subversion-
1.4.6/neon/src/.libs/libneon.a: could not
3771 read symbols: Bad value
3776 <a href=
"http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=119669">
3777 thread
</a> on the developers' list about this.
</p>
3779 <p>The solution is to supply the
"--enable-shared" option to Subversion's
3780 configure script.
</p>
3786 <div class=
"h2" id=
"developer-questions" title=
"developer-questions">
3787 <h2>Developer questions:
</h2>
3790 <div class=
"h3" id=
"ramdisk-tests" title=
"ramdisk-tests">
3791 <h3>How do I run the regression tests in a
3794 <p>Test execution can be dramatically sped up by keeping Subversion
3795 test data on a RAM disk. On a Linux system, you can mount a RAM disk
3796 on the fly with the command:
</p>
3799 <div><code>mount -t tmpfs tmpfs
3800 /path/to/src/subversion/tests/cmdline/svn-test-work
3801 -o uid=$USER,mode=
770,size=
32m
</code></div>
3804 <p>Or, for a more permanent solution, add lines like the following in
3805 your
<code>/etc/fstab
</code> file:
</p>
3808 <div><code>tmpfs /path/to/src/svn/subversion/tests/cmdline/svn-test-work
3809 tmpfs defaults,user,noauto,exec,size=
32m
</code></div>
3812 <p>The minimum required size for testing ramdisk is approximately
700MB.
3813 However, flagging your test targets for cleanup dramatically reduces
3814 the space requirements (as shown in the example configuration above),
3815 and thus your memory usage. Cleanup means more I/O, but since test
3816 data is in-memory, there will be no performance degradation. Example:
</p>
3818 <blockquote><div><code>
3819 make check CLEANUP=true
3820 </code></div></blockquote>
3822 <p>See
<a href=
"http://svn.haxx.se/dev/archive-2003-02/0068.shtml"
3823 >http://svn.haxx.se/dev/archive-
2003-
02/
0068.shtml
</a> for the
3824 original authoritative discussion on use of RAM disks.
</p>
3829 <div class=
"h3" id=
"dynamic-exe-debugging" title=
"dynamic-exe-debugging">
3831 <h3>How do I run a debugger on dynamic Subversion binaries without
3832 having to install them?
</h3>
3834 <p>Before the
<code>make install
</code> step on unix-y systems,
3835 dynamically built
"executables" in a Subversion source tree are
3836 actually libtool-generated shell scripts which re-link and run the
3837 real binary. As shown below, this complicates debugging:
</p>
3840 <div><code>subversion$ gdb subversion/svn/svn
</code></div>
3841 <div><code>...
"/path/to/subversion/subversion/svn/svn": not in
3842 executable format: File format not recognized
</code></div>
3845 <p>While this can be worked around by building using the
3846 <code>--disable-shared
</code> argument to configure to statically link
3847 the binaries, or installing them and pointing your debugger at the
3848 installed version, it's often necessary or more expedient to be able
3849 to debug them right within your source tree.
</p>
3851 <p>To do so, edit the last
<code>exec
</code> statement in the shell
3852 script to run the real binary in your debugger. With gdb, this
3853 amounts to replacing
<code>exec
"$progdir/$progname"</code> with
3854 <code>exec gdb --args
"$progdir/$progname"</code>.
</p>
3856 <p>This trick is also very useful when applied to the
3857 libtool-generated shell scripts for the white box tests.
</p>
3862 <div class=
"h3" id=
"avoiding-compiler-inlining"
3863 title=
"avoiding-compiler-inlining">
3865 <h3>How do I run a debugger on Subversion binaries without compiler
3866 inlining obfuscating the source?
</h3>
3868 <p>By default, gcc will often optimize away private variables and
3869 functions, inlining the associated operations. This can complicate
3870 stepping through the code in a debugger.
</p>
3872 <p>Work around this by turning off optimization during the
3873 <code>make
</code> step on unix-y systems:
</p>
3876 <div><code>subversion$ make EXTRA_CFLAGS=-O0
</code></div>
3879 <p>(That's
"dash ohh zero".) Alternately, you can make this change
3880 more permanent by running
<code>configure
</code> as follows:
</p>
3883 <div><code>subversion$ ./configure --enable-debug
</code></div>
3886 <p>For a production install, remember to undo this operation before
3887 installing Subversion from source, by re-running
<code>make
</code> or
3888 <code>configure
</code> without the extra flag.
</p>
3895 <div class=
"h2" id=
"references" title=
"references">
3896 <h2>References:
</h2>
3899 <div class=
"h3" id=
"http-methods" title=
"http-methods">
3900 <h3>What are all the HTTP methods Subversion
3903 <p>The Subversion client speaks a subset the WebDAV/DeltaV protocol to
3904 the mod_dav_svn server module. The short answer is:
</p>
3907 OPTIONS, PROPFIND, GET, REPORT,
3908 MKACTIVITY, PROPPATCH, PUT, CHECKOUT, MKCOL,
3909 MOVE, COPY, DELETE, LOCK, UNLOCK, MERGE
3912 <p>The details of the protocol are documented here:
</p>
3914 <a href=
"http://svn.collab.net/repos/svn/trunk/notes/webdav-protocol">http://svn.collab.net/repos/svn/trunk/notes/webdav-protocol
</a>
3921 <div class=
"h3" id=
"bikeshed" title=
"bikeshed">
3922 <h3>What's a 'bikeshed'?
</h3>
3924 <p>See Poul-Henning Kamp's post to freebsd-hackers:
<a href=
"http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#BIKESHED-PAINTING">http://www.freebsd.org/doc/en_US.ISO8859-
1/books/faq/misc.html#BIKESHED-PAINTING
</a>.
3930 <div class=
"h3" id=
"pronounce" title=
"pronounce">
3931 <h3>How do you pronounce
"Subversion"?
</h3>
3933 <p>Jim Blandy, who gave Subversion both its name and repository
3934 design, pronounces
"Subversion" <a href=
"http://svn.collab.net/repos/svn-committers/trunk/sounds/pronunciation/index.html">"Subversion"</a>.
3940 <div class=
"h3" id=
"baton" title=
"baton">
3941 <h3>What's a 'baton'?
</h3>
3943 <p>Throughout Subversion's source code there are many references to
3944 'baton' objects. These are just
<tt>void *
</tt> datastructures that
3945 provide context to a function. In other APIs, they're often called
3946 <tt>void *ctx
</tt> or
<tt>void *userdata
</tt> Subversion
3947 developers call the structures
"batons" because they're passed around
3953 <div class=
"h3" id=
"def-wedged-repository" title=
"def-wedged-repository">
3954 <h3>What do you mean when you say that
3955 repository is 'wedged'?
</h3>
3957 <p>wedged repository:
</p>
3960 <p>A Subversion repository consists of two different internal parts, a
3961 working compartment and a storage compartment. A wedged repository is
3962 a repository where the working compartment is unaccessible for some
3963 reason, but the storage compartment is intact. Therefore, a wedged
3964 repository has not suffered any loss of data, but the working
3965 compartment has to be corrected before you can access the
3966 repository. See
<a href=
"#stuck-bdb-repos">this
</a> entry for details
3970 <p>corrupted repository:
</p>
3973 <p>A corrupted Subversion repository is a repository where the storage
3974 compartment has been damaged, and therefore there is some degree of
3975 real data loss in the repository.
</p>
3978 <p>You might also like to check The Jargon File's definition for
3979 <a href=
"http://catb.org/~esr/jargon/html/W/wedged.html">'wedged'
</a>.