Better help message and user question in unify-sources.sh
authorAlpar Juttner <alpar@cs.elte.hu>
Mon, 20 Oct 2008 20:03:14 +0200
changeset 3370fbbb4bc42dd
parent 336 e05633b02e40
child 343 2f5c0c42a5cd
Better help message and user question in unify-sources.sh
scripts/unify-sources.sh
     1.1 --- a/scripts/unify-sources.sh	Sun Oct 19 16:19:32 2008 +0200
     1.2 +++ b/scripts/unify-sources.sh	Mon Oct 20 20:03:14 2008 +0200
     1.3 @@ -65,7 +65,7 @@
     1.4  
     1.5  function update_done() {
     1.6      echo $CHANGED_FILES out of $TOTAL_FILES files has been changed.
     1.7 -    echo $WARNED_FILES out of $TOTAL_FILES files has been warned.
     1.8 +    echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
     1.9  }
    1.10  
    1.11  function update_begin() {
    1.12 @@ -107,7 +107,7 @@
    1.13  
    1.14  function check_done() {
    1.15      echo $FAILED_FILES out of $TOTAL_FILES files has been failed.
    1.16 -    echo $WARNED_FILES out of $TOTAL_FILES files has been warned.
    1.17 +    echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
    1.18  
    1.19      if [ $FAILED_FILES -gt 0 ]
    1.20      then
    1.21 @@ -116,7 +116,7 @@
    1.22      then
    1.23  	if [ "$WARNING" == 'INTERACTIVE' ]
    1.24  	then
    1.25 -	    echo -n "Assume as normal behaviour? (yes/no) "
    1.26 +	    echo -n "Are the files with warnings acceptable? (yes/no) "
    1.27  	    while read answer
    1.28  	    do
    1.29  		if [ "$answer" == 'yes' ]
    1.30 @@ -126,7 +126,7 @@
    1.31  		then
    1.32  		    return 1
    1.33  		fi
    1.34 -		echo -n "Assume as normal behaviour? (yes/no) "		    
    1.35 +		echo -n "Are the files with warnings acceptable? (yes/no) "
    1.36  	    done
    1.37  	elif [ "$WARNING" == 'WERROR' ]
    1.38  	then
    1.39 @@ -257,24 +257,23 @@
    1.40    $0 [OPTIONS] [files]
    1.41  Options:
    1.42    --dry-run|-n
    1.43 -     Check the given files, but do not modify them.
    1.44 +     Check the files, but do not modify them.
    1.45    --interactive|-i
    1.46 -     If --dry-run is specified and files are warned then a message is
    1.47 -     prompted whether the warnings should be turned to errors.
    1.48 +     If --dry-run is specified and the checker emits warnings,
    1.49 +     then the user is asked if the warnings should be considered
    1.50 +     errors.
    1.51    --werror|-w
    1.52 -     If --dry-run is specified and the warnings are turned to errors.
    1.53 +     Make all warnings into errors.
    1.54    --all|-a
    1.55       All files in the repository will be checked.
    1.56    --modified|-m
    1.57 -     Check only the modified source files. This option is proper to
    1.58 -     use before a commit. E.g. all files which are modified or added
    1.59 -     into the repository will be updated.
    1.60 +     Check only the modified (and new) source files. This option is
    1.61 +     useful to check the modification before making a commit.
    1.62    --changed|-c
    1.63       Check only the changed source files compared to the parent(s) of
    1.64 -     the current hg node.  This option is proper to use as hg hook
    1.65 -     script. E.g. to check all your commited source files with this
    1.66 -     script add the following section to the appropriate .hg/hgrc
    1.67 -     file.
    1.68 +     the current hg node.  This option is useful as hg hook script.
    1.69 +     To automatically check all your changes before making a commit,
    1.70 +     add the following section to the appropriate .hg/hgrc file.
    1.71  
    1.72         [hooks]
    1.73         pretxncommit.checksources = scripts/unify-sources.sh -c -n -i