subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1150454 - /subversion/trunk/tools/dist/backport.pl
Date Sun, 24 Jul 2011 18:34:57 GMT
Author: danielsh
Date: Sun Jul 24 18:34:56 2011
New Revision: 1150454

URL: http://svn.apache.org/viewvc?rev=1150454&view=rev
Log:
* tools/dist/backport.pl: Implement a debug mode ($WET_RUN).

Modified:
    subversion/trunk/tools/dist/backport.pl

Modified: subversion/trunk/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport.pl?rev=1150454&r1=1150453&r2=1150454&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Sun Jul 24 18:34:56 2011
@@ -28,6 +28,7 @@ my $SVN = $ENV{SVN} || 'svn'; # passed u
 my $VIM = 'vim';
 my $STATUS = './STATUS';
 my $BRANCHES = '^/subversion/branches';
+my $WET_RUN = qw[false true][1]; # don't commit
 
 sub usage {
   my $basename = $0;
@@ -95,13 +96,23 @@ $SVN revert -R .
 $SVN up
 $SVN merge $mergeargs
 $VIM -e -s -n -N -i NONE -u NONE -c '/^ [*] $pattern/normal! dap' -c wq $STATUS
-$SVN commit -F $logmsg_filename
+if $WET_RUN; then
+  $SVN commit -F $logmsg_filename
+else
+  echo "Committing:"
+  $SVN status -q
+  cat $logmsg_filename
+fi
 EOF
 
   $script .= <<"EOF" if $entry{branch};
 reinteg_rev=\`$SVN info $STATUS | sed -ne 's/Last Changed Rev: //p'\`
-$SVN rm $BRANCHES/$entry{branch}\
-        -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
+if $WET_RUN; then
+  $SVN rm $BRANCHES/$entry{branch}\
+          -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
+else
+  echo "Removing reintegrated '$entry{branch}' branch"
+fi
 EOF
 
   open SHELL, '|-', qw#/bin/sh -x# or die $!;



Mime
View raw message