Table of Contents
There are a number of problems you may run into in the course of installing and using Subversion. Some of these will be resolved once you get a better idea of how Subversion does things, while others are caused because you're used to the way that other version control systems work. Still other problems might be unsolvable due to bugs in some of the operating systems that Subversion runs on (considering the wide array of OS'es that Subversion runs on, it's amazing that we don't encounter many more of these).
The following list has been compiled over the course of several years of Subversion usage, and they cover just about every frequently occurring problem that you'll see in Subversion—from building, to installing, to using Subversion. If you can't find the problem you're having here, or you've tried everything we recommend with no success, send mail to <users@subversion.tigris.org> with a detailed description of the problem you're having [46]
Problems Using Subversion
Every time I try to access my repository, svn just hangs.
Every time I try to run svn, it says my working copy is locked.
I'm getting errors finding or opening a repository, but I know my repository URL is correct.
How can I specify a Windows drive letter in a file:// URL?
I'm having trouble doing write operations to a Subversion repository over a network.
Under Windows XP, the Subversion server sometimes seems to send out corrupted data.
What is the best method of doing a network trace of the conversation between a Subversion client and server?
Problems Building Subversion
I just built the distribution binary, and when I try to check out Subversion, I get an error about an “Unrecognized URL scheme”.
When I run configure, I get errors like subs-1.sed line 38: Unterminated `s' command.
I'm having trouble building Subversion under Windows with MSVC++ 6.0.
Subversion uses Berkeley DB, which keeps your data in a series of database files. Berkeley DB is journaling system, meaning that it logs every action it is about to perform before it actually performs the action. If your client is interrupted while in the process of talking to the database, then a lockfile is left behind in the database, along with a log file describing the unfinished actions.
Any other client that attempts to access the database will just hang, waiting for the lockfile to disappear. To awaken your repository, you need to tell Berkeley DB to either finish the work, or rewind the database to a previous state that is known to be consistent. To do this, run the following command from the machine that contains your Subversion Repository:
$ svnadmin recover /path/to/repos
Be sure that you disable all access to the repository before doing this (by shutting down httpd or svnserve). Make sure you run this command as the user that owns and manages the database, and not as root, else it will leave root-owned files in the db/ directory which cannot be opened by the non-root user that manages the database, which is typically either you or your Apache httpd process.
Subversion's working copy, just like Berkeley DB, uses a journaling mechanism to perform all actions. That is, it logs everything it is about to do before it does so. If svn is interrupted while performing an action, then one or more lockfiles are left behind, along with log files describing then unfinished actions. (svn status will show an L next to locked directories.)
Any other process that attempts to access the working copy will fail when it sees the locks. To awaken your working copy, you need to tell the svn client to finish the work. To fix this, run this command from the top of your working copy:
$ svn cleanup working-copy
See the section called “Every Time I Try to Access My Repository, My Subversion Client Just Hangs.”.
See Repository URLs.
If import works fine over local access:
$ mkdir test $ touch test/testfile $ svn import test file:///var/svn/test -m "Initial import" Adding test/testfile Transmitting file data . Committed revision 1.
But not from a remote host:
$ svn import test http://svn.red-bean.com/test -m "Initial import" harry's password: xxxxxxx svn_error: #21110 : The specified activity does not exist.
We've seen this when the REPOS/dav/ directory is not writable by the httpd process. Check the permissions to ensure that Apache httpd can write to the dav/ directory (and to the corresponding db/ directory, of course).
You need to install Window XP Service Pack 1. You can get all sorts of information about that Service Pack at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q317949 for details.
Use Ethereal to eavesdrop on the conversation:
The following instructions are specific to the graphical version of Ethereal, and may not apply to the command line version (whose binary is usually named tethereal).
Pull down the Capture menu, and choose Start.
Type port 80 for Filter, and turn off promiscuous mode.
Run your Subversion client.
Hit Stop. Now you have a capture. It looks like a huge list of lines.
Click on the Protocol column to sort.
Then, click on the first relevant TCP line to select it.
Right click, and choose Follow TCP Stream. You'll be presented with the request/response pairs of the Subversion client's HTTP conversion.
Alternatively, you may set the http-debug parameter in the server's configuration file to cause neon's debugging output to appear when you run the svn client. The numeric value of neon-debug is a combination of the NE_DBG_* values in the header file ne_utils.h. Setting http-debug to 130 (i.e. NE_DBG_HTTP + NE_DBG_HTTPBODY) will cause the HTTP data to be shown.
You may well want to disable compression when doing a network trace, see the compression parameter in the config configuration file.
Subversion uses a plugin system to allow access to repositories. Currently there are three of these plugins: ra_local allows access to a local repository, ra_dav which allows access to a repository via WebDAV, and ra_svn allows local or remote access via the svnserve server. When you attempt to perform an operation in Subversion, the client tries to dynamically load a plugin based on the URL scheme. A file:// URL will try to load ra_local, an http:// URL will try to load ra_dav, and so on.
The error you are seeing means that the dynamic linker/loader can't find the plugins to load. This normally happens when you build Subversion with shared libraries, then attempt to run it without first running make install' Another possible cause is that you ran make install, but the libraries were installed in a location that the dynamic linker/loader doesn't recognize. Under Linux, you can allow the linker/loader to find the libraries by adding the library directory to /etc/ld.so.conf and running ldconfig. If you don't wish to do this, or you don't have root access, you can also specify the library directory in the LD_LIBRARY_PATH environment variable.
You probably have old copies of /usr/local/bin/apr-config and /usr/local/bin/apu-config on your system. Remove them, make sure the apr/ and apr-util/ that you're building with are completely up-to-date, and try again.
[46] Remember that the amount of detail you provide about your setup and your problem is directly proportional to the likelihood of getting an answer from the mailing list. You're encouraged to include everything short of what you had for breakfast and your mother's maiden name.