Package: svn-buildpackage Version: 0.8.0~svn+nmu1 Severity: wishlist File: /usr/bin/svn-inject Tags: patch
Hi, the attached patch tries to move creating all missing directories in the repository structure to a single commit. This patch is for current svn with the patch from #575606 applied. Andreas -- System Information: Debian Release: squeeze/sid APT prefers stable APT policy: (800, 'stable'), (700, 'testing'), (600, 'unstable'), (130, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-3-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages svn-buildpackage depends on: ii devscripts 2.10.61 scripts to make the life of a Debi ii file 5.04-1 Determines file type using "magic" ii libcapture-tiny-perl 0.07-1 module to capture STDOUT and STDER ii libfile-libmagic-perl 0.91-2 Perl interface to libmagic for det ii liblocale-gettext-perl 1.05-6 Using libc functions for internati ii libsvn-perl 1.6.9dfsg-1 Perl bindings for Subversion ii liburi-perl 1.52-1 module to manipulate and access UR ii perl 5.10.1-11 Larry Wall's Practical Extraction ii subversion 1.6.9dfsg-1 Advanced version control system ii unp 1.0.15 unpack (almost) everything with on ii wget 1.12-1.1 retrieves files from the web Versions of packages svn-buildpackage recommends: ii debhelper 7.4.15 helper programs for debian/rules svn-buildpackage suggests no packages. -- no debconf information
Index: b/svn-inject =================================================================== --- a/svn-inject 2010-03-27 19:55:47.304034078 +0100 +++ b/svn-inject 2010-03-27 19:59:44.476039655 +0100 @@ -383,7 +383,9 @@ if ($opt_layout == 1) { $subupsCurrent="$package/branches/upstream/current"; - $subupsVersion="$package/branches/upstream/$upsVersion"; + if(defined($upsVersion)) { + $subupsVersion="$package/branches/upstream/$upsVersion"; + } $subupsTags="$package/branches/upstream"; $subtrunk="$package/trunk"; $subtags="$package/tags"; @@ -471,6 +473,27 @@ } chdir $tempdir; +# create missing repository structure in a single commit +my @check_dirs = ( + $opt_svnurl, + ($opt_layout == 1 ? ("$opt_svnurl/$package") + : ("$opt_svnurl/tags", "$opt_svnurl/trunk")), + ($dscOrig && $opt_addtar && $opt_layout == 2 ? ("$opt_svnurl/tarballs") : ()), + ($dscOrig && $opt_addtar ? ("$opt_svnurl/$subtarballs") : ()), + ($dscOrig && ($changed_non_debian || !$opt_onlychanged) ? + (($opt_layout == 1 ? ("$opt_svnurl/$package/branches") + : ("$opt_svnurl/branches", "$opt_svnurl/branches/upstream")), $SDCommon::c{"upsTagUrl"}) : ()), + ($opt_onlychanged && $changed_non_debian == 0 ? ($SDCommon::c{"trunkUrl"}) : ()), + $SDCommon::c{"tagsUrl"}); +my @create_dirs = (); +foreach (@check_dirs) { + system("svn ls $_ >/dev/null 2>&1") && push @create_dirs, $_; +} +if (@create_dirs) { + my $msg = _g("Creating repository structure"); + withecho("svn", "-m", "$scriptname $msg", "mkdir", @create_dirs); +} + # store the .orig.tar.gz in the repository # SVNROOT/PACKAGE/tarballs/PACKAGE_UPSVERSION.orig.tar.gz # SVNROOT/tarballs/PACKAGE/PACKAGE_UPSVERSION.orig.tar.gz