From: Keith Mannthey Date: Tue, 30 Apr 2013 21:03:24 +0000 (-0700) Subject: LU-3030 build: Update Copyright Script X-Git-Tag: 2.3.65~24 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e55433f7609e902d491c5047de2a6cb65ba8d168;hp=dc2bcafd2a0be8e9ba79aede6b1bfbb9cd00dc94 LU-3030 build: Update Copyright Script Add pevious mass copyright update and cfs wrapper changes to the list of excluded patches. Many files have incorrect author date set, revert to using the git committer date for the patch date. --follow and --author were not working properly. Screen for Author after the git log call. Git log call code came via Andreas Dilger. Signed-off-by: Keith Mannthey Change-Id: I46cf74b48095b54ac58dc17b6b0f94c9cf23cb8a Reviewed-on: http://review.whamcloud.com/6183 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Bob Glossman --- diff --git a/contrib/scripts/updatecw.sh b/contrib/scripts/updatecw.sh index b1c2fd8..17ef4e1 100755 --- a/contrib/scripts/updatecw.sh +++ b/contrib/scripts/updatecw.sh @@ -3,7 +3,7 @@ # Does not add copyright notices to files that are missing them # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2012, Intel Corporation. +# Copyright (c) 2012, 2013, Intel Corporation. # TMP=${TMP:-/tmp} TMPFILE=$(mktemp $TMP/updatecopy.XXXXXX) @@ -16,6 +16,8 @@ EXCLUDE=${EXCLUDE:-'e3a7c58aebafce40323db54bf6056029e5af4a70\n f2a9374170e4522b9d2ac3b7096cf2912339d480\n 3f90f344ae059b30e7d23e4fe554a985eb827b02\n 320e014a2c93cb905637d178269b80847cb8d277\n +08aa217ce49aba1ded52e0f7adb8a607035123fd\n +2841be335687840cf98961e6c6cde6ee9312e4d7\n cd8c65642f1c36b56ae74a0414a1f1f27337a662'} XYRACOPY="Copyright.*Xyratex Technology Limited" @@ -40,18 +42,18 @@ ECHOE=${ECHOE:-"echo -e"} echo -e $EXCLUDE > $EXCFILE git ls-files $DIRS | grep -v ${0##*/} | while read FILE; do -#FILE=lustre/mdt/mdt_hsm.c -#FILE=lustre/include/lustre_quota.h - if [ "$FILE" == 'build/updatecw.sh' ]; then + if [ "$FILE" == 'contrib/scripts/updatecw.sh' ]; then echo $FILE": *** EDIT MANUALLY ***" continue fi NEEDCOPY=false # Pick only files that have changed since START - git log --follow --since=$START --author=$AUTH_WHAM --author=$AUTH_INT\ - --pretty=format:"%ai %H" $FILE | grep -v -f $EXCFILE | - cut -d- -f1 > $TMPFILE + # %ai author dates holds has bad data: April 2013 + git log --follow --since=$START --pretty=format:"%ae %ci %H" $FILE |\ + grep -v -f $EXCFILE |\ + awk "/$AUTH_WHAM|$AUTH_INT/ {print substr(\$2,1,4)}"> $TMPFILE + # Skip files not modified by $AUTHOR [ -s "$TMPFILE" ] || continue