missingupstream - How to fix missing upstream directories in subversion


Sometime it happens that svn-upgrade dies because svn+ssh:// or svn+ssh:// as a whole is missing -- however that can happen with svn-inject ...

This mini HOWTO shows an easy way to load the required files into the correct place.


There's a script that automates all of this now, download it from and run it inside the packages checked out SVN directory (same place you would run svn-upgrade).


A nice tool for loading a tarball into svn is svn_load_dirs. It doesn't exist in Debian anymore (maybe because it doesn't have a copyright/license statement in the code, and that's why I'm just pointing to the URL instead of putting it into our repository) but it's still available on the web: Both the script and a README can be found at

So just grab, save it as svn_load_dirs somewhere in your $PATH and replace @SVN_BINDIR in line 26 with /usr/bin.


Obviously you need the tarball you want to get into svn. Since the repository should mirror what's in the archive getting the source package is usually the way to go:

   apt-get source -d PACKAGE[=DEBIANVERSION]

Unpack the tarball:

   tar xzf PACKAGE_UPSTREAMVERSION.orig.tar.gz

And then use svn_load_dirs:

   svn_load_dirs svn+ssh:// \
   branches/upstream/PACKAGE/current \
   -t branches/upstream/PACKAGE/UPSTREAMVERSION \

This creates (if necessary) branches/upstream/PACKAGE and branches/upstream/PACKAGE/current, loads the contents of UNPACKED-TARBALL-DIR into branches/upstream/PACKAGE/current and tags branches/upstream/PACKAGE/current as branches/upstream/PACKAGE/UPSTREAMVERSION.

Now svn-upgrade should work as expected.

(Maybe someone wants to write a nice wrapper script around these 3 commands?)





Copyright (c) 2009 by the individual authors and contributors noted above. All rights reserved. This document is free software; you may redistribute it and/or modify it under the same terms as Perl itself

Perl is distributed under your choice of the GNU General Public License or the Artistic License. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL and the Artistic License in /usr/share/common-licenses/Artistic.