quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] quilt edit is a bit noisy


From: John Vandenberg
Subject: Re: [Quilt-dev] quilt edit is a bit noisy
Date: Tue, 6 Sep 2005 08:54:44 +1000

On 9/6/05, Jean Delvare <address@hidden> wrote:
> Hi all,
> 
> I find that quilt edit is a bit noisy. The fact that it "complains" each
> time you edit a file that was already added certainly doesn't encourage
> people to use it, while I believe that we need to encourage people to
> use it, and possibly add more safety checks to it.
> 
> So I would propose that "quilt edit" is educated not to display a
> message when editing a file that has already been added. As the message
> is generated by quilt add and not quilt edit, this means that we need a
> way to tell quilt add to be quieter. For this purpose, I would like to
> add a "-q" flag to quilt add, which would do exactly that, and then
> change "edit" to use that flag when calling "quilt add".
>
> Index: quilt/add.in
> ===================================================================
> RCS file: /cvsroot/quilt/quilt/quilt/add.in,v
> retrieving revision 1.26
> diff -u -r1.26 add.in
> --- quilt/add.in        24 Aug 2005 14:54:16 -0000      1.26
> +++ quilt/add.in        5 Sep 2005 21:21:58 -0000
> @@ -19,7 +19,7 @@
> 
>  usage()
>  {
> -       printf $"Usage: quilt add [-p patch] {file} ...\n"
> +       printf $"Usage: quilt add [-q] [-p patch] {file} ...\n"
>         if [ x$1 = x-h ]
>         then
>                 printf $"
> @@ -29,6 +29,8 @@
> 
>  -p patch
>         Patch to add files to.
> +
> +-q     Quiet operation.
>  "
>                 exit 0
>         else
> @@ -60,7 +62,7 @@
>         done
>  }
> 
> -options=`getopt -o p:h -- "$@"`
> +options=`getopt -o p:qh -- "$@"`
> 
>  if [ $? -ne 0 ]
>  then
> @@ -79,6 +81,9 @@
>                         exit 1
>                 fi
>                 shift 2 ;;
> +       -q)
> +               opt_quiet=1
> +               shift ;;
>         -h)
>                 usage -h ;;
>         --)
> @@ -118,6 +123,7 @@
>         fi
>         if file_in_patch $SUBDIR$file $patch
>         then
> +               [ -n "$opt_quiet" ] || \
>                 printf $"File %s is already in patch %s\n" \
>                        "$SUBDIR$file" "$(print_patch $patch)" >&2
>                 [ $status -ne 1 ] && status=2
> Index: quilt/edit.in
> ===================================================================
> RCS file: /cvsroot/quilt/quilt/quilt/edit.in,v
> retrieving revision 1.7
> diff -u -r1.7 edit.in
> --- quilt/edit.in       24 Aug 2005 14:54:16 -0000      1.7
> +++ quilt/edit.in       5 Sep 2005 21:21:58 -0000
> @@ -48,7 +48,7 @@
>         usage
>  fi
> 
> -bash -c ". @QUILT@/add" "quilt add" "$@"
> +bash -c ". @QUILT@/add" "quilt add" -q "$@"
>  status=$?
>  if [ $status -ne 0 -a $status -ne 2 ]
>  then
> 
> More could be done but this might need to be discussed:
> 
> 1* We could change "quilt add" not to exit with status 2 if -q is used,
> so as to save one test in "quilt edit".

It sounds like this would break something, but I'm merely waving my hands.

> 2* We could change "quilt add" not to display the standard message when
> actually adding a file (i.e. the success case) when -q is used. This
> would make "quilt edit" even less noisy.

I agree in principle with this change, and would like to see 'add'
only report problems as well.
--
John




reply via email to

[Prev in Thread] Current Thread [Next in Thread]