[Lemon-commits] Alpar Juttner: Better help message and user ques...
Lemon HG
hg at lemon.cs.elte.hu
Wed Oct 22 15:41:48 CEST 2008
details: http://lemon.cs.elte.hu/hg/lemon/rev/0fbbb4bc42dd
changeset: 337:0fbbb4bc42dd
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Mon Oct 20 20:03:14 2008 +0200
description:
Better help message and user question in unify-sources.sh
diffstat:
1 file changed, 14 insertions(+), 15 deletions(-)
scripts/unify-sources.sh | 29 ++++++++++++++---------------
diffs (74 lines):
diff -r e05633b02e40 -r 0fbbb4bc42dd scripts/unify-sources.sh
--- a/scripts/unify-sources.sh Sun Oct 19 16:19:32 2008 +0200
+++ b/scripts/unify-sources.sh Mon Oct 20 20:03:14 2008 +0200
@@ -65,7 +65,7 @@
function update_done() {
echo $CHANGED_FILES out of $TOTAL_FILES files has been changed.
- echo $WARNED_FILES out of $TOTAL_FILES files has been warned.
+ echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
}
function update_begin() {
@@ -107,7 +107,7 @@
function check_done() {
echo $FAILED_FILES out of $TOTAL_FILES files has been failed.
- echo $WARNED_FILES out of $TOTAL_FILES files has been warned.
+ echo $WARNED_FILES out of $TOTAL_FILES files triggered warnings.
if [ $FAILED_FILES -gt 0 ]
then
@@ -116,7 +116,7 @@
then
if [ "$WARNING" == 'INTERACTIVE' ]
then
- echo -n "Assume as normal behaviour? (yes/no) "
+ echo -n "Are the files with warnings acceptable? (yes/no) "
while read answer
do
if [ "$answer" == 'yes' ]
@@ -126,7 +126,7 @@
then
return 1
fi
- echo -n "Assume as normal behaviour? (yes/no) "
+ echo -n "Are the files with warnings acceptable? (yes/no) "
done
elif [ "$WARNING" == 'WERROR' ]
then
@@ -257,24 +257,23 @@
$0 [OPTIONS] [files]
Options:
--dry-run|-n
- Check the given files, but do not modify them.
+ Check the files, but do not modify them.
--interactive|-i
- If --dry-run is specified and files are warned then a message is
- prompted whether the warnings should be turned to errors.
+ If --dry-run is specified and the checker emits warnings,
+ then the user is asked if the warnings should be considered
+ errors.
--werror|-w
- If --dry-run is specified and the warnings are turned to errors.
+ Make all warnings into errors.
--all|-a
All files in the repository will be checked.
--modified|-m
- Check only the modified source files. This option is proper to
- use before a commit. E.g. all files which are modified or added
- into the repository will be updated.
+ Check only the modified (and new) source files. This option is
+ useful to check the modification before making a commit.
--changed|-c
Check only the changed source files compared to the parent(s) of
- the current hg node. This option is proper to use as hg hook
- script. E.g. to check all your commited source files with this
- script add the following section to the appropriate .hg/hgrc
- file.
+ the current hg node. This option is useful as hg hook script.
+ To automatically check all your changes before making a commit,
+ add the following section to the appropriate .hg/hgrc file.
[hooks]
pretxncommit.checksources = scripts/unify-sources.sh -c -n -i
More information about the Lemon-commits
mailing list