Date: Thu, 15 May 2014 16:22:09 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r266154 - user/des/tinderbox Message-ID: <201405151622.s4FGM9nR077326@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Thu May 15 16:22:09 2014 New Revision: 266154 URL: http://svnweb.freebsd.org/changeset/base/266154 Log: Factor out common code for the revert and update commands. Modified: user/des/tinderbox/tinderbox.pl Modified: user/des/tinderbox/tinderbox.pl ============================================================================== --- user/des/tinderbox/tinderbox.pl Thu May 15 16:17:21 2014 (r266153) +++ user/des/tinderbox/tinderbox.pl Thu May 15 16:22:09 2014 (r266154) @@ -621,6 +621,10 @@ MAIN:{ if ($cmds{'revert'} || $cmds{'version'} || $cmds{'update'}) { $svncmd = [grep({ -x } @svncmds)]->[0] or error("unable to locate svn binary"); + if (-d "$srcdir/.svn") { + spawn($svncmd, "upgrade", $srcdir); + spawn($svncmd, "cleanup", $srcdir); + } } # Revert sources @@ -629,8 +633,6 @@ MAIN:{ push(@svnargs, "--quiet") unless ($verbose); logstage("reverting $srcdir"); - spawn($svncmd, @svnargs, "upgrade", $srcdir); - spawn($svncmd, @svnargs, "cleanup", $srcdir); spawn($svncmd, @svnargs, "revert", "-R", $srcdir) or error("unable to revert the source tree"); # remove leftovers... ugly! @@ -674,8 +676,6 @@ MAIN:{ cd("$sandbox"); for (0..$svnattempts) { if (-d "$srcdir/.svn") { - spawn($svncmd, "upgrade", $srcdir); - spawn($svncmd, "cleanup", $srcdir); last if spawn($svncmd, @svnargs, "update", $srcdir); } else { last if spawn($svncmd, @svnargs, "checkout", $svnbase, $srcdir); @@ -685,6 +685,7 @@ MAIN:{ my $delay = 30 * ($_ + 1); warning("sleeping $delay s and retrying..."); sleep($delay); + spawn($svncmd, "cleanup", $srcdir); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405151622.s4FGM9nR077326>