help-gnats
[Top][All Lists]
Advanced

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

Re: patch to display new PR number for new submissions


From: Mel Hatzis
Subject: Re: patch to display new PR number for new submissions
Date: Mon, 03 Feb 2003 12:42:35 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

On 02/02/2003 12:32 AM, Andrew J. Gray wrote:
Now that 4.0 beta2 is out the door please review
(and hopefully accept) the following patch which
allows send-pr and "pr-edit --submit" to display
newly created PR numbers.

I try to code modifications to your patch along these lines.


I have coded modifications to your patch along the lines I
suggested. The modified patch is at the end of this message. Please
have a look at it and let me know (a) if it meets the requirements you
were addressing with the original patch, and (b) if there are any
problems with it.

Generally, the patch looks good...it's a cleaner approach to the
one I submitted.

One small concern with the patch though...in get_reply you've made
a change allowing for outfp to be NULL...

  > RCS file: /cvsroot/gnats/gnats/gnats/client.c,v
> retrieving revision 1.46
> diff -u -p -r1.46 client.c
> --- gnats/client.c    25 Nov 2002 13:58:33 -0000    1.46
> +++ gnats/client.c    2 Feb 2003 08:31:23 -0000
> @@ -334,7 +334,8 @@ get_reply (FILE *outfp)
>            break;
>
>          case CODE_INFORMATION:
> -          fprintf (outfp, "%s\n", r->text);
> +          if (outfp != NULL)
> +        fprintf (outfp, "%s\n", r->text);
>            break;
>
>          case CODE_NONEXISTENT_PR:
> @@ -1216,7 +1217,7 @@ netSetEditEmailAddr (const char *addr)
>  }


However, immediately above this code, there's another reference to
'outfp' which is unprotected....

              else
                {
                  read_server (outfp);
                }

I suggest that you put some checks for NULL around this too.

The only other comment I have is that there's a small typo in the docs:

> -the database. A zero exit code is returned if the submission was
> -successful.  Otherwise, the reason(s) for the PR being rejected are
> -printed to stdout, and a non-zero exit code is returned.
> +the database.  If the submission a zero exit code is returned.
                                 ^^^^^^
I think you're missing 'is successful' in the above sentence.

> Otherwise, the
> +reason(s) for the PR being rejected are
> +printed, and a non-zero exit code is returned.
> +
> address@hidden --show-prnum



Since this change is an enhancement and modifies the gnatsd command
protocol I am thinking it should not be included in GNATS 4.0 final,
but put on a 4.1 branch. What do people think?

I'm in favour of rolling out 4.0 pretty soon....if you think putting
this patch on a 4.1 branch would help this endevour, I'd suggest
you do just that.

--
Mel Hatzis





reply via email to

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