You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by je...@apache.org on 2013/06/03 22:00:16 UTC

svn commit: r1489136 - /hadoop/common/trunk/dev-support/smart-apply-patch.sh

Author: jeagles
Date: Mon Jun  3 20:00:16 2013
New Revision: 1489136

URL: http://svn.apache.org/r1489136
Log:
HADOOP-9614. smart-test-patch.sh hangs for new version of patch (2.7.1) (Ravi Prakash via jeagles)

Modified:
    hadoop/common/trunk/dev-support/smart-apply-patch.sh

Modified: hadoop/common/trunk/dev-support/smart-apply-patch.sh
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/dev-support/smart-apply-patch.sh?rev=1489136&r1=1489135&r2=1489136&view=diff
==============================================================================
--- hadoop/common/trunk/dev-support/smart-apply-patch.sh (original)
+++ hadoop/common/trunk/dev-support/smart-apply-patch.sh Mon Jun  3 20:00:16 2013
@@ -50,7 +50,12 @@ if $PATCH -p0 -E --dry-run < $PATCH_FILE
   TMP2=/tmp/tmp.paths.2.$$
   TOCLEAN="$TOCLEAN $TMP2"
 
-  grep '^patching file ' $TMP | awk '{print $3}' | grep -v /dev/null | sort | uniq > $TMP2
+  egrep '^patching file |^checking file ' $TMP | awk '{print $3}' | grep -v /dev/null | sort | uniq > $TMP2
+
+  if [ ! -s $TMP2 ]; then
+    echo "Error: Patch dryrun couldn't detect changes the patch would make. Exiting."
+    cleanup 1
+  fi
 
   #first off check that all of the files do not exist
   FOUND_ANY=0