You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2012/02/02 15:29:22 UTC
svn commit: r1239645 - /subversion/trunk/tools/dist/backport.pl
Author: danielsh
Date: Thu Feb 2 14:29:20 2012
New Revision: 1239645
URL: http://svn.apache.org/viewvc?rev=1239645&view=rev
Log:
Add a 'Be noisy?' knob, defaulting to "no". It is separate from the
'Batch mode' knob.
* tools/dist/backport.pl
($DEBUG, $SVNq): New globals.
(merge): Produce output only in debug mode.
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=1239645&r1=1239644&r2=1239645&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Thu Feb 2 14:29:20 2012
@@ -30,6 +30,9 @@ my $VIM = 'vim';
my $STATUS = './STATUS';
my $BRANCHES = '^/subversion/branches';
my $WET_RUN = qw[false true][1]; # don't commit
+my $DEBUG = qw[false true][0]; # 'set -x', etc
+my $SVNq = "$SVN -q ";
+$SVNq =~ s/-q// if $DEBUG eq 'true';
sub usage {
my $basename = $0;
@@ -92,16 +95,16 @@ sub merge {
my $script = <<"EOF";
#!/bin/sh
set -e
-if $WET_RUN; then
+if $DEBUG; then
set -x
fi
$SVN diff > $backupfile
-$SVN revert -R .
-$SVN up
-$SVN merge $mergeargs
+$SVNq revert -R .
+$SVNq up
+$SVNq merge $mergeargs
$VIM -e -s -n -N -i NONE -u NONE -c '/$pattern/normal! dap' -c wq $STATUS
if $WET_RUN; then
- $SVN commit -F $logmsg_filename
+ $SVNq commit -F $logmsg_filename
else
echo "Committing:"
$SVN status -q
@@ -112,7 +115,7 @@ EOF
$script .= <<"EOF" if $entry{branch};
reinteg_rev=\`$SVN info $STATUS | sed -ne 's/Last Changed Rev: //p'\`
if $WET_RUN; then
- $SVN rm $BRANCHES/$entry{branch} -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
+ $SVNq rm $BRANCHES/$entry{branch} -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
else
echo "Removing reintegrated '$entry{branch}' branch"
fi