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 2013/04/24 17:12:47 UTC

svn commit: r1471467 - /subversion/trunk/tools/dist/backport.pl

Author: danielsh
Date: Wed Apr 24 15:12:47 2013
New Revision: 1471467

URL: http://svn.apache.org/r1471467
Log:
Follow-up to r1471243 (on 1.8.x):

* tools/dist/backport.pl
  (merge): Croak if the merge caused no-non-mergeinfo changes.

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=1471467&r1=1471466&r2=1471467&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Wed Apr 24 15:12:47 2013
@@ -120,6 +120,16 @@ $SVN diff > $backupfile
 $SVNq revert -R .
 $SVNq up
 $SVNq merge $mergeargs
+if [ "`$SVN status -q | wc -l`" -eq 1 ]; then
+  if [ -n "`$SVN diff | perl -lne 'print if s/^(Added|Deleted|Modified): //' | grep -vx svn:mergeinfo`" ]; then
+    # This check detects STATUS entries that name non-^/subversion/ revnums.
+    # ### Q: What if we actually commit a mergeinfo fix to trunk and then want
+    # ###    to backport it?
+    # ### A: We don't merge it using the script.
+    echo "Bogus merge: includes only svn:mergeinfo changes!" >&2
+    exit 2
+  fi
+fi
 $VIM -e -s -n -N -i NONE -u NONE -c '/$pattern/normal! dap' -c wq $STATUS
 if $WET_RUN; then
   $SVNq commit -F $logmsg_filename