Notes on Life, ‘Puters and Hawaii

Install Bazaar Subversion on Mac OS X Leopard 10.5

I struggled but ultimately succeeded in installing Bazaar with bzr-svn (subversion support) on Leopard. I added the script to the bzr-svn wiki page. The following is how I got it to work:

# Install the latest stable Bazaar (if you didn't already)
sudo easy_install -U paramiko pycrypto bzr

# Compile Subversion 1.5 (for better python support)
cd /tmp
rm -rf svn
svn export http://svn.collab.net/repos/svn/trunk svn
cd svn
curl http://www.webdav.org/neon/neon-0.27.2.tar.gz | tar xz
ln -sf neon-0.27.2 neon
./autogen.sh
./configure --without-apxs --with-ssl --prefix=$HOME/.bazaar/svn
make install install-swig-py
cd ..

# Install the bzr_svn plugin
mkdir ~/.bazaar ~/.bazaar/plugins
cd ~/.bazaar/plugins
rm -rf svn
bzr checkout --lightweight \
  http://people.samba.org/bzr/jelmer/bzr-svn/stable svn
# The following is a temporary patch - it will core-dump without it
perl -p -i -e 's/(providers \+\= auth\.Subversion)/\#$1/g' svn/transport.py
perl -p -i -e 's/(providers \+\= \[auth\.get)/\#$1/g' svn/transport.py

# Setup your profile to recognize subversion 1.5
echo >> ~/.profile << \EOF
alias bzr="DYLD_LIBRARY_PATH=$HOME/.bazaar/svn/lib \
PYTHONPATH=$HOME/.bazaar/svn/lib/svn-python \
bzr"
EOF
. ~/.profile

# Test bzr + svn w/ ssl
cd /tmp
rm -rf test
bzr branch https://svn.collab.net/repos/svn/trunk test

4 Responses to “Install Bazaar Subversion on Mac OS X Leopard 10.5”

  1. [...] bookmarks tagged leopard Install Bazaar Subversion on Mac OS X Leopard 10.5 saved by 5 others     reihinofan bookmarked on 01/27/08 | [...]

  2. Hello!
    After doing all the steps you described
    > b branch https://svn.collab.net/repos/svn/trunk test
    gives:
    bzr: ERROR: Not a branch: “https://svn.collab.net/repos/svn/trunk/”.
    After doing branch on svn:// urls bzr hangs (not doing anything) after creating directory

    > b selftest svn
    gives:
    testing: /usr/local/bin/bzr
    /Library/Python/2.5/site-packages/bzr-1.1.0-py2.5-macosx-10.5-i386.egg/bzrlib (1.1.0 python2.5.1.final.0)

    FAIL: bzrlib.plugins.svn.tests.test_convert.TestConversionFromDumpfile.test_open_internal
    not equal:
    a = ‘file:///var/folders/NT/NTBcjcskFLymRWqZ+5KTrE+++TI/-Tmp-/testbzr-UmMmo9.tmp/tmpLiGTX5/work/e/trunk’
    b = ‘file:///var/folders/NT/NTBcjcskFLymRWqZ%2B5KTrE%2B%2B%2BTI/-Tmp-/testbzr-UmMmo9.tmp/tmpLiGTX5/work/e/trunk’

    ERROR: bzrlib.plugins.svn.tests.test_fetch.TestFetchWorks.test_fetch_special_char_child
    [u'e\u0301'] is not versioned.

    ERROR: bzrlib.plugins.svn.tests.test_fetch.TestFetchWorks.test_fetch_special_char_edit
    u’Io\u0308C’

    ERROR: bzrlib.plugins.svn.tests.test_fetch.TestFetchWorks.test_fetch_svk_merge
    class BzrSvnMappingv3 has no attribute ‘_svk_merged_revisions’

    XFAIL: bzrlib.plugins.svn.tests.test_push.PushNewBranchTests.test_push_overwrite
    push –overwrite not supported yet

    FAIL: bzrlib.plugins.svn.tests.test_repos.TestSubversionRepositoryWorks.test_follow_branch_switched_parents
    not equal:
    a = [('pygments/trunk', 3), ('pykleur/trunk', 2), ('pykleur/trunk', 1)]
    b = [('pykleur/trunk', 1)]

    Do you have any idea how to solve this?

  3. Sorry,
    > branch https://svn.collab.net/repos/svn/trunk test
    gives:
    Assertion failed: (g->gc.gc_refs != _PyGC_REFS_UNTRACKED), function instancemethod_dealloc, file Objects/classobject.c, line 2285.
    zsh: abort DYLD_LIBRARY_PATH=$HOME/.bazaar/svn/lib PYTHONPATH= PATH= bzr branch test

  4. Sorry, I had a few typos in the first post. I tried to correct them and I have been able to use it against a svn repo.

    Please try it again.

    It’s a work in progress though. The best thing I could suggest is nerves of steel and joining #bzr on freenode for help.