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>
258 <h4>Developer questions:
</h4>
260 <li><a href=
"#ramdisk-tests">How do I run the regression tests in a
262 <li><a href=
"#dynamic-exe-debugging">How do I run a debugger on
263 dynamic Subversion binaries without having to install
265 <li><a href=
"#avoiding-compiler-inlining">How do I run a debugger on
266 Subversion binaries without compiler inlining obfuscating the
272 <li><a href=
"#http-methods">What are all the HTTP methods Subversion
274 <li><a href=
"#bikeshed">What's a 'bikeshed'?
</a></li>
275 <li><a href=
"#pronounce">How do you pronounce
"Subversion"?
</a></li>
276 <li><a href=
"#baton">What's a 'baton'?
</a></li>
277 <li><a href=
"#def-wedged-repository">What do you mean when you say that
278 repository is 'wedged'?
</a></li>
286 <div class=
"h2" id=
"general-questions" title=
"general-questions">
287 <h2>General questions:
</h2>
290 <div class=
"h3" id=
"why" title=
"why">
291 <h3>Why does this project exist?
</h3>
293 <p>To take over the CVS user base. Specifically, we're writing a new
294 version control system that is very similar to CVS, but fixes many
295 things that are broken. See our front page.
</p>
300 <div class=
"h3" id=
"collab" title=
"collab">
301 <h3>Is Subversion proprietary? I heard that it
302 belongs to CollabNet.
</h3>
304 <p>No, Subversion is open source / free software. CollabNet pays the
305 salaries of several full-time developers, and holds the copyright on
306 the code, but that copyright is
<a
307 href=
"http://subversion.tigris.org/license-1.html">an
308 Apache/BSD-style license
</a>
309 which is fully compliant with the
<a
310 href=
"http://www.debian.org/social_contract#guidelines">Debian Free
311 Software Guidelines
</a>. In other words, you are free to download,
312 modify, and redistribute Subversion as you please; no permission from
313 CollabNet or anyone else is required.
</p>
318 <div class=
"h3" id=
"stable" title=
"stable">
319 <h3>Is Subversion stable enough for me to use for my
322 <p>Yes, absolutely. It's ready for prime-time production.
</p>
324 <p>Subversion has been in development since
2000, and became
325 self-hosting after one year. A year later when we declared
"alpha",
326 Subversion was already being used by dozens of private developers and
327 shops for real work. After that, it was two more years of bugfixing
328 and stabilization until we reached
1.0. Most other projects probably
329 would have called the product
"1.0" much earlier, but we deliberately
330 decided to delay that label as long as possible. We were aware that
331 many people were waiting for a
1.0 before using Subversion, and had
332 very specific expectations about the meaning of that label. So we
333 stuck to that same standard.
</p>
339 <div class=
"h3" id=
"interop" title=
"interop">
340 <h3>What is Subversion's client/server
341 interoperability policy?
</h3>
343 <p>The client and server are designed to work as long as they aren't
344 more than one major release version apart. For example, any
1.X
345 client will work with a
1.Y server. However, if the client and
346 server versions don't match, certain features may not be available.
</p>
348 <p>See the client/server interoperability policy is documented in the
349 "Compatibility" section of the
<a href=
"hacking.html">Hacker's Guide
350 to Subversion
</a>.
</p>
355 <div class=
"h3" id=
"portability" title=
"portability">
356 <h3>What operating systems does Subversion run
359 <p>All modern flavors of Unix, Win32, BeOS, OS/
2, MacOS X.
</p>
361 <p>Subversion is written in ANSI C and uses APR, the
<a
362 href=
"http://apr.apache.org">Apache Portable Runtime
</a> library, as a
363 portability layer. The Subversion client will run anywhere APR runs,
364 which is most places. The Subversion server (i.e., the repository
365 side) is the same, except that it will not host a Berkeley DB repository
366 on Win9x platforms (Win95/Win98/WinME), because Berkeley DB has
367 shared-memory segment problems on Win9x. FSFS repositories
368 (introduced in version
1.1) do not have this restriction; however, due
369 to a limitation in Win9x's file-locking support, they also don't work
372 <p>To reiterate, the Subversion client can be run on any platform
373 where APR runs. The Subversion server can also be run on any
374 platform where APR runs, but cannot host a repository on
375 Win95/Win98/WinMe.
</p>
380 <div class=
"h3" id=
"filesystem" title=
"filesystem">
381 <h3>What's all this about a new filesystem? Is
384 <p>No. The
"Subversion Filesystem" is not a kernel-level filesystem
385 that one would install in an operating system. Instead, it is
386 Subversion's repository interface, which is a
"versioned filesystem"
387 in the sense that it stores a directory tree whose state is remembered
388 from revision to revision. Writing programs to access the repository
389 is similar to writing programs that use other filesystem APIs. The
390 main difference is that this particular filesystem doesn't lose data
391 when written to; old tree states can be retrieved as easily the most
397 <div class=
"h3" id=
"server-requirements" title=
"server-requirements">
398 <h3>What kind of hardware do I need to run a Subversion server?
</h3>
400 <p>Server requirements depend on many factors, such as number of
401 users, frequency of commits and other server related operations,
402 repository size, and the load generated by custom repository hooks.
403 When using Apache, it is likely that Apache itself will be the biggest
404 factor in memory usage. See
405 <a href=
"http://subversion.tigris.org/servlets/BrowseList?list=users&by=thread&from=330941"
406 >this discussion
</a> on the mailing list for some concrete
409 <p>Remember to take in account other applications running on the same
410 server; for example, repository browsers use resources too,
411 independently of Subversion itself.
</p>
413 <p>In general, you can expect to need much less server memory than you
414 would for comparable CVS repositories.
</p>
419 <div class=
"h3" id=
"apache-extension" title=
"apache-extension">
420 <h3>I heard that Subversion is an Apache
421 extension? What does it use for servers?
</h3>
423 <p>No. Subversion is a set of libraries. It comes with a
424 command-line client that uses them. There are two different
425 Subversion server processes: either
<b>svnserve
</b>, which is small
426 standalone program similar to cvs pserver, or Apache
<b>httpd-
2.0</b>
427 using a special
<b>mod_dav_svn
</b> module.
<b>svnserve
</b> speaks a
428 custom protocol, while
<b>mod_dav_svn
</b> uses WebDAV as its network
430 href=
"http://svnbook.red-bean.com/html-chunk/ch06.html">chapter
6</a>
431 in the Subversion book to learn more.
</p>
437 <div class=
"h3" id=
"need-apache" title=
"need-apache">
438 <h3>Does this mean I have to set up Apache to
441 <p>The short answer: no.
</p>
443 <p>The long answer: if you just want to access a repository, then you
444 only need to build a Subversion client. If you want to
<b>host
</b> a
445 networked repository, then you need to set up either Apache2 or an
446 "svnserve" server.
</p>
448 <p>For more details about setting up a network accessible Subversion
450 href=
"http://svnbook.red-bean.com/html-chunk/ch06.html">chapter
6</a>
451 in the Subversion book.
</p>
457 <div class=
"h3" id=
"multiple-apachim" title=
"multiple-apachim">
458 <h3>I run Apache
1.x right now, and can't
459 switch to Apache
2.0 just to serve Subversion repositories.
460 Does that mean I can't run a Subversion server?
</h3>
462 <p>No, you can run
<b>svnserve
</b> as a Subversion server. It works
465 <p>If you want WebDAV and all the other
"goodies" that come with the
466 Apache server, then yes, you'll need Apache
2.0. It's always an
467 option to run Apache
2.0 on a different port while continuing to run
468 Apache
1.x on port
80. Different versions of Apache can happily
469 coexist on the same machine. Just change the
<tt>Listen
</tt>
470 directive in httpd.conf from
"<tt>Listen 80</tt>" to
471 "<tt>Listen 8080</tt>" or whatever port number you want, and make
472 sure to specify that port when you publish your repository URL (e.g.,
473 <tt>http://svn.mydomain.com:
8080/repos/blah/trunk/
</tt>).
</p>
478 <div class=
"h3" id=
"feature-x" title=
"feature-x">
479 <h3>Why don't you do X, just like SCM system Y?
</h3>
481 <p>We aren't attempting to break new ground in SCM systems, nor are we
482 attempting to imitate all the best features of every SCM system out
483 there. We're trying to replace CVS. See the first question.
</p>
488 <div class=
"h3" id=
"globalrev" title=
"globalrev">
489 <h3>Why does the entire repository share the
490 same revision number? I want each of my projects to have their
491 own revision numbers.
</h3>
493 The global revision number attached to the repository as a whole is
494 meaningless from a user's perspective. It's an internal mechanism that
495 accomplishes the goal of the underlying schema design. It just so
496 happens to be exposed so that the user's interface can sometimes be a
497 little more convenient than always having to type obnoxiously long
502 The revision number is only relevant to the repository, and user
503 convenience. It has
<b>no
</b> impact on any other factor of what you
504 store in the repository. Repository revision number bumps aren't
505 nearly useful enough to be an accurate indication of the real rate of
506 change of a given code base. There are other more complicated ways to
507 get a much better picture of a code-base's rate of change.
513 <div class=
"h3" id=
"changesets" title=
"changesets">
514 <h3>Does Subversion have Changesets?
</h3>
516 <p>The question is a bit loaded, because everyone seems to have a
517 slightly different definition of
"changeset", or a least a slightly
518 different expectation of what it means for a version control system to
519 have
"changeset features".
</p>
521 <p>For the purposes of this discussion, here's a simple definition of
522 changeset: it's a collection of changes with a unique name. The
523 changes might include textual edits to file contents, modifications to
524 tree structure, or tweaks to metadata. In more common speak, a
525 changeset is just a patch with a name you can refer to.
</p>
527 <p>Subversion manages versioned trees as first order objects (the
528 repository is an array of trees), and the changesets are things that
529 are derived (by comparing adjacent trees.) Systems like Arch or
530 Bitkeeper are built the other way around: they're designed to manage
531 changesets as first order objects (the repository is a bag of
532 patches), and trees are derived by composing sets of patches
535 <p>Neither philosophy is better in absolute terms: the debate goes
536 back at least
30 years. The two designs are better or worse for
537 different types of software development. We're not going to discuss
538 that here. Instead, here's an explanation of what you can do with
541 <p>In Subversion, a global revision number 'N' names a tree in the
542 repository: it's the way the repository looked after the Nth commit.
543 It's also the name of an implicit changeset: if you compare tree N
544 with tree N-
1, you can derive the exact patch that was committed.
</p>
546 <p>For this reason, it's easy to think of
"revision N" as not just a
547 tree, but a changeset as well. If you use an issue tracker to manage
548 bugs, you can use the revision numbers to refer to particular patches
549 that fix bugs -- for example,
"this issue was fixed by revision 9238."
550 Somebody can then run 'svn log -r9238' to read about the exact
551 changeset which fixed the bug, and run 'svn diff -r9237:
9238' to see
552 the patch itself. And svn's merge command also uses revision numbers.
553 You can merge specific changesets from one branch to another by naming
554 them in the merge arguments: 'svn merge -r9237:
9238 branchURL' would
555 merge changeset #
9238 into your working copy.
</p>
557 <p>This is nowhere near as complicated as a system built around
558 changesets as primary objects, but it's still a vast convenience over
564 <div class=
"h3" id=
"release" title=
"release">
565 <h3>When's the next release?
</h3>
567 <p>See our status page,
<a
568 href=
"http://subversion.tigris.org/project_status.html">
569 http://subversion.tigris.org/project_status.html
</a>.
</p>
574 <div class=
"h3" id=
"symlinks" title=
"symlinks">
575 <h3>Does Subversion support symlinks?
</h3>
577 <p>Subversion
1.1 (and later) has the ability to put a symlink under
578 version control, via the usual
<tt>svn add
</tt> command.
</p>
580 <p>Details: the Subversion repository has no internal concept of a
581 symlink. It stores a
"versioned symlink" as an ordinary file with an
582 'svn:special' property attached. The svn client (on unix) sees the
583 property and translates the file into a symlink in the working copy.
584 Win32 has no symlinks, so a win32 client won't do any such
585 translation: the object appears as a normal file.
</p>
590 <div class=
"h3" id=
"logo" title=
"logo">
591 <h3>I need a high resolution version of the Subversion logo,
592 where can I get it?
</h3>
594 <p>Vectorized versions of the Subversion logo are available in the
<a
595 href=
"http://svn.collab.net/repos/svn/trunk/www">logo directory of the www
596 tree
</a> of the
<a href=
"http://svn.collab.net/repos/svn/trunk">Subversion
599 <p>Specifically, an
<a
600 href=
"http://svn.collab.net/repos/svn/trunk/www/logo/subversion_logo.eps">EPS
601 version
</a>, as well as an
<a
602 href=
"http://svn.collab.net/repos/svn/trunk/www/logo/subversion_logo.ai">Adobe
603 Illustrator document
</a> are available.
</p>
608 <div class=
"h3" id=
"more-information" title=
"more-information">
609 <h3>I have other questions. Where can I get more information?
</h3>
611 <p>If you don't find an answer after browsing this FAQ, there are several
612 other resources available:
</p>
614 <li><a href=
"http://svnbook.red-bean.com">The Subversion Book
</a></li>
615 <li><a href=
"http://subversion.tigris.org/servlets/ProjectMailingListList">The
616 Subversion Users mailing list
</a> (
<a
617 href=
"mailto:users@subversion.tigris.org"
618 >users@subversion.tigris.org
</a>)
619 — note that the list is
<a href=
"#moderation">moderated
</a>, so
620 there may be a delay before your post shows up
</li>
621 <li><a href=
"http://svn.haxx.se/users/">The Subversion Users list
623 <li>IRC on channel #svn on irc.freenode.net
</li>
624 <li><a href=
"http://www.svnforum.org/">svnforum.org
</a>, an unofficial
625 web-based forum with approximately the same target audience as the mailing
632 <div class=
"h3" id=
"moderation" title=
"moderation">
633 <h3>Why isn't my post showing up on the mailing list?
</h3>
635 <p>Our mailing lists are moderated to prevent spam from getting
636 through, so your first post to any list may be delayed, until the
637 moderator has a chance to let it through. Once that post is allowed
638 through, all subsequent posts from the same address are automatically
639 approved, so you should experience no more delay. Of course, if your
640 sending address changes, then you'll have to go through moderation
648 <div class=
"h2" id=
"how-to" title=
"how-to">
653 <div class=
"h3" id=
"co-svn" title=
"co-svn">
654 <h3>How do I check out the Subversion code?
</h3>
655 <p>Use the Subversion client:
</p>
657 $ svn co http://svn.collab.net/repos/svn/trunk subversion
659 <p>That will check out a copy of the Subversion source tree into a
660 directory named subversion on your local machine.
</p>
665 <div class=
"h3" id=
"repository" title=
"repository">
666 <h3>How do I create a repository? How do I
667 import data into it?
</h3>
670 href=
"http://svn.collab.net/repos/svn/trunk/README">
671 http://svn.collab.net/repos/svn/trunk/README
</a>; specifically, look
672 at section IV, the
"Quickstart Guide".
</p>
674 <p>For even more detail, read chapter
5 in
<a
675 href=
"http://svnbook.red-bean.com">The Subversion Book
</a>.
</p>
681 <div class=
"h3" id=
"cvs2svn" title=
"cvs2svn">
682 <h3>How do I convert an existing CVS repository
683 into a Subversion repository?
</h3>
685 <p>Members of the Subversion development community created and
686 maintain a tool called cvs2svn. You can find it at
<a
687 href=
"http://cvs2svn.tigris.org/">http://cvs2svn.tigris.org/
</a>. Be
689 href=
"http://cvs2svn.tigris.org/cvs2svn.html">cvs2svn documentation
</a>.
692 <p>If cvs2svn.py does not work for you, (e.g. your repository
693 causes it to crash, or it doesn't deal with branches and tags
694 quite how you would like), there are at least two other
695 conversion utilities you can try. These have different features
696 (and possibly different bugs):
</p>
701 href=
"http://public.perforce.com/public/revml/index.html">VCP
</a>
702 written by Chia-liang Kao can be found on
<a
703 href=
"http://search.cpan.org/perldoc?VCP::Dest::svk">CPAN
</a>.
</li>
705 <li>refinecvs written by Lev Serebryakov is at
<a
706 href=
"http://lev.serebryakov.spb.ru/refinecvs/"
707 >http://lev.serebryakov.spb.ru/refinecvs/
</a>.
</li>
711 <p>See also the
<a href=
"links.html">Subversion links
</a>
718 <div class=
"h3" id=
"proxy" title=
"proxy">
719 <h3>What if I'm behind a proxy?
</h3>
721 <p>The Subversion client can go through a proxy, if you configure it
722 to do so. First, edit your
"servers" configuration file
723 to indicate which proxy to use. The files location depends on your
724 operating system. On Linux or Unix it is located in the directory
725 "~/.subversion". On Windows it is in
"%APPDATA%\Subversion". (Try
726 "echo %APPDATA%", note this is a hidden directory.)
</p>
728 <p>There are comments in the file explaining what to do. If you don't
729 have that file, get the latest Subversion client and run any command;
730 this will cause the configuration directory and template files to be
733 <p>Next, you need to make sure the proxy server itself supports all
734 the HTTP methods Subversion uses. Some proxy servers do not support
735 these methods by default: PROPFIND, REPORT, MERGE, MKACTIVITY,
736 CHECKOUT. In general, solving this depends on the particular proxy
737 software. For Squid, the config option is
</p>
740 # TAG: extension_methods
741 # Squid only knows about standardized HTTP request methods.
742 # You can add up to
20 additional
"extension" methods here.
746 extension_methods REPORT MERGE MKACTIVITY CHECKOUT
749 <p>(Squid
2.4 and later already knows about PROPFIND.)
</p>
751 <p>See also
"<a href="#http-methods
">What are all the HTTP methods
752 Subversion uses?</a>" for advice on additional HTTP methods to allow
753 through your proxy.
</p>
755 <p>If it's difficult or impossible to get the proxy to allow
756 Subversion traffic, but you want to check out the Subversion sources,
757 you may be able to go around the proxy. Some proxies that filter port
758 80 nevertheless allow anything on port
81. For this reason, the
759 <tt>svn.collab.net
</tt> repository server listens on port
81 as well
760 as on port
80. Try:
</p>
763 svn checkout http://svn.collab.net:
81/repos/svn/trunk subversion
766 <p>and maybe the proxy will let you through. Another strategy is to
767 attempt the checkout over SSL, which many proxies allow:
</p>
770 svn checkout https://svn.collab.net/repos/svn/trunk subversion
773 <p>Of course, your svn client will have to have been built with ssl
774 support; just pass
<tt>--with-ssl
</tt> to Subversion's
775 <tt>./configure
</tt> script. You can check to see whether the 'https'
776 scheme is supported by running
<tt>svn --version
</tt>.
</p>
781 <div class=
"h3" id=
"paranoid" title=
"paranoid">
782 <h3>My admins don't want me to have a HTTP server for
783 Subversion. What can I do if I still want remote usage?
</h3>
785 <p>A simple option is to use the
<b>svnserve
</b> server instead of
787 href=
"http://svnbook.red-bean.com/html-chunk/ch06.html">chapter
6</a>
788 in the Subversion book for details.
</p>
790 <p>However, if your admins don't want you to run Apache, it's very
791 likely they don't want you to run a custom server process on port
3690
792 either! So the rest of this answer assumes that your admins
793 <i>are
</i> okay with you using an existing SSH infrastructure.
</p>
795 <p>If you previously used CVS, you may have used SSH to login to the
796 CVS server. The ra_svn Subversion access method is the equivalent way
797 of doing this with Subversion. Just use the
"svn+ssh" prefix to your
798 Subversion repository URL.
</p>
800 $ svn checkout svn+ssh://your.domain.com/full/path/to/repository
803 <p>This makes your SSH program launch a private 'svnserve' process on
804 the remote box, which accesses the repository as your UID and tunnels
805 the information back over the encrypted link.
</p>
807 <p>However, another solution that can be used instead is to leverage
808 SSH port forwarding to connect to the protected server via ra_dav.
809 You would connect via SSH to a machine behind your firewall that can
810 access your Subversion server. Note that this SSH server does
811 <b>not
</b> have to be the same as where Subversion is installed. It
812 can be, but it doesn't have to be.
</p>
814 <p>Then, you create a local port forward that connects to the HTTP
815 server that houses your Subversion repository. You would then
816 'connect' to the Subversion repository via this local port. Then,
817 the request will be sent 'tunneled' via SSH server to your Subversion
820 <p>An example: a Subversion ra_dav setup is behind your company firewall
821 at
10.1.1.50 (call it svn-server.example.com). Your company allows SSH
822 access via publicly accessible ssh-server.example.com. Internally, you
823 can access the Subversion repository via
824 http://svn-server.example.com/repos/ours.
</p>
826 <p><i>Example
</i>: client connecting to ssh-server with port-forwarding
827 and checking out via the port forward
</p>
830 % ssh -L
8888:svn-server.example.com:
80 me@ssh-server.example.com
831 % svn checkout http://localhost:
8888/repos/ours
834 <p>Note that your svn-server.example.com could also have its httpd
835 instance running on an unprivileged port by a non-trusted user. This
836 will allow your Subversion server not to require root access.
</p>
838 <!-- Can you use svn switch to switch your WC between your internal and
839 external Subversion server? I think so. -->
841 <p>Joe Orton notes
</p>
843 The server is sensitive to the hostname used in the Destination header
844 in MOVE and COPY requests, so you have to be a little careful here - a
845 "ServerAlias localhost" may be required to get this working properly.
848 <p>Some links on SSH port forwarding
</p>
851 <li><a href=
"http://www.onlamp.com/pub/a/onlamp/excerpt/ssh_11/index3.html"
852 >http://www.onlamp.com/pub/a/onlamp/excerpt/ssh_11/index3.html
</a></li>
853 <li><a href=
"http://csociety.ecn.purdue.edu/~sigos/projects/ssh/forwarding/"
854 >http://csociety.ecn.purdue.edu/~sigos/projects/ssh/forwarding/
</a></li>
855 <li><a href=
"http://www.zip.com.au/~roca/ttssh.html">TTSSH: A Win32 SSH client capable of port forwarding
</a></li>
861 <div class=
"h3" id=
"multi-proj" title=
"multi-proj">
862 <h3>How do I manage several different projects under Subversion?
</h3>
864 <p>It depends upon the projects involved. If the projects are
865 related, and are likely to share data, then it's best to create one
866 repository with several subdirectories like this:
</p>
868 $ svnadmin create /repo/svn
869 $ svn mkdir file:///repo/svn/projA
870 $ svn mkdir file:///repo/svn/projB
871 $ svn mkdir file:///repo/svn/projC
874 <p>If the projects are completely unrelated, and not likely to share data
875 between them, then it's probably best to create separate and unrelated
879 $ svnadmin create /repo/svn/projA
880 $ svnadmin create /repo/svn/projB
881 $ svnadmin create /repo/svn/projC
884 The difference between these two approaches is this (as explained by
885 Ben Collins-Sussman
<sussman@collab.net
>):
</p>
889 In the first case, code can easily be copied or moved around
890 between projects, and the history is preserved. ('svn cp/mv'
891 currently only works within a single repository.)
894 Because revision numbers are repository-wide, a commit to any
895 project in the first case causes a global revision bump. So it
896 might seem a bit odd if somebody has 'projB' checked out, notices
897 that
10 revisions have happened, but projB hasn't changed at
898 all. Not a big deal, really. Just a little weird at first.
899 This used to happen to svn everytime people committed to
900 rapidsvn, when rapidsvn was in the same repository. :-)
903 The second case might be easier to secure; it's easier to insulate
904 projects from each other (in terms of users and permissions)
905 using Apache's access control. In the
1st case, you'll need a
906 fancy hook script in the repository that distinguishes projects
907 (
"is this user allowed to commit to this particular subdir?") Of
908 course, we already have such a script, ready for you to use.
915 <div class=
"h3" id=
"multi-merge" title=
"multi-merge">
916 <h3>How do I merge two completely separate repositories?
</h3>
918 <p>If you don't care about retaining all the history of one of the
919 repositories, you can just create a new directory under one project's
920 repository, then import the other.
</p>
922 <p>If you care about retaining the history of both, then you can use
923 'svnadmin dump' to dump one repository, and 'svnadmin load' to load it into
924 the other repository. The revision numbers will be off, but you'll
925 still have the history.
</p>
927 <p>Peter Davis
<peter@pdavis.cx
> also explains a method using svn's
928 equivalent to CVS modules:
</p>
931 <p>As long as the merging takes place in separate directory
932 trees, you can use svn's version of CVS modules.
</p>
934 <p>Set the
<em>svn:externals
</em> property on a directory to checkout
935 directories from other repositories whenever the original
936 directory is checked out. The repository remains separate,
937 but in the working copy it appears that they have been merged.
938 If you commit to the imported directory, it will affect the
939 external repository.
</p>
941 <p>The merge isn't completely clean: the import only affects
942 working copies, so you won't be able to use a URL in the first
943 repository to access modules imported from the second. They
944 remain separate URLs.
</p>
947 <p>See also
<a href=
"links.html#misc_utils">miscellaneous utilities
</a>
948 for helpful tools to select and reorder revisions when merging
949 several repositories, especially the
950 <a href=
"http://www.coelho.net/svn-merge-repos.html">svn-merge-repos.pl
</a>
951 perl script for basic operations and the
952 <a href=
"http://svn.borg.ch/svndumptool/">SvnDumpTool
</a> python classes
953 for advanced reorganisations.
</p>
958 <div class=
"h3" id=
"nfs" title=
"nfs">
959 <h3>Should I store my repository / working copy on a NFS
962 <p>If you are using a repository with the Berkeley DB back end
963 (default for repositories created with Subversion
1.0 and
1.1, not the
964 default thereafter), we recommend
<i>not
</i> storing the repository on
965 a remote filesystem (for example, NFS). While Berkeley DB databases
966 and log files can be stored on remote filesystems, the Berkeley DB
967 shared region files cannot be stored on a remote filesystem, so the
968 repository may be safely accessed by only a single filesystem client,
969 and not all Subversion functionality will be available to even that
972 <p>If you are using the
<a
973 href=
"http://svn.collab.net/repos/svn/trunk/notes/fsfs">FSFS
</a>
974 repository back end, then storing the repository on a modern NFS
975 server (i.e., one that supports locking) should be fine.
</p>
977 <p>Working copies can be stored on NFS (one common scenario is when
978 your home directory is on a NFS server). On Linux NFS servers, due to
979 the volume of renames used internally in Subversion when checking out
980 files, some users have reported that 'subtree checking' should be
981 disabled (it's enabled by default). Please see
<a
982 href=
"http://nfs.sourceforge.net/nfs-howto/server.html" >NFS Howto
983 Server Guide
</a> and
<b>exports(
5)
</b> for more information on how to
984 disable subtree checking.
</p>
986 <p>We've had at least one report of working copies getting wedged
987 after being accessed via SMB. The server in question was running a
988 rather old version of Samba (
2.2.7a). The problem didn't recur with a
989 newer Samba (
3.0.6).
</p>
994 <div class=
"h3" id=
"bdblogs" title=
"bdblogs">
995 <h3>Why is my repository taking up so much disk space?
</h3>
997 <p>The repository stores all your data in a Berkeley DB
"environment"
998 in the repos/db/ subdirectory. The environment contains a collection
999 of tables and bunch of logfiles (log.*). Berkeley DB journals all
1000 changes made to the tables, so that the tables can be recovered to a
1001 consistent state in case of interruptions (
<a
1002 href=
"#bdb-recovery">more info
</a>).
</p>
1004 <p>The logfiles will grow forever, eating up disk space, unless you,
1005 (as the repository administrator) do something about it. At any given
1006 moment, Berkeley DB is only using a few logfiles actively (see
<a
1007 href=
"http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=15194"
1008 >this post
</a> and its associated thread); the rest can be safely
1009 deleted. If you keep all the logfiles around forever, then in theory
1010 Berkeley DB can replay every change to your repository from the day it
1011 was born. But in practice, if you're making backups, it's probably
1012 not worth the cost in disk space.
</p>
1014 <p>Use
<code>svnadmin
</code> to see
1015 which log files can be deleted. You may want a cron job to do this.
</p>
1018 $ svnadmin list-unused-dblogs /repos
1019 /repos/db/log
.000003
1020 /repos/db/log
.000004
1023 $ svnadmin list-unused-dblogs /repos | xargs rm
1024 # disk space reclaimed!
1027 <p>You could instead use Berkeley DB's
<code>db_archive
</code> command:
</p>
1030 $ db_archive -a -h /repos/db | xargs rm
1031 # disk space reclaimed!
1034 <p>See also
<code>svnadmin hotcopy
</code> or
<code>hotbackup.py
</code>.
</p>
1036 <p><strong>Note:
</strong> If you use Berkeley DB
4.2, Subversion will
1037 create new repositories with automatic log file removal enabled. You
1038 can change this by passing the
<code>--bdb-log-keep
</code> option to
1039 <code>svnadmin create
</code>. Refer to the section about the
<a
1040 href=
"http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_set_flags.html#DB_LOG_AUTOREMOVE">
1041 <code>DB_LOG_AUTOREMOVE
</code></a> flag in the Berkeley DB manual.
</p>
1046 <div class=
"h3" id=
"reposperms" title=
"reposperms">
1047 <h3>How do I set repository
1048 permissions correctly?
</h3>
1050 <p>Try to have as
<em>few
</em> users access the repository as
1051 possible. For example, run apache or 'svnserve -d' as a specific
1052 user, and make the repository wholly owned by that user. Don't allow
1053 any other users to access the repository via
<tt>file:///
</tt> urls,
1054 and be sure to run 'svnlook' and 'svnadmin' only as the user which
1055 owns the repository.
</p>
1057 <p>If your clients are accessing via
<tt>file:///
</tt> or
1058 <tt>svn+ssh://
</tt>, then there's no way to avoid access by multiple
1059 users. In that case, read
<a
1060 href=
"http://svnbook.red-bean.com/html-chunk/ch06s05.html">the last
1061 section in chapter
6</a>, and pay particular attention to the
1062 "checklist" sidebar at the bottom. It outlines a number of steps to
1063 make this scenario safer.
</p>
1065 <b>Note for SELinux / Fedora Core
3+ / Red Hat Enterprise users:
</b>
1067 <p>In addition to regular Unix permissions, under SELinux every file,
1068 directory, process, etc. has a 'security context'. When a process
1069 attempts to access a file, besides checking the Unix permissions the
1070 system also checks to see if the security context of the process is
1071 compatible with the security context of the file.
</p>
1073 <p>Fedora Core
3, among other systems, comes with SELinux installed by
1074 default, configured so that Apache runs in a fairly restricted
1075 security context. To run Subversion under Apache, you have to set the
1076 security context of the repository to allow Apache access (or turn off
1077 the restrictions on Apache, if you think all this is overkill). The
1078 <tt>chcon
</tt> command is used to set the security context of files
1079 (similarly to how the
<tt>chmod
</tt> sets the traditional Unix
1080 permissions). For example, one user had to issue this command
</p>
1082 <pre> $ chcon -R -h -t httpd_sys_content_t
<i>PATH_TO_REPOSITORY
</i></pre>
1084 <p>to set the security context to be able to successfully
1085 access the repository.
</p>
1091 <div class=
"h3" id=
"readonly" title=
"readonly">
1092 <h3>Why do read-only operations still need repository
1095 <p>Certain client operations are
"read-only", like checkouts and
1096 updates. From an access-control standpoint, Apache treats them as
1097 such. But libsvn_fs (the repository filesystem API) still has to
1098 write temporary data in order to produce tree-deltas. So the process
1099 accessing the repository always requires both read
<em>and
</em> write
1100 access to the Berkeley DB files in order to function.
</p>
1102 <p>In particular, the repository responds to many
"read-only"
1103 operations by comparing two trees. One tree is the usually the HEAD
1104 revision, and the other is often a temporary transaction-tree -- thus
1105 the need for write access.
</p>
1107 <p>This limitation only applies to the Berkeley DB backend; the
<a
1108 href=
"http://svnbook.red-bean.com/svnbook-1.1/ch05.html#svn-ch-5-sect-1.2.A">FSFS
1109 backend
</a> does not exhibit this behaviour.
</p>
1114 <div class=
"h3" id=
"removal" title=
"removal">
1116 How do I completely remove a file from the repository's history?
1119 <p>There are special cases where you might want to destroy all
1120 evidence of a file or commit. (Perhaps somebody accidentally committed
1121 a confidential document.) This isn't so easy, because Subversion is
1122 deliberately designed to never lose information. Revisions are
1123 immutable trees which build upon one another. Removing a revision from
1124 history would cause a domino effect, creating chaos in all subsequent
1125 revisions and possibly invalidating all working copies.
</p>
1127 <p>The project has plans, however, to someday implement an
<b>svnadmin
1128 obliterate
</b> command which would accomplish the task of permanently
1129 deleting information. (See
<a
1130 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=516">issue
1133 <p>In the meantime, your only recourse is to
<b>svnadmin dump
</b> your
1134 repository, then pipe the dumpfile through
<b>svndumpfilter
</b>
1135 (excluding the bad path) into an
<b>svnadmin load
</b> command. See
<a
1136 href=
"http://svnbook.red-bean.com/html-chunk/ch05.html">chapter
5</a>
1137 of the Subversion book for details about this.
</p>
1142 <div class=
"h3" id=
"change-log-msg" title=
"change-log-msg">
1144 How do I change the log message for a revision after it's been committed?
1147 <p>Log messages are kept in the repository as properties attached to each
1148 revision. By default, the log message property (
<em>svn:log
</em>) cannot be
1149 edited once it is committed. That is because changes to
<a
1150 href=
"http://svnbook.red-bean.com/svnbook/ch05.html#svn-ch-5-sect-1.2">revision
1151 properties
</a> (of which
<em>svn:log
</em> is one) cause the property's
1152 previous value to be permanently discarded, and Subversion tries to prevent
1153 you from doing this accidentally. However, there are a couple of ways to get
1154 Subversion to change a revision property.
</p>
1156 <p>The first way is for the repository administrator to enable revision
1157 property modifications. This is done by creating a hook called
1158 "pre-revprop-change" (see
<a
1159 href=
"http://svnbook.red-bean.com/svnbook/ch05s02.html#svn-ch-5-sect-2.1">this
1160 section
</a> in the Subversion book for more details about how to do this).
1161 The
"pre-revprop-change" hook has access to the old log message before it is
1162 changed, so it can preserve it in some way (for example, by sending an email).
1163 Once revision property modifications are enabled, you can change a revision's
1164 log message by passing the --revprop switch to
<b>svn propedit
</b> or
<b>svn
1165 propset
</b>, like either one of these:
</p>
1168 $ svn propedit -r N --revprop svn:log URL
1169 $ svn propset -r N --revprop svn:log
"new log message" URL
1172 <p>where N is the revision number whose log message you wish to change, and
1173 URL is the location of the repository. If you run this command from within a
1174 working copy, you can leave off the URL.
</p>
1176 <p>The second way of changing a log message is to use
<b>svnadmin setlog
</b>.
1177 This must be done by referring to the repository's location on the filesystem.
1178 You cannot modify a remote repository using this command.
</p>
1181 $ svnadmin setlog REPOS_PATH -r N FILE
1184 <p>where REPOS_PATH is the repository location, N is the revision number whose
1185 log message you wish to change, and FILE is a file containing the new log
1186 message. If the
"pre-revprop-change" hook is not in place (or you want to
1187 bypass the hook script for some reason), you can also use the --bypass-hooks
1188 option. However, if you decide to use this option, be very careful. You may
1189 be bypassing such things as email notifications of the change, or backup
1190 systems that keep track of revision properties.
</p>
1195 <div class=
"h3" id=
"patch" title=
"patch">
1196 <h3>How do I submit a patch for Subversion?
</h3>
1198 <p>FIRST, read the
<a href=
"hacking.html">Hacker's Guide to
1201 <p>Once you've digested that, send a mail to the dev list with the
1202 word [PATCH] and a one-line description in the subject, and include
1203 the patch inline in your mail (unless your MUA munges it up
1204 totally). Then a committer will pick it up, apply it (making any
1205 formatting or content changes necessary), and check it in.
</p>
1207 <p>The basic process looks like this:
</p>
1210 $ svn co http://svn.collab.net/repos/svn/trunk subversion
1213 [ make changes to faq.html ]
1215 $ svn diff faq.html
> /tmp/foo
1217 $ Mail -s
"[PATCH] FAQ updates" < /tmp/foo
1220 <p>Of course, the email you send should contain a nice long
1221 explanation about what the patch does, as per the
1222 <a href=
"hacking.html">Hacker's Guide to Subversion
</a>, but you
1223 already know that, since you read and completely understood
1224 it
<em>before
</em> actually hacking the code, right? :)
</p>
1229 <div class=
"h3" id=
"in-place-import" title=
"in-place-import">
1230 <h3>How can I do an in-place 'import'
1231 (i.e. add a tree to Subversion such that the original data becomes
1232 a working copy directly)?
</h3>
1234 <p>Suppose, for example, that you wanted to put some of /etc under
1235 version control inside your repository:
</p>
1238 # svn mkdir file:///root/svn-repository/etc \
1239 -m
"Make a directory in the repository to correspond to /etc"
1241 # svn checkout file:///root/svn-repository/etc .
1242 # svn add apache samba alsa X11
1243 # svn commit -m
"Initial version of my config files"
1246 <p>This takes advantage of a not-immediately-obvious feature of
1247 <tt>svn
checkout
</tt>: you can check out a directory from the repository
1248 directly into an existing directory. Here, we first make a new empty directory
1249 in the repository, and then check it out into
<tt>/etc
</tt>, transforming
1250 <tt>/etc
</tt> into a working copy. Once that is done, you can use normal
1251 <tt>svn
add
</tt> commands to select files and subtrees to add to the
1254 <p>There is an issue filed for enhancing
<tt>svn
import
</tt> to
1255 be able to convert the imported tree to a working copy automatically;
1256 see
<a href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=1328"
1257 >issue
1328</a>.
</p>
1262 <div class=
"h3" id=
"dumpload" title=
"dumpload">
1263 <h3>What is this
"dump/load cycle" people
1264 sometimes talk about when upgrading a Subversion server?
</h3>
1266 <p>Subversion's repository database schema has changed occasionally
1267 during development. Old repositories, created with a pre-
1.0
1268 development version of Subversion, may require the following operation
1269 when upgrading. If a schema change happens between Subversion
1270 releases X and Y, then repository administrators upgrading to Y must
1271 do the following:
</p>
1274 <li>Shut down svnserve, Apache, and anything else that might be
1275 accessing the repository.
1280 <tt>svnadmin
dump
/path/to/repository
> dumpfile.txt
</tt>
1282 using version X of svnadmin.
1287 <tt>mv
/path/to/repository
/path/to/saved-old-repository
</tt>
1291 <li>Now upgrade to Subversion Y (i.e., build and install Y, replacing X).
1295 <b><tt>svnadmin
create
/path/to/repository
</tt></b>, using version
1301 <tt>svnadmin
load
/path/to/repository
< dumpfile.txt
</tt>
1303 again using version Y of svnadmin.
1306 <li>Copy over hook scripts, etc, from the old repository to the new one.
1309 <li>Restart svnserve, Apache, etc.
1314 <a href=
"http://svnbook.red-bean.com/html-chunk/ch05s03.html#svn-ch-5-sect-3.4"
1315 >http://svnbook.red-bean.com/html-chunk/ch05s03.html#svn-ch-
5-sect-
3.4</a>
1316 for more details on dumping and loading.
</p>
1318 <p> <b>Note
</b>: Most upgrades of Subversion do
<i>not
</i> involve a
1319 dump and load. When one is required, the release announcement and the
1320 CHANGES file for the new version will carry prominent notices about
1321 it. If you don't see such a notice, then there has been no schema
1322 change, and no dump/load is necessary.
</p>
1327 <div class=
"h3" id=
"sspi" title=
"sspi">
1328 <h3>How do I allow clients to authenticate against a
1329 Windows domain controller using SSPI authentication?
</h3>
1331 <p><a href=
"http://tortoisesvn.tigris.org">TortoiseSVN
</a> has an excellent
1332 document that describes setting up a Subversion server on Windows. Go to
1333 <a href=
"http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup.html#tsvn-serversetup-apache-5"
1334 >http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup.html#tsvn-serversetup-apache-
5</a>,
1335 to see the section on SSPI authentication.
</p>
1337 <p>An important part of the configuration is the line:
</p>
1342 <p>Without this line, browsers that support SSPI will prompt for the user's
1343 credentials, but clients that do not suppport SSPI such as Subversion
1344 will not prompt. (The current release of Neon - Subversion's HTTP
1345 library - handles only basic authentication.) Because the client never
1346 asks for credentials, any action that requires authentication will fail.
1347 Adding this line tells
<tt>mod_auth_sspi
</tt> to use basic authentication with
1348 the client, but to use the Windows domain controller to authenticate
1349 the credentials.
</p>
1354 <div class=
"h3" id=
"adm-dir" title=
"adm-dir">
1355 <h3>I don't like the
".svn" directory name, and
1356 prefer
"SVN" or something else. How do I change it?
</h3>
1358 <p>We recommend that you live with
".svn" if you possibly can.
1359 However, if you are using ASP.NET under Windows, you might need to set
1360 the environment variable SVN_ASP_DOT_NET_HACK, as
1361 described
<a href=
"#vs-asp-net">here
</a>.
</p>
1363 <p>Or you could use a completely custom name for the administrative
1364 directory. We recommend against this, because your working copy would
1365 probably not work with Subversion clients other than the one you
1366 customized. However, if you absolutely must do this, just change this
1367 line in
<tt>subversion/include/svn_wc.h
</tt> from
</p>
1370 #define SVN_WC_ADM_DIR_NAME
".svn"
1378 #define SVN_WC_ADM_DIR_NAME
"SVN"
1382 then recompile your client.
1388 <div class=
"h3" id=
"case-change" title=
"case-change">
1389 <h3>How do I change the case of a filename?
</h3>
1391 <p>This problem comes up in two situations. If you're adding files on
1392 an operating system with a case-insensitive filesystem, such as
1393 Windows, you might find you accidentally add a file with the wrong
1394 case in the filename. Alternatively, you may just decide to change
1395 the case of an existing file in the repository.
</p>
1397 <p>If you're working in a case-sensitive file system, this is no
1398 problem at all. Just move the file to the new name, e.g.,
</p>
1401 svn
mv
file.java
File.java
1404 <p>But this won't work in a case-insensitive operating system like
1405 Windows. In Windows you can accomplish this by copying the file
1406 somewhere temporary, deleting the file from Subversion, then adding
1407 the copy with the correct case. Or a better way is to perform a move
1408 operation with Subversion URLs. Using URLs is recommended, because it
1409 will preserve history for the file, and will take effect
1412 <p>Both ways will leave Windows working copies with problems, however,
1413 because Windows can still get confused when trying to update the
1414 conflicting filenames. (You'll get a message like
<tt>svn: Failed to
1415 add file 'File.java': object of the same name already
1416 exists
</tt>). One way of fixing the problem is to delete your working
1417 copy and check out again. If you do not want to do this, you must
1418 perform a two step update.
</p>
1420 <p>For each file with the wrong case, the following command will change
1424 svn mv svn://svnserver/path/to/file.java svn://svnserver/path/to/File.java
1427 <p>To update the working copy, change to the relevant directory and do:
</p>
1430 svn update file.java
1434 <p>The first update will remove
<tt>file.java
</tt> from your working
1435 copy, the second update will add
<tt>File.java
</tt>, leaving you with
1436 a correct working copy. Or if you had a lot of problematic files, you
1437 can update the working copy this way:
</p>
1444 <p>As you can see, adding a file with the wrong case is tricky to fix on
1445 an operating system that has a case insensitive filesystem. Do try to
1446 get it right when you add the file the first time! To prevent the
1447 problem from occurring in the first place, you can create a pre-commit hook that
1448 calls the file
<tt>check-case-insensitive.pl
</tt>. That file lives
1450 source tarball, in the directory
<tt>contrib/hook-scripts
</tt>.
</p>
1455 <div class=
"h3" id=
"merge-using-tags" title=
"merge-using-tags">
1456 <h3>I can't use tags to merge changes from a
1457 branch into the trunk like I used to with CVS, can I?
</h3>
1459 <p>As shown below it is possible to merge from a branch to the trunk
1460 without remembering one revision number. Or vice versa (not shown in the
1463 <p>The example below presumes an existing repository in
<tt>/home/repos
</tt>
1464 in which you want to start a branch named
<tt>bar
</tt> containing a file
1465 named
<tt>foo
</tt> you are going to edit.
</p>
1467 <p>For the purpose of tracing branch merges, this repository has set up
1468 <tt>tags/branch_traces/
</tt> to keep tags.
</p>
1470 <pre># setup branch and tags
1471 $ svn copy file:///home/repos/trunk \
1472 file:///home/repos/branches/bar_branch \
1473 -m
"start of bar branch"
1474 $ svn copy file:///home/repos/branches/bar_branch \
1475 file:///home/repos/tags/branch_traces/bar_last_merge \
1478 # checkout branch working copy
1479 $ svn checkout file:///home/repos/branches/bar_branch wc
1482 # edit foo.txt file and commit
1483 $ echo
"some text" >>foo.txt
1484 $ svn commit -m
"edited foo"
1486 # switch to trunk and merge changes from branch
1487 $ svn switch file:///home/repos/trunk
1488 $ svn merge file:///home/repos/tags/branch_traces/bar_last_merge \
1489 file:///home/repos/branches/bar_branch
1491 # Now check the file content of 'foo.txt', it should contain the changes.
1494 $ svn commit -m
"Merge change X from bar_branch."
1496 # finally, update the trace branch to reflect the new state of things
1497 $ svn delete -m
"Remove old trace branch in preparation for refresh." \
1498 file:///home/repos/tags/branch_traces/bar_last_merge
1499 $ svn copy file:///home/repos/branches/bar_branch \
1500 file:///home/repos/tags/branch_traces/bar_last_merge \
1501 -m
"Reflect merge of change X."
1507 <div class=
"h3" id=
"version-value-in-source" title=
"version-value-in-source">
1508 <h3>Why doesn't the $Revision$
1509 keyword do what I want? It expands to the file's last-changed revision,
1510 but I want something that will expand to the file's current revision.
</h3>
1513 Subversion increments the revision number of the repository as a
1514 whole, so it can't expand any keyword to be that number - it would
1515 have to search and possibly modify every file in your working copy on
1516 every update and commit.
1520 The information you want (the revision of your working copy) is
1521 available from the command
<tt>svnversion
</tt>; it gives you
1522 information on the revision level of a working copy given a path (see
1523 <tt>svnversion --help
</tt> for details).
1527 You can incorporate it into your build or release process to get the
1528 information you need into the source itself. For example, in a build
1529 environment based on
<tt>GNU
make
</tt>, add
<a
1530 href=
"http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=112564"
1531 >something like this
</a> to your
<tt>Makefile
</tt>:
1536 ## To use this, in yourfile.c do something like this:
1537 ## printf(
"this program was compiled from SVN revision %s\n",SVN_REV);
1540 SVNDEF := -D'
SVN_REV=
"$(shell svnversion -n .)"'
1541 CFLAGS := $(SVNDEF) ... continue with your other flags ...
1545 (Note that this will not work on non-GNU versions of
<tt>make
</tt>.
1546 Don't use it if your build process needs to be portable.)
</p>
1548 <p>Or try this recipe:
</p>
1552 ## on every build, record the working copy revision string
1554 svn_version.c: FORCE
1555 echo -n 'const char* svn_version(void) { const char* SVN_Version =
"' \
1557 svnversion -n . >> svn_version.c
1558 echo '"; return SVN_Version; }'
>> svn_version.c
1561 ## Then any executable that links in
<tt>svn_version.o
</tt> will be able
1562 ## to call the function
<tt>svn_version()
</tt> to get a string that
1563 ## describes exactly what revision was built.
1568 Windows users may want to use
<tt>SubWCRev.exe
</tt>, available from
1570 href='http://tortoisesvn.net/downloads'
>TortoiseSVN
1571 download page
</a>; it replaces all
<tt>$WCREV$
</tt> tags in a given
1572 file with the current working copy revision.
1578 <div class=
"h3" id=
"log-in-source" title=
"log-in-source">
1579 <h3>Does Subversion have a keyword which
1580 behaves like $Log$ in CVS?
</h3>
1582 <p>No. There is no equivalent for the $Log$ keyword in CVS. If you
1583 want to retrieve a log for a specific file, you can run
1584 'svn log your-file-name' or 'svn log url-to-your-file'.
1585 From the mailing list some explanations why $Log$ is bad:
</p>
1587 <pre>"$Log$ is a total horror the moment you start merging changes
1588 between branches. You're practically guaranteed to get conflicts there,
1589 which -- because of the nature of this keyword -- simply cannot be
1590 resolved automatically."</pre>
1594 <pre>Subversion log messages are mutable, they can be changed by setting
1595 the svn:log revision property. So the expansion of $Log:$ in any
1596 given file could be out of date. Update may well need to retrieve the
1597 appropriate log message for each occurrence of the $Log:$ keyword,
1598 even if the file that contained it was not otherwise updated.
</pre>
1600 <p><i>I don't care about that. I want to use it anyway.
1601 Will you implement it?
</i></p>
1603 <p>No. There are no plans to implement it ourselves or accept patches
1604 which implement this feature. If you want to distribute your files
1605 with some kind of changelog included, you might be able to work
1606 around this limitation in your build system.
</p>
1612 <div class=
"h3" id=
"ignore-commit" title=
"ignore-commit">
1613 <h3>I have a file in my project that every
1614 developer must change, but I don't want those local mods to ever be
1615 committed. How can I make 'svn commit' ignore the file?
</h3>
1617 <p>The answer is: don't put that file under version control. Instead,
1618 put a
<em>template
</em> of the file under version control, something
1619 like
"file.tmpl".
</p>
1621 <p>Then, after the initial 'svn checkout', have your users (or your
1622 build system) do a normal OS copy of the template to the proper
1623 filename, and have users customize the copy. The file is unversioned,
1624 so it will never be committed. And if you wish, you can add the file
1625 to its parent directory's svn:ignore property, so it doesn't show up
1626 as '?' in the 'svn status' command.
</p>
1631 <div class=
"h3" id=
"ssh-auth-cache" title=
"ssh-auth-cache">
1632 <h3>When I access a repository using
1633 svn+ssh, my password is not cached in ~/.subversion/auth/. How do
1634 I avoid having to type it so often?
</h3>
1636 <p>ssh has its own passphrases and its own authentication-caching
1637 scheme. Its auth caching is external to Subversion, and must be set
1638 up independently of Subversion.
</p>
1640 <p>OpenSSH includes
<b><tt>ssh-keygen
</tt></b> to create the keys,
1641 <b><tt>ssh-agent
</tt></b> to cache passphrases, and
1642 <b><tt>ssh-add
</tt></b> to add passphrases to the agent's cache. A
1643 popular script to simplify usage of
<tt>ssh-agent
</tt> is
1644 <b><tt>keychain
</tt></b>. On Windows,
<b><tt>PuTTY
</tt></b> is a
1645 popular alternative ssh client; see
<b><tt>PuTTYgen
</tt></b> to import
1646 OpenSSH keys and
<b><tt>pageant
</tt></b> to cache passphrases.
</p>
1648 <p>Setting up
<tt>ssh-agent
</tt> is outside the scope of this
1650 href=
"http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=%22ssh-agent%22"
1651 >Google search for
"ssh-agent"</a> will quickly get you answers. Or
1652 if you're
<i>really
</i> impatient, try one of these:
</p>
1655 <a href=
"http://mah.everybody.org/docs/ssh"
1656 >http://mah.everybody.org/docs/ssh
</a>
1657 <a href=
"http://kimmo.suominen.com/docs/ssh/"
1658 >http://kimmo.suominen.com/docs/ssh/
</a>
1664 <div class=
"h3" id=
"ssh-svnserve-location" title=
"ssh-svnserve-location">
1666 <tt>svnserve
</tt> binary is in a directory that isn't on my
1667 users' default
<tt>PATH
</tt>s, they use svn+ssh, and I can't figure
1668 out how to modify their
<tt>PATH
</tt> so that they can run
<tt>svnserve
</tt>.
</h3>
1670 <p>Note: this all assumes you're using OpenSSH. There are other
1671 ssh implementations out there, and presumably they will allow
1672 you to do something similar, but we don't yet know the details.
</p>
1674 <p>You've tried fiddling with their various login files, like
1675 <tt>.bash_profile
</tt>, and nothing works! That's because ssh
1676 ignores those files when the Subversion client invokes it.
1677 But there's no need to modify
<tt>PATH
</tt>; instead, you can
1678 directly give ssh the full name of the
<tt>svnserve
</tt> command.
1679 Here's how to do it:
</p>
1681 <p>For each user who needs svn+ssh access, generate a new ssh
1682 public-key pair which they will use
<em>only
</em> for
1683 Subversion
—not for logging in normally. Have them give
1684 the keypair a distinctive name, like
1685 <tt>~/.ssh/id_dsa.subversion
</tt>. Add the public part of the
1686 key to their
<tt>~/.ssh/authorized_keys
</tt> file on the
1687 server machine, after first inserting a bit of magic at the
1688 beginning of the line before the word
<tt>ssh-rsa
</tt> or
1689 <tt>ssh-dss
</tt>, like this:
</p>
1691 <table border=
"1" cellspacing=
"2" cellpadding=
"2">
1692 <tr><th>before
</th></tr>
1693 <tr><td><tt>ssh-dss
AAAAB3Nblahblahblahblah
</tt></td></tr>
1694 <tr><th>after
</th></tr>
1696 command=
"/opt/subversion/bin/svnserve -t" ssh-dss
AAAAB3Nblahblahblahblah
1700 <p>Obviously, replace
<tt>/opt/subversion/bin/svnserve
</tt> with
1701 whatever is appropriate for your system. You also might want to
1702 specify the full path to the Subversion repository in the
1703 command (by using the
<tt>-r
</tt> option), to save your users
1706 <p>The
<tt>command=
</tt> magic causes sshd on the remote machine
1707 to invoke
<tt>svnserve
</tt>, even if your user tries to run
1708 some other command. See the sshd(
8) man page (section
1709 <tt>AUTHORIZED_KEYS FILE FORMAT
</tt>) for details.
</p>
1711 <p>Now when your users run the Subversion client, make sure they
1712 have an
<tt>SVN_SSH
</tt> environment variable that
"points to"
1713 the private half of their keypair, by doing something like this
1714 (for the Bourne Again shell):
</p>
1717 SVN_SSH=
"ssh -i $HOME/.ssh/id_dsa.subversion"
1722 href=
"http://svn.collab.net/repos/svn/trunk/notes/ssh-tricks">This
1723 file
</a> discusses this topic in more detail.
</p>
1728 <div class=
"h3" id=
"ssh-authorized-keys-trick" title=
"ssh-authorized-keys-trick">
1729 <h3>I want to allow access via svn+ssh://, but am paranoid. I hate the
1730 idea of giving each user a login; I would then have to worry about
1731 what they are, and are not, allowed to access on my machine.
</h3>
1732 <p>See the section about hacking
1733 the
<tt>~/.ssh/authorized_keys
</tt> file in the answer
1734 to
<a href=
"#ssh-svnserve-location">this other question
</a>; ignore the stuff
1735 about getting
<tt>svnserve
</tt> on your PATH.
</p>
1739 <div class=
"h3" id=
"auto-props" title=
"auto-props">
1740 <h3>How can I set certain properties on
1741 everything in the repository? Also, how can I make sure that every
1742 new file coming into the repository has these properties?
</h3>
1744 <p>Subversion will not change a file's contents by default; you have
1745 to deliberately set the
<tt>svn:eol-style
</tt> or
1746 <tt>svn:keywords
</tt> property on a file for that to happen. That
1747 makes Subversion a lot safer than CVS's default behavior, but with
1748 that safety comes some inconvenience.
</p>
1750 <p>Answering the first question: to set properties on all files
1751 already in the repository, you'll need to do it the hard way. All you
1752 can do is run
<tt>svn propset
</tt> on every file (in a working copy),
1753 and then
<tt>svn commit
</tt>. Scripting can probably help you with
1756 <p>But what about future files? Unfortunately, there's no server
1757 mechanism to automatically set properties on files being committed.
1758 This means that all of your users need to remember to set certain
1759 properties whenever they
<tt>svn add
</tt> a file. Fortunately,
1760 there's a client-side tool to help with this. Read about the
<a
1761 href=
"http://svnbook.red-bean.com/svnbook-1.1/ch07s02.html#svn-ch-7-sect-2.4">
1762 auto-props
</a> feature in the book. You need to make sure all your
1763 users configure their clients' auto-props settings appropriately.
</p>
1765 <p>You could write a pre-commit hook script to reject any commit which
1766 forgets to add properties to new files (see
<a
1767 href=
"http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/check-mime-type.pl"
1768 >http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/check-mime-type.pl
</a>
1769 for example). However, this approach may be overkill. If somebody
1770 forgets to set
<tt>svn:eol-style
</tt>, for example, it will be noticed
1771 the minute somebody else opens the file on a different OS. Once
1772 noticed, it's easy to fix: just set the property and commit.
</p>
1774 <p>Note: many users have asked for a feature whereby the server
1775 automatically
"broadcasts" run-time settings to clients, such as
1776 auto-props settings. There's already a feature request filed for this
1778 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=1974">issue
1779 1974</a>), though this feature is still being debated by developers,
1780 and isn't being worked on yet.
</p>
1785 <div class=
"h3" id=
"svn-editor" title=
"auto-props">
1786 <h3>How do I deal with spaces in the editor path?
Also, how can
1787 I define command line options for the editor?
</h3>
1789 <p>The Subversion command line client will invoke the editor defined
1790 in the environment variable SVN_EDITOR.
This environment variable
1791 is passed directly to the operating system along with the name of a
1792 temporary file used to enter/edit the log message.
</p>
1794 <p>Due to the fact that the SVN_EDITOR string is passed as-is to the
1795 system's command shell, spaces in the editor name, or in the path name
1796 to the editor, will not work unless the editor name is in quotes.
</p>
1798 <p>For example, on Windows if your editor is in
1799 <code>C:\Program
Files\Posix
Tools\bin\vi
</code> you would
1800 want to set the variable as follows:
1803 set
SVN_EDITOR=
"C:\Program Files\Posix Tools\bin\vi"
1806 <p>Note that there is no need to escape the quotes in the Windows
1807 shell as they are not part of the syntax for the
<code>set
</code>
1811 <p>On UNIX systems you would need to follow your shell's specific
1812 methods for setting the variable.
For example, in a bash shell,
1813 the following should work:
1816 SVN_EDITOR='
"/usr/local/more editors/bin/xemacs"'
1820 <p>In case a command line option would be needed for the invocation
1821 of the editor, just add that after the editor name in the SVN_EDITOR
1822 environment variable just like you would us on the command line.
1823 For example, if the options
<code>-nx -r
</code> would be wanted for
1824 the above editors, the following will provide those options:
1829 set
SVN_EDITOR=
"C:\Program Files\Posix Tools\bin\vi" -nx -r
1832 <p>For UNIX/bash:
</p>
1834 SVN_EDITOR='
"/usr/local/more editors/bin/xemacs" -nx -r'
1838 <p>Note that SVN_EDITOR is the Subversion specific environment variable
1839 setting for the editor selection.
Subversion also supports
1840 using the more generic EDITOR variable but if you need special behaviors
1841 with Subversion it is best to use the SVN_EDITOR variable.
1847 <div class=
"h3" id=
"divining-bdb-version" title=
"divining-bdb-version">
1848 <h3>How do I determine which version of
1849 Berkeley DB a repository is using?
</h3>
1851 <p>If it's a live repository, then the easy answer is
"Whatever
1852 version of Berkeley DB you have installed". If, however, it is a
1853 repository from a backup, or some unknown source, and you have no idea
1854 which version of Berkeley DB it was made with, here's how you find
1857 <p>Run some command to view the two
4-byte integers at offsets
12 and
1858 16 (decimal) in the highest-numbered db/log.* file in the repository.
1859 Here is an example using GNU od:
"<tt>od -j12 -N8 -tx4
1860 log.<i><number></i></tt>". Here is an example using Mac OS X
1861 hexdump:
"<tt>hexdump -s12 -n8 -x log.<i><number></i></tt>".
1862 The first integer should be the magic number
0x00040988, which
1863 identifies the file as a Berkeley DB logfile. The second number is
1864 the log format version
1865 - match it to a Berkeley DB version using the table below:
</p>
1867 <table border=
"1" cellspacing=
"2" cellpadding=
"2">
1868 <tr><th>Log format version
</th><th>Berkeley DB version
</th></tr>
1869 <tr><td>5 (
0x00000005)
</td><td>4.0</td></tr>
1870 <tr><td>7 (
0x00000007)
</td><td>4.1</td></tr>
1871 <tr><td>8 (
0x00000008)
</td><td>4.2</td></tr>
1872 <tr><td>10 (
0x0000000a)
</td><td>4.3</td></tr>
1873 <tr><td>11 (
0x0000000b)
</td><td>4.4</td></tr>
1874 <tr><td>12 (
0x0000000c)
</td><td>4.5</td></tr>
1875 <tr><td>13 (
0x0000000d)
</td><td>4.6</td></tr>
1881 <div class=
"h3" id=
"website-auto-update" title=
"website-auto-update">
1882 <h3>I'm managing a website in my
1883 repository. How can I make the live site automatically update after
1886 <p>This is done all the time, and is easily accomplished by adding a
1887 post-commit hook script to your repository. Read about hook scripts
1889 href=
"http://svnbook.red-bean.com/en/1.1/ch05s02.html#svn-ch-5-sect-2.1">Chapter
1890 5</a> of the book. The basic idea is to make the
"live site" just an
1891 ordinary working copy, and then have your post-commit hook script run
1892 'svn update' on it.
</p>
1894 <p>In practice, there are a couple of things to watch out for. The
1895 server program performing the commit (svnserve or apache) is the same
1896 program that will be running the post-commit hook script. That means
1897 that this program must have proper permissions to update the working
1898 copy. In other words, the working copy must be owned by the same user
1899 that svnserve or apache runs as -- or at least the working copy must
1900 have appropriate permissions set.
</p>
1902 <p>If the server needs to update a working copy that it doesn't own
1903 (for example, user joe's ~/public_html/ area), one technique is create
1904 a +s binary program to run the update, since Unix won't allow scripts
1905 to run +s. Compile a tiny C program:
</p>
1908 #include
<stddef.h
>
1909 #include
<stdlib.h
>
1910 #include
<unistd.h
>
1913 execl(
"/usr/local/bin/svn",
"svn",
"update",
"/home/joe/public_html/",
1914 (const char *) NULL);
1915 return(EXIT_FAILURE);
1919 <p>... and then
<tt>chmod +s
</tt> the binary, and make sure it's owned
1920 by user 'joe'. Then in the post-commit hook, add a line to run the
1923 <p>If you have problems getting the hook to work, see
<a
1924 href=
"#hook-debugging">"Why aren't my repository hooks
1927 <p>Also, you'll probably want to prevent apache from exporting the
1928 .svn/ directories in the live working copy. Add this to your
1929 <tt>httpd.conf
</tt>:
</p>
1932 # Disallow browsing of Subversion working copy administrative dirs.
1933 <DirectoryMatch
"^/.*/\.svn/">
1936 </DirectoryMatch
>
1942 <div class=
"h3" id=
"single-file-checkout" title=
"single-file-checkout">
1943 <h3>How do I check out a single file?
</h3>
1945 <p>Subversion does not support checkout of a single file, it only
1946 supports checkout of directory structures.
</p>
1948 <p>However, you can use 'svn export' to export a single file. This will
1949 retrieve the file's contents, it just won't create a versioned working
1955 <div class=
"h3" id=
"wc-change-detection" title=
"wc-change-detection">
1956 <h3>How do I detect adds, deletes,
1957 copies and renames in a working copy after they've already
1960 <p>You don't. It's a bad idea to try.
</p>
1962 <p>The basic design of the working copy has two rules: (
1) edit files
1963 as you please, and (
2) use a Subversion client to make any
1964 tree-changes (add, delete, move, copy). If these rules are followed,
1965 the client can sucessfully manage the working copy. If renames or
1966 other rearrangements happen outside of Subversion, then the UI has
1967 been violated and the working copy might be broken. The client cannot
1968 guess what happened.
</p>
1970 <p>People sometimes run into this problem because they want to make
1971 version control
"transparent". They trick users into using a working
1972 copy, then have a script run later that tries to guess what happened
1973 and run appropriate client commands. Unfortunately, this technique
1974 only goes a short distance. 'svn status' will show missing items and
1975 unversioned items, which the script can then automatically 'svn rm' or
1976 'svn add'. But if a move or copy has happened, you're out of luck.
1977 Even if the script has a foolproof way of detecting these things, 'svn
1978 mv' and 'svn cp' can't operate after the action has already
1981 <p>In summary: a working copy is wholly under Subversion's control,
1982 and Subversion wasn't designed to be transparent. If you're looking
1983 for transparency, try setting up an apache server and using the
1984 "SVNAutoversioning" feature described in appendix C of the book. This
1985 will allow users to mount the repository as a network disk, and any
1986 changes made to the volume cause automatic commits on the server.
</p>
1991 <div class=
"h3" id=
"svnserve-win-service" title=
"svnserve-win-service">
1992 <h3>How do I run svnserve as a service
1995 <p>For versions
1.4.0 and later, you can find
1997 href=
"http://svn.collab.net/repos/svn/trunk/notes/windows-service.txt">here
</a>.
</p>
1999 <p>In versions before
1.4.0, the
<tt>svnserve
</tt> binary itself could
2000 not be installed as a Windows service, but there are a number of
2001 “service wrappers
” that can do the job; for example:
</p>
2004 <li><a href=
"http://www.clanlib.org/~mbn/svnservice/">SVNService
</a>
2005 is a free tool written by Magnus Norddahl
</li>
2006 <li><a href=
"http://support.microsoft.com/kb/q137890/">SrvAny
</a>
2007 is avaliable free of charge from Microsoft
</li>
2010 <p>There is a bit more about running
<tt>svnserve
</tt> as a service in
2012 href=
"http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-serversetup-svnserve.html">the
2013 TortoiseSVN manual
</a>.
</p>
2018 <div class=
"h3" id=
"bdb-fsfs-convert" title=
"bdb-fsfs-convert">
2019 <h3>How do I convert my repository from using BDB
2020 to FSFS or from FSFS to BDB?
</h3>
2022 <p>There are three steps:
</p>
2025 <li>A
<a href=
"#dumpload">dump/load
</a> from the old format to the new
2027 <li>Copy the hook scripts.
</li>
2028 <li>Copy the configuration files.
</li>
2031 <p>Say you have a repository
<tt>/svn/myrepos
</tt> which is using the BDB
2032 backend and you would like to switch to using the FSFS backend:
</p>
2035 <li>Close down your server so that the data cannot change during this
2037 <li>Make a new repository specifying the fsfs backend (it is the default
2038 from
1.2 onwards), e.g.,
<tt>svnadmin create /svn/myreposfsfs --fs-type
2040 <li>Pipe the output of a dump from
<tt>/svn/myrepos
</tt> to the input of a
2041 load into
<tt>/svn/myreposfsfs
</tt>, e.g.,
<tt>svnadmin dump /svn/myrepos
2042 -q | svnadmin load /svn/myreposfsfs
</tt>. Windows users should dump
2043 to a file and load from that file in two separate steps.
</li>
2044 <li>Copy any hook scripts which are active in
<tt>/svn/myrepos/hooks
</tt>
2045 into
<tt>/svn/myreposfsfs/hooks
</tt>. Don't mindlessly copy everything, the
2046 templates generated by Subversion may have changed.
</li>
2047 <li>Compare the template scripts which the
<tt>svnadmin create
</tt> command
2048 put in
<tt>/svn/myreposfsfs/hooks
</tt> with those in
2049 <tt>/svn/myrepos/hooks
</tt> and incorporate any changes which you would like
2050 into your active hook scripts.
</li>
2051 <li>Copy configuration files from
<tt>/svn/myrepos/conf
</tt>
2052 into
<tt>/svn/myreposfsfs/conf
</tt> (and don't forget a password
2053 file, if you use one). Or you might instead want to merge
2054 the
<em>changes
</em> that you made to your configuration files into
2055 the new default ones.
</li>
2056 <li>Rename
<tt>/svn/myrepos
</tt> to
<tt>/svn/myreposbdb
</tt> and then
2057 <tt>/svn/myreposfsfs
</tt> to
<tt>/svn/myrepos
</tt> ensuring that the
2058 file permissions are the same as those that the BDB version had.
</li>
2059 <li>Restart the server.
</li>
2062 <p>Once you are happy that all is well with your new repository delete the old
2065 <p>To do the reverse and migrate from FSFS to BDB change the
<tt>svnadmin
2066 create
</tt> command to specify BDB.
</p>
2070 <div class=
"h3" id=
"binary-files" title=
"binary-files">
2071 <h3>How does Subversion handle binary files?
</h3>
2073 <p>When you first add or import a file into Subversion, the file is
2074 examined to determine if it is a binary file. Currently, Subversion
2075 just looks at the first
1024 bytes of the file; if any of the bytes
2076 are zero, or if more than
15% are not ASCII printing characters, then
2077 Subversion calls the file binary. This heuristic might be improved in
2078 the future, however.
</p>
2080 <p>If Subversion determines that the file is binary, the file receives
2081 an svn:mime-type property set to
"application/octet-stream". (You can
2082 always override this by using the
<a
2083 href=
"http://svnbook.red-bean.com/svnbook-1.1/ch07s02.html#svn-ch-7-sect-2.4"
2084 >auto-props feature
</a> or by setting the property manually with
2085 <tt>svn propset
</tt>.)
</p>
2087 <p>Subversion treats the following files as text:
</p>
2090 <li>Files with no svn:mime-type
</li>
2091 <li>Files with a svn:mime-type starting
"text/"</li>
2092 <li>Files with a svn:mime-type equal to
"image/x-xbitmap"</li>
2093 <li>Files with a svn:mime-type equal to
"image/x-xpixmap"</li>
2096 <p>All other files are treated as binary, meaning that Subversion will:
</p>
2099 <li>Not attempt to automatically merge received changes with local
2100 changes during
<tt>svn update
</tt> or
<tt>svn merge
</tt></li>
2101 <li>Not show the differences as part of
<tt>svn diff
</tt></li>
2102 <li>Not show line-by-line attribution for
<tt>svn blame
</tt></li>
2105 <p>In all other respects, Subversion treats binary files the same as
2106 text files, e.g. if you set the svn:keywords or svn:eol-style
2107 properties, Subversion will perform keyword substitution or newline
2108 conversion on binary files.
</p>
2110 <p>Note that whether or not a file is binary does not affect the
2111 amount of repository space used to store changes to that file, nor
2112 does it affect the amount of traffic between client and server. For
2113 storage and transmission purposes, Subversion uses a diffing method
2114 that works equally well on binary and text files; this is completely
2115 unrelated to the diffing method used by the 'svn
diff'
2120 <div class=
"h3" id=
"terse-diff" title=
"terse-diff">
2121 <h3>How can I make
<tt>svn diff
</tt> show me just the names of the
2122 changed files, not their contents?
</h3>
2124 <tt>svn diff
</tt> doesn't have an option to do this, but
2128 If you only are interested in the diffs between, say, revision
10
2129 and the revision just before it,
<pre>svn log -vq -r10
</pre> does
2130 exactly what you want;
2133 otherwise, if you're using Unix, this works for any range of revisions:
2135 svn log -vq -r123:
456 | egrep '^ {
3}[ADMR] ' | cut -c6- | sort | uniq
</pre> </li>
2137 Version
1.4 of the
<tt>svn diff
</tt> command will have a
"--summarize"
2141 <div class=
"h3" id=
"sorry-no-globbing" title=
"sorry-no-globbing">
2142 <h3>How can I use wildcards or globbing to move many files at once?
</h3>
2144 You want to do something like
2147 svn mv svn://server/trunk/stuff/* svn://server/trunk/some-other-dir
2153 svn: Path 'svn://server/trunk/stuff/*' does not exist in revision
123
2156 ... or some other inscrutable error message.
2160 The short, unhappy answer is: there's no built-in way to do this; many
2161 commands, like
<tt>mv
</tt>, refuse to take an arbitrary number of
2162 arguments ... and in any case, Subversion doesn't expand wildcards like
2163 "*" the way the shell does.
2167 If you happen to have a working copy that contains all the source
2168 files as well as the destination directory, then you can exploit your
2169 shell's wildcard feature to do the move, like this (for Bash):
2172 for i in stuff/*; do svn mv $i some-other-dir; done
2173 svn ci -m
"moved all the stuff into some other dir"
2177 In any case, you can always accumulate a list of the names of the
2178 source files, and then run
"svn mv" on each item in that list, like
2182 s=svn://server/trunk/stuff/
2185 do svn mv
"$s/$f" svn://server/trunk/some-other-dir -m
"Moved just one file"
2189 Note, however, that this will generate one commit per source file;
2190 that's in contrast to the above method (using a working copy) which
2191 generates just one commit total.
2195 There is a program called
"svnmucc" or
"mucc" depending upon which
2196 version of Subversion you have, whose source is distributed with
2197 Subversion (in ...
<tt>/contrib/client-side/mucc/mucc.c
</tt> for
2198 Subversion
1.4 or earlier, in
2199 ...
<tt>/contrib/client-side/svnmucc/svnmucc.c
</tt> for Subversion
1.5
2200 or later), that appears to solve this problem for you.
2204 Rumor has it that with release
1.5, Subversion will in fact allow you
2205 to
"cp" and
"mv" multiple files at once.
2209 <div class=
"h3" id=
"vendor-branch" title=
"vendor-branch">
2210 <h3>How can I maintain a modified version (a
"vendor branch") of
2211 third-party software using Subversion?
</h3>
2213 <p>People frequently want to use Subversion to track their local
2214 changes to third-party code, even across upgrades from the
2215 third-party
— that is, they want to maintain their own
2216 divergent branch, while still incorporating new releases from the
2217 upstream source. This is commonly called a
<em>vendor branch
</em>
2218 (the term long predates Subversion), and the techniques for
2219 maintaining one in Subversion are
<a
2220 href=
"http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.advanced.vendorbr"
2221 >described here
</a>.
</p>
2223 <p>If the vendor code is hosted in a remote Subversion repository,
2224 then you can use
<a href=
"http://piston.rubyforge.org/">Piston
</a> to
2225 manage your copy of the vendor's code.
</p>
2227 <p>As a last resort, if using
<tt>svn_load_dirs.pl
</tt> is taking too
2228 much time or you're looking for the lazy solution, see also Jon
2229 Stevens' step-by-step explanation at
<a
2230 href=
"http://lookfirst.com/2007/11/subversion-vendor-branches-howto.html"
2231 >Subversion Vendor Branches Howto
</a>. This solution does not make
2232 use of the space saving features in the Subversion backend when you
2233 copy new code over old code; in this solution, each import of a vendor
2234 code gets an entire new copy and there is no space savings for
2235 identical files.
</p>
2241 <div class=
"h2" id=
"troubleshooting" title=
"troubleshooting">
2242 <h2>Troubleshooting:
</h2>
2246 <div id=
"permissions"></div>
2247 <div class=
"h3" id=
"stuck-bdb-repos" title=
"stuck-bdb-repos">
2248 <h3>My repository seems to get stuck all the
2249 time, giving me errors about needing recovery (DB_RUNRECOVERY). What
2250 could be the cause?
</h3>
2252 <p>The Berkeley DB database in your repository is sensitive to
2253 interruptions. If a process accessing the database exits without
2254 "cleanly" closing the environment, then the database is left in an
2255 inconsistent state. Common causes of this include:
</p>
2258 <li>the process exiting when it hits a permission problem
</li>
2259 <li>the process crashing/segfaulting
</li>
2260 <li>the process being forcibly killed
</li>
2261 <li>running out of disk space
</li>
2264 <p>For most of these cases, you should run
"svnadmin recover", which
2265 rewinds the repository back to a consistent state; see
<a
2266 href=
"#bdb-recovery">this question
</a> for details. Note that running
2267 out of disk space, combined with frequent checkouts or updates, can
2268 cause the repository to crash in a way where recovery is not possible
2269 (so keep backups).
</p>
2271 <p>Segfaults, forced killings, and running out of disk space are
2272 pretty rare. Permission problems are far more common: one process
2273 accesses the repository and accidentally changes ownership or
2274 permissions, then another process tries to access and chokes on the
2277 <p>The best way to prevent this is to get your repository permissions
2278 and ownership set up correctly. See
<a href=
"#reposperms">here
</a>
2279 for our recommendations.
</p>
2284 <div id=
"wedged-repos"></div>
2285 <div class=
"h3" id=
"bdb-recovery" title=
"bdb-recovery">
2286 <h3>Every time I try to access my repository, the
2287 process just hangs. Is my repository corrupt?
</h3>
2290 Your repository is not corrupt, nor is your data lost. If your process
2291 accesses the repository directly (mod_dav_svn, svnlook, svnadmin, or
2292 if you access a `file://' URL), then it's using Berkeley DB to access
2293 your data. Berkeley DB is a journaling system, meaning that it logs
2294 everything it is about to do before it does so. If your process is
2295 interrupted (Control-C, or segfault), then a lockfile is left behind,
2296 along with a logfile describing unfinished business. Any other
2297 process that attempts to access the database will just hang, waiting
2298 for the lockfile to disappear. To awaken your repository, you need to
2299 ask Berkeley DB to either finish the work, or rewind the database to a
2300 previous state that is known to be consistent.
</p>
2302 <p><b><span style=
"color: red">WARNING:
</span> you can seriously corrupt
2303 your repository if you run recover and another process accesses the
2306 <p>Make absolutely sure you disable all access to the repository before
2307 doing this (by shutting down Apache, removing executable permissions from
2308 'svn'). Make sure you run this command as the user that owns and manages
2309 the database, and not as root, else it will leave root-owned files in the
2310 db directory which cannot be opened by the non-root user that manages the
2311 database, which is typically either you or your Apache process. Also be
2312 sure to have the correct umask set when you run recover, since failing to
2313 do so will lock out users that are in the group allowed to access the
2320 svnadmin recover /path/to/repos
2323 <p>Once the command has completed, check the permissions in the
2324 <code>db
</code> directory of the repository.
</p>
2326 <p>Sometimes
"svnadmin recover" doesn't work. You may see it
2327 give errors like this:
</p>
2330 Repository lock acquired.
2331 Please wait; recovering the repository may take some time...
2332 svnadmin: DB_RUNRECOVERY: Fatal error, run database recovery
2333 svnadmin: bdb: Recovery function for LSN
175 7066018 failed on backward pass
2334 svnadmin: bdb: PANIC: No such file or directory
2335 svnadmin: bdb: PANIC: fatal region error detected; run recovery
2338 <p>or like this:
</p>
2341 Repository lock acquired.
2342 Please wait; recovering the repository may take some time...
2343 svn: DB_RUNRECOVERY: Fatal error, run database recovery
2344 svn: bdb: DB_ENV-
>log_flush: LSN of
115/
802071 past current end-of-log
2346 svn: bdb: Database environment corrupt; the wrong log files may have
2347 been removed or incompatible database files imported from another
2350 svn: bdb: changes: unable to flush page:
0
2351 svn: bdb: txn_checkpoint: failed to flush the buffer cache Invalid argument
2352 svn: bdb: PANIC: Invalid argument
2353 svn: bdb: PANIC: fatal region error detected; run recovery
2354 svn: bdb: PANIC: fatal region error detected; run recovery
2358 <p>In that case, try Berkeley DB's native
<b>db_recover
</b> utility
2359 (see
<a href=
"http://www.oracle.com/technology/documentation/berkeley-db/db/utility/db_recover.html"
2360 >db_recover documentation
</a>). It
2361 usually lives in a
"bin/" subdirectory of the Berkeley DB installation,
2362 for example if you installed Berkeley DB from source, it might be
2363 <tt>/usr/local/BerkeleyDB
.4.2/bin/db_recover
</tt>; or on systems where
2364 Berkeley DB comes prepackaged it might just be
2365 <tt>/usr/bin/db_recover
</tt>. If you have multiple versions of
2366 Berkeley DB installed, make sure that the version of db_recover you
2367 use matches the version of Berkeley DB with which your repository was
2370 <p>Run db_recover with the
"-c" (
"catastrophic recovery") flag. You
2371 can also add
"-v" for verbosity, and
"-h" with an argument telling it
2372 what db environment to recover (so you don't have to cd into that
2373 directory). Thus:
</p>
2376 db_recover -c -v -h /path/to/repos/db
2379 <p>Run this command as the same user that owns the repository, and
2380 again, make absolutely sure that no other processes are accessing the
2381 repository while you do this (e.g., shut down svnserve or Apache).
</p>
2386 <div class=
"h3" id=
"bdb-cannot-allocate-memory" title=
"bdb-cannot-allocate-memory">
2387 <h3>My repository keeps giving errors saying
"Cannot allocate memory".
2388 What should I do?
</h3>
2390 <p>If you're using http:// access,
"<b>Cannot allocate memory</b>"
2391 errors show up in the httpd error log and look something like
2396 [Wed Apr
07 04:
26:
10 2004] [error] [client
212.151.130.227] (
20014)
2397 Error string not specified yet: Berkeley DB error while opening
2398 'strings' table for filesystem /usr/local/svn/repositories/svn/db:
2399 Cannot allocate memory
2400 [Wed Apr
07 04:
26:
10 2004] [error] [client
212.151.130.227]
2401 Could not fetch resource information. [
500, #
0]
2402 [Wed Apr
07 04:
26:
10 2004] [error] [client
212.151.130.227]
2403 Could not open the requested SVN filesystem [
500, #
160029]
2404 [Wed Apr
07 04:
26:
10 2004] [error] [client
212.151.130.227] (
17)
2405 File exists: Could not open the requested SVN filesystem [
500, #
160029]
2409 <p>It usually means that a Berkeley DB repository has run out of
2410 database locks (this does not happen with FSFS repositories). It
2411 shouldn't happen in the course of normal operations, but if it does,
2412 the solution is to run database recovery as described
<a
2413 href=
"#bdb-recovery">here
</a>. If it happens often, you probably need
2414 to raise the default lock parameters (
<tt>set_lk_max_locks
</tt>,
2415 <tt>set_lk_max_lockers
</tt>, and
<tt>set_lk_max_objects
</tt>) in the
2416 db/DB_CONFIG file. When changing DB_CONFIG in an existing repository,
2417 remember to run recovery afterwards.
</p>
2422 <div class=
"h3" id=
"wedged-wc" title=
"wedged-wc">
2423 <h3>Every time I try to run a svn command, it says my
2424 working copy is locked. Is my working copy corrupt?
</h3>
2427 Your working copy is not corrupt, nor is your data lost. Subversion's
2428 working copy is a journaling system, meaning that it logs everything it
2429 is about to do before it does so. If the svn client program is
2430 interrupted violently (segfault or killed, not with Control-C), then
2431 one or more lockfiles are left behind, along with logfiles describing
2432 unfinished business. (The `svn status' command will show an 'L' next
2433 to locked directories.) Any other process that attempts to access the
2434 working copy will fail when it sees the locks. To awaken your working
2435 copy, you need to tell the svn client to finish the work. Simply
2439 svn cleanup working-copy
2445 <div class=
"h3" id=
"wc-out-of-date" title=
"wc-out-of-date">
2446 <h3>I'm trying to commit, but Subversion says my
2447 working copy is out of date?
</h3>
2449 <p>Three kinds of situation that can cause this:
</p>
2453 <li><p>Debris from a failed commit is littering your working copy.
</p>
2455 <p>You may have had a commit that went sour between the time the
2456 new revision was added in the server and the time your client
2457 performed its post-commit admin tasks (including refreshing your
2458 local text-base copy). This might happen for various reasons
2459 including (rarely) problems in the database back end or (more
2460 commonly) network dropouts at exactly the wrong time.
</p>
2462 <p>If this happens, it's possible that you have already committed
2463 the very changes you are trying now to commit. You can use 'svn
2464 log -rHEAD' to see if your supposed-failed commit actually
2465 succeeded. If it did, run 'svn revert' to revert your local
2466 changes, then run 'svn update' to get your own changes back from the
2467 server. (Note that only 'svn update' brings your local copies
2468 up-to-date; revert doesn't do that.)
</p>
2471 <li><p>Mixed revisions.
</p>
2473 <p>When Subversion commits, the client only bumps the revision
2474 numbers of the nodes the commit touches, not all nodes in the
2475 working copy. This means that in a single working copy, the
2476 files and subdirectories might be at different revisions,
2477 depending on when you last committed them. In certain operations
2478 (for example, directory property modifications), if the
2479 repository has a more recent version of the node, the commit will
2480 be rejected, to prevent data loss. See
<a
2481 href=
"http://svnbook.red-bean.com/svnbook/ch02s03.html#svn-ch-2-sect-3.4">
2482 The Limitations of Mixed Revisions
</a> in the
<a
2483 href=
"http://svnbook.red-bean.com/">Version Control with
2484 Subversion
</a> for details.
</p>
2486 <p>You can fix the problem by running 'svn update' in the working
2490 <li><p>You might be genuinely out of date
— that is,
2491 you're trying to commit a change to a file that has been changed
2492 by someone else since you last updated your copy of that file.
2493 Again, 'svn update' is the way to fix this.
</p>
2499 <div class=
"h3" id=
"obstructed-add" title=
"obstructed-add">
2500 <h3>I've contributed a patch to a project and the patch added a new file.
2501 Now
<tt>svn update
</tt> does not work.
</h3>
2503 <p>In order to include your new file in the patch you likely ran the
<tt>svn add
</tt>
2504 command so that the
<tt>svn diff
</tt> command would include the new file in the patch.
2505 If your patch is committed to the code base and you run an
<tt>svn update
</tt>, then
2506 you might receive an error message of:
"svn: Failed to add file 'my.new.file':
2507 object of the same name already exists".
</p>
2509 <p>The reason that you recieved this error is that you still have your local copy of
2510 the file in your working copy. The steps to correct this problem are:
</p>
2513 <li>Run the
<tt>svn revert
</tt> command to remove the scheduled add within
2515 <li>Delete the file or move it to a location outside your working copy.
</li>
2516 <li>Now you should be able to run the
<tt>svn update
</tt> command.
</li>
2519 <p>You might want to compare the new file from the repository with your original file.
</p>
2523 <div class=
"h3" id=
"unrecognized-url-error" title=
"unrecognized-url-error">
2524 <h3>I just built the distribution binary,
2525 and when I try to check out Subversion, I get an error about an
2526 "Unrecognized URL scheme." What's up with that?
</h3>
2528 <p>Subversion uses a plugin system to allow access to repositories.
2529 Currently there are three of these plugins: ra_local allows access to
2530 a local repository, ra_dav which allows access to a repository via
2531 WebDAV, and ra_svn allows local or remote access via the svnserve
2532 server. When you attempt to perform an operation in Subversion, the
2533 program tries to dynamically load a plugin based on the URL scheme. A
2534 `file://' URL will try to load ra_local, and an `http://' URL will try
2537 <p>The error you are seeing means that the dynamic linker/loader can't find
2538 the plugins to load. This normally happens when you build Subversion with
2539 shared libraries, then attempt to run it without first running 'make
2540 install'. Another possible cause is that you ran make install, but the
2541 libraries were installed in a location that the dynamic linker/loader
2542 doesn't recognize. Under Linux, you can allow the linker/loader to find the
2543 libraries by adding the library directory to /etc/ld.so.conf and running
2544 ldconfig. If you don't wish to do this, or you don't have root access, you
2545 can also specify the library directory in the LD_LIBRARY_PATH environment
2551 <div class=
"h3" id=
"db-recover" title=
"db-recover">
2552 <h3>I'm getting errors finding or opening a repository,
2553 but I know my repository URL is correct. What's wrong?
</h3>
2555 <p>See
<a href=
"#bdb-recovery">this faq.
</a></p>
2561 <div class=
"h3" id=
"configure-sed-error" title=
"configure-sed-error">
2562 <h3>When I run `
<tt>configure
</tt>', I get errors about
2563 <tt>subs-
1.sed
line
38:
Unterminated
`s'
command
</tt>.
2567 You probably have old copies of
2568 <tt>/usr/local/bin/apr-config
</tt> and
2569 <tt>/usr/local/bin/apu-config
</tt> on your system. Remove them, make
2570 sure the
<tt>apr/
</tt> and
<tt>apr-util/
</tt> that you're
2571 building with are completely up-to-date, and try again.
2577 <div class=
"h3" id=
"windows-msvc-build" title=
"windows-msvc-build">
2578 <h3>I'm having trouble building Subversion
2579 under Windows with MSVC++
6.0. What should I do?
</h3>
2582 Probably you just need to get the latest platform SDK. The one that
2583 ships with VC++
6.0 is not recent enough.
2589 <div class=
"h3" id=
"windows-drive-letter" title=
"windows-drive-letter">
2590 <h3>How can I specify a Windows drive letter in
2591 a
<tt>file:
</tt> URL?
</h3>
2595 svn import file:///d:/some/path/to/repos/on/d/drive
2598 href=
"http://svnbook.red-bean.com/html-chunk/ch02s03.html#svn-ch-2-sidebar-1">
2599 Repository URLs
</a> in the Subversion Book for more details.
</p>
2604 <div class=
"h3" id=
"vs-asp-net" title=
"vs-asp-net">
2605 <h3>VS.NET/ASP.NET seems to have a problem with
2606 the
".svn" directory name. What should I do?
</h3>
2608 <p>VS.Net has a subsystem called ASP.Net, which uses WebDAV to do
2609 remote publishing through IIS. This subsystem rejects any pathname
2610 that starts with
".". This causes a problem when you try to remotely
2611 publish a Subversion working copy, because of the
".svn"
2612 subdirectories. The error message says something like
"unable to
2613 read project information".
</p>
2615 <p>To work around this, set the environment variable
2616 SVN_ASP_DOT_NET_HACK to any value
— this will tell
2617 Windows clients to use
"_svn" as a directory name in your working
2619 href=
"http://subversion.tigris.org/svn_1.3_releasenotes.html#_svn-hack"
2620 >the relevant section of the Subversion
1.3 release notes
</a> for more
2621 details, and see
<a href=
"#adm-dir">this question
</a> for other ways to
2622 customize the administrative directory name.
</p>
2627 <div class=
"h3" id=
"write-over-dav" title=
"write-over-dav">
2628 <h3>I'm having trouble doing write
2629 operations to a Subversion repository over a network.
</h3>
2631 <p>For example, one user reported that imports worked fine over local
2635 $ touch test/testfile
2636 $ svn import test file:///var/svn/test -m
"Initial import"
2637 Adding test/testfile
2638 Transmitting file data .
2639 Committed revision
1.
2641 But not from a remote host:
2643 $ svn import http://svn.sabi.net/test testfile -m
"import"
2644 nicholas's password: xxxxxxx
2646 svn_error: #
21110 :
<Activity not found
>
2648 The specified activity does not exist.
2651 <p> We've seen this when the REPOS/dav/ directory is not writable by
2652 the httpd process. Check the permissions to ensure Apache can write
2653 to the
<tt>dav/
</tt> directory (and to
<tt>db/
</tt>, of course).
</p>
2659 <div class=
"h3" id=
"windows-xp-server" title=
"windows-xp-server">
2660 <h3>Under Windows XP, the Subversion server
2661 sometimes seems to send out corrupted data. Can this really
2664 <p>You need to install Window XP Service Pack
1. You can get all
2665 sorts of information about that Service Pack here:
</p>
2668 <a href=
"http://support.microsoft.com/default.aspx?scid=kb;EN-US;q317949"
2669 >http://support.microsoft.com/default.aspx?scid=kb;EN-US;q317949
</a>
2675 <a name=
"ethereal"></a> <!-- for compatibility with old question -->
2676 <div class=
"h3" id=
"net-trace" title=
"net-trace">
2677 <h3>What is the best method of doing a network
2678 trace of the conversation between a Subversion client and
2681 <p>Use
<a href=
"http://www.wireshark.org/">Wireshark
</a> (formerly
2682 known as
"Ethereal") to eavesdrop on the conversation.
</p>
2684 <p>First, make sure that between captures within the same wireshark
2685 session, you hit
<em>Clear
</em>, otherwise filters from one capture
2686 (say, an HTTP capture) might interfere with others (say, an ra_svn
2689 <p>Assuming you're cleared, then:
</p>
2692 <li><p>Pull down the
<i>Capture
</i> menu, and choose
2693 <i>Capture
Filters
</i>.
</p></li>
2694 <li><p>If debugging the http:// (WebDAV) protocol, then in the window
2695 that pops up, choose
"<code>HTTP TCP port (80)</code>"
2696 (which should result in the filter string
2697 "<code><i>tcp port http</i></code>").
</p>
2698 <p>If debugging the svn:// (ra_svn) protocol, then choose
<i>New
</i>,
2699 give the new filter a name (say,
"ra_svn"), and type
2700 "<code>tcp port 3690</code>" into the filter string box.
</p>
2701 <p>When done, click OK.
</p></li>
2702 <li><p>Again go to the
<i>Capture
</i> menu, this time choose
2703 <i>Interfaces
</i>, and click
<i>Options
</i> next to the
2704 appropriate interface (probably you want interface
"lo", for
2705 "loopback", assuming the server will run on the same machine as
2706 the client).
</p></li>
2707 <li><p>Turn off promiscuous mode by unchecking the appropriate
2709 <li><p>Click the
<i>Start
</i> button in the lower right to start the
2711 <li><p>Run your Subversion client.
</p></li>
2712 <li><p>Click the Stop icon (a red X over an ethernet interface card) when
2713 the operation is finished (or
<i>Capture-
>Stop
</i> should
2714 work). Now you have a capture. It looks like a huge list of
2716 <li><p>Click on the
<i>Protocol
</i> column to sort.
</p></li>
2717 <li><p>Then, click on the first relevant line to select it; usually this
2718 is just the first line.
</p></li>
2719 <li><p>Right click, and choose
<i>Follow TCP Stream
</i>. You'll be
2720 presented with the request/response pairs of the Subversion
2721 client's HTTP conversion.
</p></li>
2724 <p>The above instructions are specific to the graphical version of
2725 Wireshark (version
0.99.6), and don't apply to the command-line
2726 version known as
"tshark" (which corresponds to
"tethereal", from back
2727 when Wireshark was called Ethereal).
</p>
2729 <p>Alternatively, you may set the
<tt>neon-debug-mask
</tt> parameter in your
2730 <tt>servers
</tt> configuration file to cause neon's debugging output
2731 to appear when you run the
<tt>svn
</tt> client. The numeric value of
2732 <tt>neon-debug-mask
</tt> is a combination of the
<tt>NE_DBG_...
</tt> values
2733 in the header file
<tt>ne_utils.h
</tt>. For current versions of neon, setting
2734 <tt>neon-debug-mask
</tt> to
130 (i.e.
<tt>NE_DBG_HTTP+NE_DBG_HTTPBODY)
</tt>
2735 will cause the HTTP data to be shown.
</p>
2737 <p>You may well want to disable compression when doing a network
2738 trace
—see the
<tt>http-compression
</tt> parameter in the
<tt>servers
</tt>
2739 configuration file.
</p>
2741 <p>Another alternative is to set up a logging proxy between the
2742 Subversion client and server. A simple way to do this is to use
2743 the
<tt>socat
</tt> program. For example, to log communication with
2744 an svnserve instance, run the following command:
</p>
2746 <p><tt>socat -v TCP4-LISTEN:
9630,reuseaddr,fork
2747 TCP4:localhost:svn
</tt></p>
2749 <p>Then run your svn commands using an URL base
2750 of
<tt>svn://
127.0.0.1:
9630/
</tt>;
<tt>socat
</tt> will forward the
2751 traffic from port
9630 to the normal svnserve port (
3690), and will
2752 print all traffic in both directions to standard error, prefixing it
2753 with
< and
> signs to show the direction of the traffic.
</p>
2758 <div class=
"h3" id=
"revert" title=
"revert">
2759 <h3>Why does the
<tt>svn revert
</tt> require an
2760 explicit target? Why is it not recursive by default? These
2761 behaviors differ from almost all the other subcommands.
</h3>
2763 <p>The short answer: it's for your own good.
</p>
2765 <p>Subversion places a very high priority on protecting your data, and
2766 not just your versioned data. Modifications that you make to
2767 already-versioned files, and new files scheduled for addition to the
2768 version control system, must be treated with care.
</p>
2770 <p>Making the
<tt>svn revert
</tt> command require an explicit
2771 target
—even if that target is just '.'
—is one way of
2772 accomplishing that. This requirement (as well as requiring you to
2773 supply the
<tt>--recursive (-R)
</tt> flag if you want that behavior)
2774 is intended to make you really think about what you're doing, because
2775 once your files are reverted, your local modifications are gone
2782 <div class=
"h3" id=
"db3db4" title=
"db3db4">
2783 <h3>When I start Apache, mod_dav_svn complains about
2784 a
"bad database version", that it found db-
3.X, rather than
2787 <p>Your apr-util linked against DB-
3, and svn linked against DB-
4.
2788 Unfortunately, the DB symbols aren't different. When mod_dav_svn is
2789 loaded into Apache's process-space, it ends up resolving the
2790 symbol names against apr-util's DB-
3 library.
</p>
2792 <p>The solution is to make sure apr-util compiles against DB-
4. You
2793 can do this by passing specific switches to either apr-util's or
2794 apache's configure:
"--with-dbm=db4 --with-berkeley-db=/the/db/prefix".
</p>
2800 <div class=
"h3" id=
"redhat-db" title=
"redhat-db">
2801 <h3>I'm getting
"Function not implemented" errors on Red Hat
2802 9, and nothing works. How do I fix this?
</h3>
2804 <p>This is not really a problem with Subversion, but it often affects
2805 Subversion users.
</p>
2807 <p>Red Hat
9 and Fedora ship with a Berkeley DB library that relies on
2808 the kernel support for NPTL (the Native Posix Threads Library).
</p>
2810 <p>The kernels that Red Hat provides have this support built in, but if you
2811 compile your own kernel, then you may well not have the NPTL support. If that
2812 is the case, then you will see errors like this:
</p>
2814 svn: Berkeley DB error
2815 svn: Berkeley DB error while creating environment for filesystem tester/db:
2816 Function not implemented
2818 <p>This can be fixed in one of several ways:
</p>
2820 <li>Rebuild Berkeley DB for the kernel you're using.
</li>
2821 <li>Use a Red Hat
9 kernel.
</li>
2822 <li>Apply the NPTL patches to the kernel you're using.
</li>
2823 <li>Use a recent (
2.5.x) kernel with the NPTL support included.
</li>
2824 <li>Check if environment variable
<code>LD_ASSUME_KERNEL
</code> is set
2825 to
<code>2.2.5</code>, and if so, unset it before starting
2826 Subversion (Apache). (You usually would set this variable to run
2827 Wine or Winex on Red Hat
9)
</li>
2829 <p>To use the NPTL version of Berkeley DB you also need to use a glibc
2830 library with NPTL support, which probably means the i686 version. See
2832 href=
"http://svn.haxx.se/users/archive-2004-03/0488.shtml">
2833 http://svn.haxx.se/users/archive-
2004-
03/
0488.shtml
2840 <div class=
"h3" id=
"no-author" title=
"no-author">
2841 <h3>Why does SVN log say
"(no author)" for files
2842 committed or imported via Apache (ra_dav)?
</h3>
2844 <p>If you allow anonymous write access to the repository via Apache,
2845 the Apache server never challenges the SVN client for a username, and
2846 instead permits the write operation without authentication. Since
2847 Subversion has no idea who did the operation, this results in a log
2852 ------------------------------------------------------------------------
2853 rev
24:
(no author) |
2003-
07-
29 19:
28:
35 +
0200 (Tue,
29 Jul
2003)
2856 <p>See the Subversion Book (
<a
2857 href=
"http://svnbook.red-bean.com/book.html#svn-ch-5-sect-4"
2858 >"Networking a Repository"</a>)
2859 to learn about configuring access restrictions in Apache.
</p>
2865 <div class=
"h3" id=
"windows-access-denied" title=
"windows-access-denied">
2866 <h3>I'm getting occasional
"Access Denied"
2867 errors on Windows. They seem to happen at random. Why?
</h3>
2869 <p>These appear to be due to the various Windows services that monitor
2870 the filesystem for changes (anti-virus software, indexing services, the
2871 COM+ Event Notification Service). This is not really a bug in Subversion,
2872 which makes it difficult for us to fix. A summary of the current state of
2873 the investigation is available
<a href=
2874 "http://svn.haxx.se/dev/archive-2003-10/0136.shtml">here
</a>.
2875 A workaround that should reduce the incidence rate for most people was
2876 implemented in revision
7598; if you have an earlier version, please
2877 update to the latest release.
2883 <div class=
"h3" id=
"freebsd-hang" title=
"freebsd-hang">
2884 <h3>On FreeBSD, certain operations (especially
2885 svnadmin create) sometimes hang. Why?
</h3>
2887 <p>This is usually due to a lack of available entropy on the system.
2888 You probably need to configure the system to gather entropy from
2889 sources such as hard-disk and network interrupts. Consult your system
2890 manpages, specifically random(
4) and rndcontrol(
8) on how to effect
2896 <a name=
"301-error"></a> <!-- for compatibility with old
2897 non-XML-name-compliant fragment id -->
2898 <div class=
"h3" id=
"http-301-error" title=
"http-301-error">
2899 <h3>I can see my repository in a web browser, but
2900 'svn checkout' gives me an error about
"301 Moved Permanently".
2903 <p>It means your httpd.conf is misconfigured. Usually this error happens
2904 when you've defined the Subversion virtual
"location" to exist within
2905 two different scopes at the same time.
</p>
2907 <p>For example, if you've exported a repository as
<tt><Location
2908 /www/foo
></tt>, but you've also set your
<tt>DocumentRoot
</tt> to
2909 be
<tt>/www
</tt>, then you're in trouble. When the request comes in
2910 for
<tt>/www/foo/bar
</tt>, apache doesn't know whether to find a
2911 <i>real
</i> file named
<tt>/foo/bar
</tt> within your
2912 <tt>DocumentRoot
</tt>, or whether to ask mod_dav_svn to fetch a file
2913 <tt>/bar
</tt> from the
<tt>/www/foo
</tt> repository. Usually the
2914 former case wins, and hence the
"Moved Permanently" error.
</p>
2916 <p>The solution is to make sure your repository
2917 <tt><Location
></tt> does
<b>not
</b> overlap or live within any
2918 areas already exported as normal web shares.
</p>
2920 <p>It's also possible that you have an object in the web root
2921 which has the same name as your repository URL. For example,
2922 imagine your web server's document root is
<tt>/var/www
</tt>
2923 and your Subversion repository is located at
2924 <tt>/home/svn/repo
</tt>. You then configure Apache to serve
2925 the repository at
<tt>http://localhost/myrepo
</tt>. If you then
2926 create the directory
<tt>/var/www/myrepo/
</tt> this will cause
2927 a
301 error to occur.
</p>
2933 <div class=
"h3" id=
"no-copy-history" title=
"no-copy-history">
2934 <h3>I'm trying to look at an old version of my
2935 file, but svn says something about
"path not found". What's going
2938 <p>A nice feature of Subversion is that the repository understands
2939 copies and renames, and preserves the historical connections. For
2940 example, if you copy
<tt>/trunk
</tt> to
<tt>/branches/mybranch
</tt>,
2941 then the repository understands that every file in the branch has a
2942 "predecessor" in the trunk. Running
<tt>svn log --verbose
</tt> will
2943 show you the historical copy, so you can see the rename:
</p>
2946 r7932 | joe |
2003-
12-
03 17:
54:
02 -
0600 (Wed,
03 Dec
2003) |
1 line
2948 A /branches/mybranch (from /trunk:
7931)
2951 <p>Unfortunately, while the repository is aware of copies and renames,
2952 almost all the svn client subcommands are
<b>not
</b> aware. Commands
2953 like
<tt>svn diff
</tt>,
<tt>svn merge
</tt>, and
<tt>svn cat
</tt> ought
2954 to understand and follow renames, but don't yet do this. It's
2955 scheduled as post-
1.0 feature, currently
<a
2956 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=1093">issue
2957 #
1093</a>. For example, if you ask
<tt>svn diff
</tt> to compare two
2958 earlier versions of
<tt>/branches/mybranch/foo.c
</tt>, the command
2959 will not automatically understand that the task actually requires
2960 comparing two versions of
<tt>/trunk/foo.c
</tt>, due to the rename.
2961 Instead, you'll see an error about how the branch-path doesn't exist
2962 in the earlier revisions.
</p>
2964 <p>The workaround for all problems of this sort is to do the legwork
2965 yourself. That is:
<i>you
</i> need to be aware of any renamed paths,
2966 discover them yourself using
<tt>svn log -v
</tt>, and then provide
2967 them explicitly to the svn client. For example, instead of
2971 $ svn diff -r
1000:
2000 http://host/repos/branches/mybranch/foo.c
2972 svn: Filesystem has no item
2973 svn: '/branches/mybranch/fooc..c' not found in the repository at revision
1000
2976 ...you would instead run
2979 $ svn diff -r1000:
2000 http://host/repos/trunk/foo.c
2986 <div class=
"h3" id=
"digest-auth" title=
"digest-auth">
2987 <h3>Why doesn't HTTP Digest auth work?
</h3>
2989 <p>This is probably due to a known bug in Apache HTTP Server (versions
2990 2.0.48 and earlier), for which a patch is available, see
2991 <a href=
"http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25040"
2992 >http://nagoya.apache.org/bugzilla/show_bug.cgi?id=
25040</a>. You
2993 may also want to read over
2994 <a href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=1608"
2995 >http://subversion.tigris.org/issues/show_bug.cgi?id=
1608</a>
2996 to see if the description there matches your symptoms.
3002 <div class=
"h3" id=
"xlc-compile" title=
"xlc-compile">
3003 <h3>Compiling with xlc on AIX, I get compilation
3004 errors. What's wrong?
</h3>
3006 <p>Adding
<tt>-qlanglvl=extended
</tt> to the
3007 environment variable CFLAGS for configuration and build
3008 will make xlc a bit more flexible and the code should
3009 compile without error. See
3010 <a href=
"http://svn.haxx.se/dev/archive-2004-01/0922.shtml"
3011 >http://svn.haxx.se/dev/archive-
2004-
01/
0922.shtml
</a> and
3012 its associated thread for more details.
3018 <div class=
"h3" id=
"nonrecursive-checkout" title=
"nonrecursive-checkout">
3019 <h3>I checked out a directory non-recursively
3020 (with -N), and now I want to make certain subdirectories
3021 "appear". But
<tt>svn up subdir
</tt> doesn't work.
</h3>
3024 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=695">issue
3025 695</a>. The current implementation of
<tt>svn checkout -N
</tt> is
3026 quite broken. It results in a working copy which has missing entries,
3027 yet is ignorant of its
"incompleteness". Apparently a whole bunch of
3028 CVS users are fairly dependent on this paradigm, but none of the
3029 Subversion developers were. For now, there's really no workaround
3030 other than to change your process: try checking out separate
3031 subdirectories of the repository and manually nesting your working
3037 <div class=
"h3" id=
"mod_dav_svn-win32" title=
"mod_dav_svn-win32">
3038 <h3>I am trying to use mod_dav_svn
3039 with Apache on Win32 and I'm getting an error saying that the
3040 module cannot be found, yet the mod_dav_svn.so file is right
3041 there in
<tt>\Apache\modules.
</tt></h3>
3043 <p>The error message in this case is a little misleading. Most likely
3044 Apache is unable to load one or more DLLs that
<tt>mod_dav_svn.so
</tt>
3045 relies on. If Apache is running as a service it will not have the
3046 same
<tt>PATH
</tt> as a regular user. Make sure that
3047 <tt>libdb4*.dll
</tt>,
<tt>libeay32.dll
</tt> and
<tt>ssleay32.dll
</tt>
3048 are present in either
<tt>\Apache\bin
</tt> or
3049 <tt>\Apache\modules
</tt>. You can copy them from your Subversion
3050 installation directory if they are not there.
</p>
3052 <p>If this still does not resolve the problem, you should use a tool
3053 like
<a href=
"http://www.dependencywalker.com">Dependency Walker
</a>
3054 on
<tt>mod_dav_svn.so
</tt> to see if there are any other unresolved
3060 <a name=
"win32-hooks"></a> <!-- for compatibility with old question -->
3061 <a name=
"hook-environment"></a> <!-- for yet more compatibility with old question -->
3062 <div class=
"h3" id=
"hook-debugging" title=
"hook-debugging">
3063 <h3>Why aren't my repository hooks working?
</h3>
3065 <p>They're supposed to invoke external programs, but the invocations
3066 never seem to happen.
</p>
3068 <p>Before Subversion calls a hook script, it removes
<em>all
</em>
3069 variables -- including $PATH on Unix, and %PATH% on Windows
3070 -- from the environment. Therefore, your script can only
3071 run another program if you
3072 spell out that program's absolute name.
</p>
3074 <p><b>Debugging tips:
</b></p>
3076 If you're using Linux or Unix, try running the script
"by hand", by
3077 following these steps:
</p>
3080 <li>Use
"su",
"sudo", or something similar, to become the user who
3081 normally would run the script. This might be
<tt>httpd
</tt> or
3082 <tt>www-data
</tt>, for example, if you're using Apache;
3083 it might be a user like
<tt>svn
</tt> if you're running
3084 svnserve and a special Subversion user exists. This
3085 will make clear any permissions problems that the script
3089 Invoke the script with an empty environment by using the
3090 "env" program. Here's an
3091 example for the post-commit hook:
3093 $ env - ./post-commit /var/lib/svn-repos
1234
3095 Note the first argument to
"env" is a dash; that's what
3096 ensures the environment is empty.
3099 Check your console for errors.
3106 <div class=
"h3" id=
"diff-cmd" title=
"diff-cmd">
3107 <h3>Why does my --diff-cmd complain about '-u'?
3108 I tried to override it with --extensions, but it's not working.
</h3>
3110 <p>When using an external diff command, Subversion builds a fairly
3111 complicated command line. First is the specified --diff-cmd. Next comes
3112 the specified --extensions (although empty --extensions are ignored), or
3113 '-u' if --extensions is unspecified (or specified as ''). Third and
3114 fourth, Subversion passes a '-L' and the first file's label (e.g.
3115 "project_issues.html (revision 11209)"). Fifth and sixth are another
3116 '-L' and the second label. Seventh and eighth are the first and second
3117 file names (e.g.
".svn/text-base/project_issues.html.svn-base" and
3118 ".svn/tmp/project_issues.html.tmp").
</p>
3120 <p>If your preferred diff command does not support these arguments, you
3121 may need to create a small wrapper script to discard arguments and just
3122 use the last couple file paths.
</p>
3124 <p>Warning: Beware that Subversion does not expect the external diff
3125 program to change the files it receives, and doing so may scramble the
3128 <p>For further information, see issue
3129 <a href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=2044">#
2044</a>.
</p>
3134 <div class=
"h3" id=
"plaintext-passwords" title=
"plaintext-passwords">
3135 <h3>Ahhh! I just discovered that my
3136 Subversion client is caching passwords in plain-text on disk!
3139 <p>Calm down, take a deep breath.
</p>
3141 <p>On Windows
2000 or later, svn
1.2 and above uses standard
3142 Windows APIs to encrypt the data, so only the user can decrypt the
3143 cached password.
</p>
3145 <p>On Mac OS X, svn
1.4 and later uses the system Keychain
3146 facility to encrypt/store your svn password.
</p>
3148 <p>On UNIX/Linux, there are no standard system encryption facilities,
3149 so the password is stored in ~/.subversion/auth/. Notice, however,
3150 that the directory which contains the cached passwords (usually
3151 ~/.subversion/auth/) has permissions of
700, meaning only you can read
3154 <p>Trust your OS to protect data on disk.
</p>
3156 <p>However, if you're really worried, you can permanently turn off
3157 password caching. With an svn
1.0 client, just set 'store-auth-creds
3158 = no' in your run-time config file. With an svn
1.1 client or later,
3159 you can use the more narrowly-defined 'store-passwords = no' (so that
3160 server certs are still cached). More information on password cacheing
3161 is in chapter
6 of the
<a
3162 href=
"http://svnbook.red-bean.com/nightly/en/index.html">"Nightly
3163 Build" Subversion book
</a>, under
3164 <a href=
"http://svnbook.red-bean.com/nightly/en/svn.serverconfig.netmodel.html#svn.serverconfig.netmodel.credcache">
3165 "Client Credentials Caching".
</a></p>
3167 <p>Lastly, we point out that CVS has been caching passwords for years
3168 in the .cvspass file. It may look like the passwords in .cvspass are
3169 encrypted, but in fact they're only lightly scrambled with an
3170 algorithm that's the moral equivalent to rot13. They can be cracked
3171 instantly. The only utility of the scrambling is to prevent users
3172 (like root) from accidentally seeing the password. Nobody's cared
3173 enough to do this for Subversion yet; if you're interested, send
3174 patches to the dev@ list.
</p>
3179 <div class=
"h3" id=
"bdb41-tabletype-bug" title=
"bdb41-tabletype-bug">
3180 <h3>I'm getting the error
"svn: bdb: call
3181 implies an access method which is inconsistent with previous
3182 calls". How do I fix this?
</h3>
3184 <p>Berkeley DB
4.1 has shown itself to be rather unstable - both
4.0
3185 and
4.2 are better. This error message is a symptom of one unique way
3186 in which
4.1 will sometimes break.
</p>
3188 <p>The problem is that the database format field for one of the tables
3189 that make up a Subversion repository using the Berkeley DB backend has
3190 become corrupted. For unknown reasons, this is almost always the
3191 'copies' table, which switches from the 'btree' type to the 'recno'
3192 type. Simple recovery procedures are outlined below - if they do not
3193 succeed, you should contact the Subversion Users
<a
3194 href=
"mailto:users@subversion.tigris.org">mailing list
</a>.
</p>
3197 <li>Ensure that no other processes will attempt to access your
3199 <li>Now,
<b>back up your repository
</b> to a tar or zip file or
3201 <li>Change to the
<tt>db
</tt> subdirectory of your repository.
</li>
3202 <li><tt>rm __db.* log.*
</tt></li>
3203 <li><tt>db_dump -p -r copies
> copies.dump
</tt></li>
3204 <li>Now edit
<tt>copies.dump
</tt>. In the section near the top,
3205 change
"<tt>type=recno</tt>" to
"<tt>type=btree</tt>", and delete
3206 the line beginning
"<tt>re_len=</tt>".
</li>
3207 <li><tt>rm copies
</tt></li>
3208 <li><tt>db_load copies
< copies.dump
</tt></li>
3209 <li><tt>svnadmin dump ..
> ../../my-recovered.svndump
</tt></li>
3210 <li>Now create a new repository, reload the dump file just produced,
3211 and copy across any custom hooks or configuration. Verify that the
3212 highest revision number in the new repository is what you think it
3219 <div class=
"h3" id=
"hotcopy-large-repos" title=
"hotcopy-large-repos">
3220 <h3>I can't hotbackup my repository,
3221 svnadmin fails on files larger than
2Gb!
</h3>
3223 <p>Early versions of APR on its
0.9 branch, which Apache
2.0.x and
3224 Subversion
1.x use, have no support for copying large files (
2Gb+).
3225 A fix which solves the 'svnadmin hotcopy' problem has been applied and
3226 is included in APR
0.9.5+ and Apache
2.0.50+. The fix doesn't work
3227 on all platforms, but works on Linux.
3233 <div class=
"h3" id=
"hidden-log" title=
"hidden-log">
3234 <h3>I cannot see the log entry for the file
3235 I just committed. Why?
</h3>
3237 <p>Assume you run '
<tt>svn
checkout
</tt>' on a repository and
3238 receive a working copy at revision
7 (aka, r7) with one file in it
3239 called
<tt>foo.c
</tt>. You modify the file and commit it
3240 successfully. Two things happen:
</p>
3243 <li>The repository moves to r8 on the server.
</li>
3244 <li>In your working copy, only the file
<tt>foo.c
</tt> moves to r8.
3245 The rest of your working copy remains at r7.
</li>
3248 <p>You now have what is known as a
<i>mixed revision working copy
</i>.
3249 One file is at r8, but all other files remain at r7 until they too are
3250 committed, or until '
<tt>svn
update
</tt>' is run.
</p>
3252 <pre> $ svn -v status
3257 <p>If you run the '
<tt>svn
log
</tt>' command without any
3258 arguments, it prints the log information for the current directory
3259 (named '
<tt>.
</tt>' in the above listing). Since the directory itself
3260 is still at r7, you do not see the log information for r8.
</p>
3262 <p>To see the latest logs, do one of the following:
</p>
3265 <li>Run '
<tt>svn
log
-rHEAD
</tt>'.
</li>
3266 <li>Run '
<tt>svn
log
URL
</tt>', where URL is the repository URL.
</li>
3267 <li>Ask for just that file's log information, by running
3268 '
<tt>svn
log
foo.c
</tt>'.
</li>
3269 <li>Update your working copy so it's all at r8, then run
3270 '
<tt>svn
log
</tt>'.
</li>
3276 <div class=
"h3" id=
"bdb43-upgrade" title=
"bdb43-upgrade">
3277 <h3>After upgrading to Berkeley DB
3278 4.3 or later, I'm seeing repository errors.
</h3>
3280 <p>Prior to Berkeley DB
4.3,
<tt>svnadmin recover
</tt> worked to upgrade a
3281 Berkeley DB repository in-place. However, due to a change in the behaviour
3282 of Berkeley DB in version
4.3, this now fails.
</p>
3284 <p>Use this procedure to upgrade your repository in-place to Berkeley
3285 DB
4.3 or later:
</p>
3289 <li>Make sure no process is accessing the repository (stop
3290 Apache, svnserve, restrict access via file://, svnlook, svnadmin,
3293 <li>Using an
<i>older
</i> <tt>svnadmin
</tt> binary (that is, linked to
3294 an older Berkeley DB):
3299 repository: '
<tt>svnadmin
recover
/path/to/repository
</tt>'
</li>
3301 <li>Make a backup of the repository.
</li>
3303 <li>Delete all unused log files. You can see them by running
3304 '
<tt>svnadmin
list-unused-dblogs
/path/to/repeository
</tt>'
</li>
3306 <li>Delete the shared-memory files. These are files in the
3307 repository's
<tt>db/
</tt> directory, of the form
<tt>__db
.00*
</tt></li>
3315 <p>The repository is now usable by Berkeley DB
4.3.
</p>
3320 <div class=
"h3" id=
"tiger-apr-0.9.6" title=
"tiger-apr-0.9.6">
3321 <h3>Why do I get occasional, seemingly inconsistent errors when checking
3322 out over http:// from a repository running on MacOS X
10.4 (Tiger)?
</h3>
3324 <p>Note: this assumes the repository is being served by Apache
2.0.x.
</p>
3326 <p>There is
<a href=
"http://issues.apache.org/bugzilla/show_bug.cgi?id=34332"
3327 >a bug in APR
0.9.6</a> that is present when it is running on Tiger,
3328 and shows up when you attempt to check out a file larger than
64Kb.
3329 The resulting checkout fails, often with unpredictable error messages.
3330 Here are some examples of what you might see on the client side, the
3331 specific errors may differ for you:
</p>
3334 svn: Invalid diff stream: [tgt] insn
1 starts beyond the target view position
3338 svn: Unexpected end of svndiff input
3342 svn: REPORT request failed on '/path/to/repository'
3343 svn: REPORT of '/path/to/repository/!svn/vcc/default': Chunk delimiter was invalid
3346 <p>There may also be errors in the Apache error_log, such as:
</p>
3349 [error] Provider encountered an error while streaming a REPORT response. [
500, #
0]
3350 [error] A failure occurred while driving the update report editor [
500, #
190004]
3353 <p>To confirm the presence of this bug
— assuming
3354 you have access to the machine that the repository is being served
3355 from
— try checking out using a file:// URL, which
3356 will access the filesystem directly instead of going through Apache.
3357 If the resulting checkout completes successfully, then it is almost
3358 certain that this is the problem.
</p>
3360 <p>Currently, the best solution is to upgrade to APR
1.2.0+.
</p>
3362 <p>Alternately, you can rebuild Apache and Subversion from their
3363 respective sources, setting the following environment variable before
3364 running configure for Apache:
</p>
3367 setenv ac_cv_func_poll no
3370 <p>or in Bourne shell syntax, like this:
</p>
3373 ac_cv_func_poll=no; export ac_cv_func_poll
3376 <p>If you built APR / APRUTIL separately (i.e., you did not use the
3377 ones that come as part of the Apache tarball), you must set that
3378 environment variable before running configure for APR, as this is
3379 where the problem lies.
</p>
3384 <div class=
"h3" id=
"debian-libtool" title=
"debian-libtool">
3385 <h3>I can't build Subversion from working copy
3386 source on Debian GNU/Linux; I get errors at the final link
3387 stage. What's wrong?
</h3>
3389 <p>If you see errors like this in the final link stage of a Subversion
3390 trunk source build:
</p>
3393 /usr/local/apache2/lib/libaprutil-
0.so
.0: undefined reference to `db_create'
3394 /usr/local/apache2/lib/libaprutil-
0.so
.0: undefined reference to `db_strerror'
3397 <p>it might be because you're on a Debian GNU/Linux system and need to
3398 upgrade 'libtool'. (I've also heard that the Debian packagers had to
3399 tweak 'libtool' and that this may cause some problems for Subversion
3400 builds. But that's hearsay
— I didn't have time to
3401 verify the details before writing this FAQ entry. However, see
<a
3402 href=
"http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=112617"
3403 >http://subversion.tigris.org/servlets/ReadMsg?list=dev
&msgNo=
112617</a>
3405 href=
"http://subversion.tigris.org/servlets/BrowseList?list=dev&by=thread&from=435265"
3406 >thread
</a> it spawned for a detailed discussion.)
</p>
3408 <p>In any case, after encountering this problem on a Debian GNU/Linux
3409 system running a newly-dist-upgraded 'testing' distribution on
15 Nov
3410 2005, the solution was to build
<a
3411 href=
"http://www.gnu.org/software/libtool/libtool.html">libtool
1.5.20</a>
3412 from source, using the standard
"./configure && make &&
3413 sudo make install" recipe. After that, I did a 'make
clean' in
3414 my Subversion working copy tree, './autogen.sh', './configure', 'make',
3415 and everything worked fine.
</p>
3417 <p>Note that another report of these symptoms appeared at
<a
3418 href=
"http://svn.haxx.se/dev/archive-2003-01/1125.shtml"
3419 >http://svn.haxx.se/dev/archive-
2003-
01/
1125.shtml
</a>, though the
3420 solution described here was not mentioned in that thread.
</p>
3425 <div class=
"h3" id=
"freebsd-listen-host" title=
"freebsd-listen-host">
3426 <h3>I'm using FreeBSD, and I've started svnserve, but it doesn't seem
3427 to be listening on port
3690.
</h3>
3429 <p>Short answer: invoke
<tt>svnserve
</tt> with
3430 the
<tt>--listen-host=
0.0.0.0</tt> option.
</p>
3431 <p>Slightly longer answer: FreeBSD daemons only listen on tcp6 by
3432 default; that option tells them to also listen on tcp4.
</p>
3435 <div class=
"h3" id=
"already-under-version-control" title=
"already-under-version-control">
3436 <h3>I can't add a directory
3437 because Subversion says it's
"already under version control".
</h3>
3438 <p>The directory you're trying to add already contains
3439 a
<tt>.svn
</tt> subdirectory, but it's from a different repository
3440 than the directory to which you're trying to add it. This probably
3441 happened because you used your operating system's
"copy" command to
3442 copy one working copy into the current one.
</p>
3444 The quick and dirty solution is to delete all
<tt>.svn
</tt>
3445 directories contained in the directory you're trying to add; this
3446 will let the
"add" command complete. If you're using Unix, this
3447 command will delete
<tt>.svn
</tt> directories
3448 under
<tt>dir
</tt>:
</p>
3450 find dir -type d -name .svn -exec rm -rf {} \;
3452 <p>However, you should ask yourself
<em>why
</em> you made this copy;
3453 and you should ensure that by adding this directory, you won't be
3454 making an unwanted copy of it in your repository.
3459 <div class=
"h3" id=
"slow-private-svnserve" title=
"slow-private-svnserve">
3460 <h3>Accessing non-public repositories
3461 via svnserve is really slow sometimes.
</h3>
3463 <p>This often happens when APR is compiled to use
<tt>/dev/random
</tt>
3464 and the server is unable to gather enough entropy. If Subversion is the
3465 only application using APR on the server, you can safely recompile APR
3466 with the
<tt>--with-devrandom=/dev/urandom
</tt> option passed to
3467 <tt>configure
</tt>. This should
<b>not
</b> be done on systems that use
3468 APR for other processes, however, as it could make other services
3473 <div class=
"h3" id=
"ssl-negotiation-error" title=
"ssl-negotiation-error">
3474 <h3>When performing Subversion operations involving a lot of data over
3475 SSL, I get the error
<tt>SSL negotiation failed: SSL error:
3476 decryption failed or bad record mac
</tt>.
</h3>
3478 <p>This can occur due to a problem with OpenSSL
0.9.8. Downgrading to
3479 an older version (or possibly upgrading to a newer version) is known
3480 to fix this issue.
</p>
3484 <div class=
"h3" id=
"broken-subclipse" title=
"broken-subclipse">
3485 <h3>I get an error that says
"This client is too old".
</h3>
3487 You're using both an older (pre-
1.4) version of the Subversion
3488 command-line client, and Subclipse. You recently upgraded Subclipse,
3489 and now your command-line client says
3492 svn: This client is too old to work with working copy
3493 '/path/to/your/working/copy'; please get a newer Subversion client
3496 This happened because Subversion's working-copy format changed
3497 incompatibly
—the new version of Subclipse upgraded your working
3498 copy, so now your command-line program, which is old, cannot read it.
3499 (This problem isn't specific to Subclipse; it would also have happened
3500 if you'd used a command-line client that was
1.4 or newer, along with
3501 your older command-line client.)
3503 The fix is simply to upgrade your command-line client to
1.4 or newer.
3507 <div class=
"h3" id=
"switch-problems" title=
"switch-problems">
3508 <h3>Why doesn't
<tt>svn switch
</tt> work in some cases?
</h3>
3510 <p>In some cases where there are unversioned (and maybe ignored) items
3511 in the working copy,
<tt>svn switch
</tt> can get an error. The switch
3512 stops, leaving the working copy half-switched.
</p>
3514 <p>Unfortunately, if you take the wrong corrective action you can end
3515 up with an unusable working copy. Sometimes with these situations,
3516 the user is directed to do
<tt>svn cleanup
</tt>. But the
<tt>svn
3517 cleanup
</tt> may also encounter an error. See
<a
3518 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=2505">issue
3521 <p>The user can manually remove the directories or files causing
3522 the problem, and then run
<tt>svn cleanup
</tt>, and continue the switch, to
3523 recover from this situation.
</p>
3525 <p>Note that a switch from a
<i>pristine
</i> clean checkout always
3526 works without error. There are three ways of working if you are using
3527 <tt>svn switch
</tt> as part of your development process:
</p>
3531 <li>Fully clean your working copy of unversioned (including ignored)
3532 files before switching.
<br/><b>WARNING! This deletes all unversioned
3533 dirs/files. Be VERY sure that you do not need anything that will be
3538 # Check and delete svn unversioned files:
3539 svn status --no-ignore | grep '^[I?]' | sed 's/^[I?]//'
3540 svn status --no-ignore | grep '^[I?]' | sed 's/^[I?]//' | xargs rm -rf
3546 <li>Keep a
<i>pristine
</i> clean checkout. Update that, then copy it,
3547 and switch the copy when a switch to another branch is desired.
</li>
3549 <li>Live dangerously :).
3550 Switch between branches without cleaning up BUT if you encounter a switch error
3551 know that you have to recover from this properly.
3552 Delete the unversioned files and the directory that the error was reported on.
3553 Then
"svn cleanup" if needed and then resume the switch.
3554 Unless you delete
<em>all
</em> unversioned files, you may have to repeat this
3555 process multiple times.
</li>
3559 <p>Some examples are detailed
3560 <a href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=2505">here in issue
2505</a>.
3561 The problem is that the svn client plays it
3562 safe and doesn't want to delete anything unversioned.
3565 <p>Two specific examples are detailed here to illustrate a problem like this.
3566 There are also other svn switch errors, not covered here, which you
3567 can avoid by switching only from a
<em>pristine
</em> checkout.
</p>
3571 <li>If any directory has been moved or renamed between the branches, then
3572 anything unversioned will cause a problem.
3573 In this case, you'll see this error:
3577 wc/$ svn switch $SVNROOT/$project/branches/$ticket-xxx
3578 svn: Won't delete locally modified directory '
<dir
>'
3579 svn: Left locally modified or unversioned files
3582 <p>Removing all unversioned files, and continuing the switch will recover from this.
</p>
3585 <li>If a temporary build file has ever been added and removed, then a switch
3586 in a repository with that unversioned file (likely after a build) fails.
3587 You'll see the same error:
3591 wc/$ svn switch $SVNROOT/$project/branches/$ticket-xxx
3592 svn: Won't delete locally modified directory '
<dir
>'
3593 svn: Left locally modified or unversioned files
3597 <p>In this case, just removing the unversioned items will not recover.
3598 A cleanup fails, but svnswitch directs you to run
"svn cleanup".
</p>
3602 wc/$ svn switch $SVNROOT/$project/branches/$ticket-xxx
3603 svn: Directory '
<dir
>/.svn' containing working copy admin area is missing
3605 svn: '
<dir
>' is not a working copy directory
3606 wc/$ svn switch $SVNROOT/$project/branches/$ticket-xxx
3607 svn: Working copy '.' locked
3608 svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
3612 <p>Removing the directory (and all other unversioned files, to prevent
3613 "switch" from breaking on a similar error repeatedly), and continuing the switch
3614 will recover from this.
</p>
3619 <p>The TortoiseSVN cleanup error is a bit different. You might encounter this:
3623 Subversion reported an error while doing a cleanup!
3624 <dir
>/
<anotherdir
> is not a working copy directory
3628 <p>In each case here, the
"svn switch" breaks leaving you with a half-switched
3629 working copy.
"svn status" will show items with S for switched items (different
3630 from top directory), ! for directories with problems, and ~ for the files that are
3631 the problem (and with maybe L for locked). Like this:
</p>
3637 S
<switched_things
>
3638 ~
<dir
>/
<thing_that_is_now_unversioned
>
3644 <div class=
"h3" id=
"long-paths" title=
"long-paths">
3645 <h3>In Windows, when doing an update with the command-line client, I
3646 get an error saying
"The system cannot find the path specified"
3647 and suggesting that my working copy might be corrupt. But I can
3648 update with TortoiseSVN just fine. What's going on?
</h3>
3650 <p>A careful examination of the Windows API documentation regarding
<a
3651 href=
"http://msdn2.microsoft.com/en-us/library/aa365247.aspx#maximum_path_length"
3652 >Naming a File
</a> reveals the most common reason why this happens. In
3653 short, you can address significantly longer path names when using the
3654 Unicode versions of the Windows path functions, and providing absolute
3655 path specifiers instead of relative path specifiers. Fortunately, the
3656 Apache Portable Runtime (APR) library that Subversion uses
3657 transparently converts absolute paths (like
3658 <tt>C:\WorkingCopy\file.txt
</tt>) into the form required by the
3659 Windows APIs (
<tt>\\?\C:\WorkingCopy\file.txt
</tt>), and back again.
3660 <em>Unfortunately
</em>, you only get these long-path benefits when
3661 using absolute paths.
</p>
3663 <p>To see if path length is the reason for the problem you're seeing,
3664 try providing an absolute target path to the Subversion command-line
3665 client instead of a relative one (or none at all). In other words,
3666 instead of doing this:
</p>
3670 C:\
> svn up WorkingCopy
3678 C:\
> cd C:\WorkingCopy
3679 C:\WorkingCopy
> svn up
3687 C:\
> svn update C:\WorkingCopy
3691 <p>If the problem goes away, congratulations
— you've hit a
3692 Windows path length limitation. And now you know the workaround.
</p>
3694 <p><strong>Why does this problem not affect TortoiseSVN?
</strong>
3695 Because TortoiseSVN
<em>always
</em> provides absolute paths to the
3696 Subversion APIs.
</p>
3698 <p><strong>Why, then, does the Subversion command-line client not
3699 always convert its input into absolute paths and use those?
</strong>
3700 The Subversion developers have been operating under the principle
3701 that, for reasons of user experience, the display of paths in the
3702 tool's output should match the syntax of the paths provided as input.
3703 And while conversion to an absolute path from a relative one is a
3704 fairly trivial operation, the reverse transformation is fraught with
3705 complexities. (In other words, it's a hard problem not high on our
3711 id=
"working-copy-format-change" title=
"working-copy-format-change">
3712 <h3>I got an error saying
"This client is too old to work with working
3713 copy '...' ". How can I fix it without upgrading Subversion?
</h3>
3715 <p>Sometimes the working copy metadata format changes incompatibly
3716 between minor releases. For example, say you have a working copy
3717 created with Subversion
1.4.4, but one day you decide to try out
3718 Subversion
1.5.0. Afterwards, you attempt to switch back to
1.4.4,
3719 but it doesn't work
— it just gives the above
3722 <p>This is because
1.5.0 upgraded your working copy format to support
3723 some new features (in this case, changelists, the keep-local flag, and
3724 variable-depth directories). Although
1.4.4 doesn't know anything
3725 about these new features, it can at least recognize that the working
3726 copy format has been upgraded to something higher than it can
3729 <p>1.5.0 upgraded the working copy for a good reason: it realizes that
3730 1.4.4 does not know about these new features, and that if
1.4.4 were
3731 to meddle with the working copy metadata now, important information
3732 might be lost, possibly causing corruption (see
<a
3733 href=
"http://subversion.tigris.org/issues/show_bug.cgi?id=2961" >issue
3734 #
2961</a>, for example).
</p>
3736 <p>But this automatic upgrade behavior can be annoying, if you just
3737 want to try out a new release of Subversion without installing it
3738 permanently. For this reason, we distribute a script that can
3739 downgrade working copies when doing so is safe:
</p>
3743 href=
"http://svn.collab.net/repos/svn/trunk/tools/client-side/change-svn-wc-format.py"
3744 >http://svn.collab.net/repos/svn/trunk/tools/client-side/change-svn-wc-format.py
</a></p>
3747 <p>Run that script with the
"<tt>--help</tt>" option to see how to use
3748 it. As future versions of Subversion are released, we will try to
3749 keep this FAQ entry up-to-date with potential downgrade scenarios and
3750 their implications.
</p>
3757 <div class=
"h2" id=
"developer-questions" title=
"developer-questions">
3758 <h2>Developer questions:
</h2>
3761 <div class=
"h3" id=
"ramdisk-tests" title=
"ramdisk-tests">
3762 <h3>How do I run the regression tests in a
3765 <p>Test execution can be dramatically sped up by keeping Subversion
3766 test data on a RAM disk. On a Linux system, you can mount a RAM disk
3767 on the fly with the command:
</p>
3770 <div><code>mount -t tmpfs tmpfs
3771 /path/to/src/subversion/tests/cmdline/svn-test-work
3772 -o uid=$USER,mode=
770,size=
32m
</code></div>
3775 <p>Or, for a more permanent solution, add lines like the following in
3776 your
<code>/etc/fstab
</code> file:
</p>
3779 <div><code>tmpfs /path/to/src/svn/subversion/tests/cmdline/svn-test-work
3780 tmpfs defaults,user,noauto,exec,size=
32m
</code></div>
3783 <p>The minimum required size for testing ramdisk is approximately
700MB.
3784 However, flagging your test targets for cleanup dramatically reduces
3785 the space requirements (as shown in the example configuration above),
3786 and thus your memory usage. Cleanup means more I/O, but since test
3787 data is in-memory, there will be no performance degradation. Example:
</p>
3789 <blockquote><div><code>
3790 make check CLEANUP=true
3791 </code></div></blockquote>
3793 <p>See
<a href=
"http://svn.haxx.se/dev/archive-2003-02/0068.shtml"
3794 >http://svn.haxx.se/dev/archive-
2003-
02/
0068.shtml
</a> for the
3795 original authoritative discussion on use of RAM disks.
</p>
3800 <div class=
"h3" id=
"dynamic-exe-debugging" title=
"dynamic-exe-debugging">
3802 <h3>How do I run a debugger on dynamic Subversion binaries without
3803 having to install them?
</h3>
3805 <p>Before the
<code>make install
</code> step on unix-y systems,
3806 dynamically built
"executables" in a Subversion source tree are
3807 actually libtool-generated shell scripts which re-link and run the
3808 real binary. As shown below, this complicates debugging:
</p>
3811 <div><code>subversion$ gdb subversion/svn/svn
</code></div>
3812 <div><code>...
"/path/to/subversion/subversion/svn/svn": not in
3813 executable format: File format not recognized
</code></div>
3816 <p>While this can be worked around by building using the
3817 <code>--disable-shared
</code> argument to configure to statically link
3818 the binaries, or installing them and pointing your debugger at the
3819 installed version, it's often necessary or more expedient to be able
3820 to debug them right within your source tree.
</p>
3822 <p>To do so, edit the last
<code>exec
</code> statement in the shell
3823 script to run the real binary in your debugger. With gdb, this
3824 amounts to replacing
<code>exec
"$progdir/$progname"</code> with
3825 <code>exec gdb --args
"$progdir/$progname"</code>.
</p>
3827 <p>This trick is also very useful when applied to the
3828 libtool-generated shell scripts for the white box tests.
</p>
3833 <div class=
"h3" id=
"avoiding-compiler-inlining"
3834 title=
"avoiding-compiler-inlining">
3836 <h3>How do I run a debugger on Subversion binaries without compiler
3837 inlining obfuscating the source?
</h3>
3839 <p>By default, gcc will often optimize away private variables and
3840 functions, inlining the associated operations. This can complicate
3841 stepping through the code in a debugger.
</p>
3843 <p>Work around this by turning off optimization during the
3844 <code>make
</code> step on unix-y systems:
</p>
3847 <div><code>subversion$ make EXTRA_CFLAGS=-O0
</code></div>
3850 <p>(That's
"dash ohh zero".) Alternately, you can make this change
3851 more permanent by running
<code>configure
</code> as follows:
</p>
3854 <div><code>subversion$ ./configure --enable-debug
</code></div>
3857 <p>For a production install, remember to undo this operation before
3858 installing Subversion from source, by re-running
<code>make
</code> or
3859 <code>configure
</code> without the extra flag.
</p>
3866 <div class=
"h2" id=
"references" title=
"references">
3867 <h2>References:
</h2>
3870 <div class=
"h3" id=
"http-methods" title=
"http-methods">
3871 <h3>What are all the HTTP methods Subversion
3874 <p>The Subversion client speaks a subset the WebDAV/DeltaV protocol to
3875 the mod_dav_svn server module. The short answer is:
</p>
3878 OPTIONS, PROPFIND, GET, REPORT,
3879 MKACTIVITY, PROPPATCH, PUT, CHECKOUT, MKCOL,
3880 MOVE, COPY, DELETE, LOCK, UNLOCK, MERGE
3883 <p>The details of the protocol are documented here:
</p>
3885 <a href=
"http://svn.collab.net/repos/svn/trunk/notes/webdav-protocol">http://svn.collab.net/repos/svn/trunk/notes/webdav-protocol
</a>
3892 <div class=
"h3" id=
"bikeshed" title=
"bikeshed">
3893 <h3>What's a 'bikeshed'?
</h3>
3895 <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>.
3901 <div class=
"h3" id=
"pronounce" title=
"pronounce">
3902 <h3>How do you pronounce
"Subversion"?
</h3>
3904 <p>Jim Blandy, who gave Subversion both its name and repository
3905 design, pronounces
"Subversion" <a href=
"http://svn.collab.net/repos/svn-committers/trunk/sounds/pronunciation/index.html">"Subversion"</a>.
3911 <div class=
"h3" id=
"baton" title=
"baton">
3912 <h3>What's a 'baton'?
</h3>
3914 <p>Throughout Subversion's source code there are many references to
3915 'baton' objects. These are just
<tt>void *
</tt> datastructures that
3916 provide context to a function. In other APIs, they're often called
3917 <tt>void *ctx
</tt> or
<tt>void *userdata
</tt> Subversion
3918 developers call the structures
"batons" because they're passed around
3924 <div class=
"h3" id=
"def-wedged-repository" title=
"def-wedged-repository">
3925 <h3>What do you mean when you say that
3926 repository is 'wedged'?
</h3>
3928 <p>wedged repository:
</p>
3931 <p>A Subversion repository consists of two different internal parts, a
3932 working compartment and a storage compartment. A wedged repository is
3933 a repository where the working compartment is unaccessible for some
3934 reason, but the storage compartment is intact. Therefore, a wedged
3935 repository has not suffered any loss of data, but the working
3936 compartment has to be corrected before you can access the
3937 repository. See
<a href=
"#stuck-bdb-repos">this
</a> entry for details
3941 <p>corrupted repository:
</p>
3944 <p>A corrupted Subversion repository is a repository where the storage
3945 compartment has been damaged, and therefore there is some degree of
3946 real data loss in the repository.
</p>
3949 <p>You might also like to check The Jargon File's definition for
3950 <a href=
"http://catb.org/~esr/jargon/html/W/wedged.html">'wedged'
</a>.