Author: jeagles
Date: Mon Jun  3 20:33:14 2013
New Revision: 1489159

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

Modified:
    hadoop/common/branches/branch-0.23/dev-support/smart-apply-patch.sh

Modified: hadoop/common/branches/branch-0.23/dev-support/smart-apply-patch.sh
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23/dev-support/smart-apply-patch.sh?rev=1489159&r1=1489158&r2=1489159&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.23/dev-support/smart-apply-patch.sh 
(original)
+++ hadoop/common/branches/branch-0.23/dev-support/smart-apply-patch.sh Mon Jun 
 3 20:33:14 2013
@@ -49,7 +49,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


Reply via email to