by mars on 2009-01-10 0 Comments
filed in Work with tags , ,

I recently tried to do a Subversion copy from a remote repository into my local working copy, but I got a segmentation fault, like this:

% svn cp http://xxxxx.xxxxx.com/xxxxx/xxxxx/xxxxx
Segmentation fault

It leaves behind an unversioned .tmp copy of the file being copied, & svn cleanup must be run to release the lock. (I'm using OS X 10.5.6 Leopard [Darwin]).

Here's the info for my local working copy...

% svn info
Path: .
URL: http://mars@xxxxx.xxxxx.com/xxxxx/xxxxx
Repository Root: http://mars@xxxxx.xxxxx.com/xxxxx
Repository UUID: xxxxx-xxxxx-xxxxx
Revision: 11327
Node Kind: directory
Schedule: normal
Last Changed Author: mars
Last Changed Rev: 11327
Last Changed Date: 2009-01-06 15:46:57 -0800 (Tue, 06 Jan 2009)

The Fix

The working copy URL has a username prefixmars@ that the svn cp URL is missing. So switch the local copy URL to drop the username prefix:

% svn switch --relocate http://mars@xxxxx.xxxxx.com/xxxxx/xxxxx http://xxxxx.xxxxx.com/xxxxx/xxxxx

Now the svn cp ... will work without segfaulting.

Epilog

My favorite GUI Subversion client Versions.app checks out local copies with this "username@" URL convention. Fortunately, switching the URL seems to have no effect on Versions' ability to use the working copy.

Leave a Reply

Markdown is in effect.



Everything is here.