From ecbaa3a13d808b7db882290d1ffe9e3c45db774d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 15 Sep 2009 00:36:49 +0000 Subject: use xsystem to die if svn commits fail git-svn-id: svn://tug.org/texlive/trunk@15286 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tl-update-tlpdb | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Master/tlpkg/bin/tl-update-tlpdb') diff --git a/Master/tlpkg/bin/tl-update-tlpdb b/Master/tlpkg/bin/tl-update-tlpdb index 7c60b113c3c..7498c6afc76 100755 --- a/Master/tlpkg/bin/tl-update-tlpdb +++ b/Master/tlpkg/bin/tl-update-tlpdb @@ -34,7 +34,7 @@ my $opt_noautopatterns = 0; my $opt_norevisioncheck = 0; my $opt_tlpsrc_from_cmdline = 0; my $opt_output; -my $opt_fix_reverse_revisions = 1; +my $opt_fix_reverse_revisions = 0; # needs svn commit TeXLive::TLUtils::process_logging_options(); GetOptions( @@ -103,9 +103,9 @@ sub main info("No checking on increasing revisions due to --no-revision-check\n"); finish($newtlpdb, $pkgcount); } - # compare_tlpdbs returns true if some reversed revisions have been found + # compare_tlpdbs returns true if some reversed revisions have been found. # If in addition the option --fix-reverse-revisions is given it tries - # to fix that. + # to fix that, by committing changes. if (compare_tlpdbs($oldtlpdb, $newtlpdb)) { # there have been reversed revision that have already been warned about # and that have been (hopefully) fixed by compared_tlpdbs if @@ -117,8 +117,7 @@ sub main if (!$opt_fromfiles && $opt_fix_reverse_revisions) { ($newtlpdb, $pkgcount) = create_tlpdb($tlc); if (compare_tlpdbs($oldtlpdb, $newtlpdb)) { - tlwarn("$0: That should not happen, after one iteration of compare_tlpdbs\nthe newly created tlpdb is still going backwards in time.\nPlease check output above!\n"); - exit(1); + tldie("$0: That should not happen, after one iteration of compare_tlpdbs\nthe newly created tlpdb is still going backwards in time.\nPlease check output above!\n"); } } } @@ -150,18 +149,20 @@ sub compare_tlpdbs { my $cmd = "svn propset texlive:force_incr_after_delete $time $opt_master/tlpkg/tlpsrc/$p.tlpsrc"; $commitit = 1; tlwarn(" $cmd\n"); - system($cmd); + TeXLive::TLUtils::xsystem($cmd); } } } } if ($commitit) { - tlwarn("$0: committing changes on tlpsrc files:\n"); - system("svn commit -m'force increased revision after removal of files' $opt_master/tlpkg/tlpsrc/"); + tlwarn("$0: committing changes to tlpsrc files:\n"); + TeXLive::TLUtils::xsystem("svn commit " + . "-m'($0) force increased revision after removal of files' " + . "$opt_master/tlpkg/tlpsrc/"); # we do not check the outcome, we expect to see a positive result # after rebuilding the tlpdb } - return($recheck); + return $recheck; } -- cgit v1.2.3