Can't install hgsubversion

Haszlakiewicz, Eric EHASZLA at transunion.com
Wed May 18 20:41:03 UTC 2011


> -----Original Message-----
> From: mercurial-bounces at selenic.com [mailto:mercurial-
> 
> In message <E2317086-983E-461F-8260-362BC23F4B7F at durin42.com> on Wed,
> 27
> Apr 2011, Augie Fackler <raf at durin42.com> writes
> >>>> Do you know if it is hard to install Python-Subversion bindings on
> a
> >>>> computer where you don't have root access? My ultimate goal is to
> setup
> >>>> a mirror in Bitbucket but I can't use my personal computer for
> that
> >>>> because it is off a lot of the time.
> >
> >You should be able to install the (still experimental) subvertpy
> >bindings in a virtualenv along with Mercurial and hgsubversion. I've
> >done that to a limited extent with a buildbot and it works reasonably
> >well for those needs, I'd imagine you can make it work for your use
> >case as well.
> 
> Any chance that someone could write up some instructions for this?
> 
> Like Daniel, I work in a Linux environment (RHEL 5.5 in my case) where
> I
> don't have root access, so I got as far as hgsubversion complaining
> about svn bindings before giving up.
> 
> It's a shame that this isn't included with hg as standard, as it
> appears
> to be with gitsvn, since until we complete our transition to git repos
> at work, I'd much rather access our svn repo through hg than through
> git.

I don't know about the actual hgsubversion or subvertpy pieces, but here are the instructions we use to install Subversion as non-root.  This assumes you've also installed httpd, neon and swig in a similar way; if those are installed system wide you'll need to adjust this a bit.  (print_software_path is a script that prints out the path to where things should be installed)
I haven't actually tried using the python bindings, but I see .pyc files, so *something* worked.

================================
PACKAGE=subversion-1.6.15
PACKAGE_DIR=$(print_software_path)/${PACKAGE}
HTTPDIR=$(print_software_path)/httpd-2.2.15
NEONDIR=$(print_software_path)/neon-0.29.3
SWIGDIR=$(print_software_path)/swig-2.0.0
cd /software/src
bzip2 -c -d ${PACKAGE}.tar.bz2 | tar xf -
cd ${PACKAGE}
patch -p0 < ../svn-ra_plugin.c.diff
vi configure
# Look for NEON_ALLOWED_LIST.  Add 0.29.3 to the end of it.
tar -zxvf /software/src/sqlite-amalgamation-3.6.13.tar.gz
mv sqlite-3.6.13 sqlite-amalgamation

./configure --prefix="${PACKAGE_DIR}" --with-swig=${SWIGDIR} \
    --with-apxs=${HTTPDIR}/bin/apxs \
    --with-neon=${NEONDIR} \
    --with-apr=${HTTPDIR}/bin/apr-1-config \
    --with-apr-util=${HTTPDIR}/bin/apu-1-config
vi Makefile
# Look for APACHE_LIBEXECDIR.  Change $(DESTDIR) to $(prefix)
make
make install
make swig-py
make install-swig-py
make swig-pl-lib
make install-swig-pl-lib
cd subversion/bindings/swig/perl/native
$(print_software_path)/perl/bin/perl Makefile.PL PREFIX="${PACKAGE_DIR}"
make install
================================

eric



More information about the Mercurial mailing list