"Fossies" - the Fresh Open Source Software Archive

Member "relax-5.0.0/docs/devel/find_missing_copyrights" (18 Apr 2019, 2675 Bytes) of package /linux/privat/relax-5.0.0.src.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "find_missing_copyrights": 4.0.3_vs_4.1.0.

    1 ###############################################################################
    2 #                                                                             #
    3 # Copyright (C) 2014 Edward d'Auvergne                                        #
    4 #                                                                             #
    5 # This file is part of the program relax (http://www.nmr-relax.com).          #
    6 #                                                                             #
    7 # This program is free software: you can redistribute it and/or modify        #
    8 # it under the terms of the GNU General Public License as published by        #
    9 # the Free Software Foundation, either version 3 of the License, or           #
   10 # (at your option) any later version.                                         #
   11 #                                                                             #
   12 # This program is distributed in the hope that it will be useful,             #
   13 # but WITHOUT ANY WARRANTY; without even the implied warranty of              #
   14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
   15 # GNU General Public License for more details.                                #
   16 #                                                                             #
   17 # You should have received a copy of the GNU General Public License           #
   18 # along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
   19 #                                                                             #
   20 ###############################################################################
   21 
   22 
   23 The following is a command which can be used to view all edits by a certain user for the entire year.  This svn log is then parsed and all the added and modified files extracted.  Each file is then grepped from the copyright statement, and all copyright statements from the year removed.  The remaining printout lists the files which require a copyright notice update.
   24 
   25 svn log -v -r{"2014-01-01 00:00:00"}:{"2014-12-31 00:00:00"} \
   26 | sed -n '/^r..... | tlinnet | /,/-----$/ p' \
   27 | grep "^   [AM] " \
   28 | sort -u \
   29 | sed 's/   M //g' \
   30 | sed 's/   A //g' \
   31 | sed 's/\/trunk\///g' \
   32 | sed 's/ .*//g' \
   33 | xargs -I {} bash -c 'if [ -f {} ] ; then echo {} ; fi' \
   34 | xargs grep Copyright -l \
   35 | xargs -I {} bash -c 'if grep -Fq "2014 Troels" {}; then : ; else echo {} ; fi'
   36 
   37 
   38 To change to a different developer, for example replace 'tlinnet' with 'bugman' and 'Troels' with 'Edward'.  To check the history of one of these files, say 'lib/xyz.py', to be sure that the developer edited the file, type:
   39 
   40 svn log -v lib/xyz.py \
   41 | sed -n '/^r..... | tlinnet | /,/-----$/ p' \
   42 | less
   43