* remove unused argument from at-pr
@ 2002-10-31 16:05 Mel Hatzis
2002-11-01 15:11 ` Yngve Svendsen
0 siblings, 1 reply; 2+ messages in thread
From: Mel Hatzis @ 2002-10-31 16:05 UTC (permalink / raw)
To: help-gnats
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
I noticed that there was an unused argument in at-pr
and thought I'd provide a patch to get rid of it.
I grokked through all the documentation and verified
that no documentation changes are necessary.
--
Mel Hatzis
Juniper Networks, Inc.
[-- Attachment #2: atpr.patch --]
[-- Type: text/plain, Size: 3573 bytes --]
Index: at-pr.sh
===================================================================
RCS file: /cvsroot/gnats/gnats/gnats/at-pr.sh,v
retrieving revision 1.7
diff -u -p -r1.7 at-pr.sh
--- at-pr.sh 4 Aug 2002 10:57:33 -0000 1.7
+++ at-pr.sh 31 Oct 2002 22:45:09 -0000
@@ -26,11 +26,10 @@ USAGE="Usage: $prog [-h|--help] [-d|--da
1 - response time
2 - PR number
- 3 - path to the PR file (unused)
- 4 - submitter-id
- 5 - full name of the submitter
- 6 - contact for the submitter
- 7 - address for GNATS_ADMIN
+ 3 - submitter-id
+ 4 - full name of the submitter
+ 5 - contact for the submitter
+ 6 - address for GNATS_ADMIN
"
PATH=/bin:/usr/bin; export PATH
@@ -48,10 +47,10 @@ then
fi
# process command line options
-while [ $# -gt 7 ]; do
+while [ $# -gt 6 ]; do
case "$1" in
-d | --database)
- if [ $# -eq 8 ]
+ if [ $# -eq 7 ]
then
echo "ERROR: value required for $1 option" >&2
echo "$USAGE" >&2
@@ -79,7 +78,7 @@ then
exit 1
fi
-if [ $# != 7 ]; then
+if [ $# != 6 ]; then
echo "ERROR: $prog called with the incorrect number of arguments" >&2
echo "$USAGE" >&2
exit 1
@@ -107,8 +106,8 @@ RESP_ADDR=`$QUERY_PR --responsible-addre
# $DEBUG_MODE is set to 0 when debug is off in the config file
if [ "x$DEBUG_MODE" = "x1" ]; then
- STEALTH_HEADER="From: $7 (GNATS Management)
-To: $7
+ STEALTH_HEADER="From: $6 (GNATS Management)
+To: $6
Subject: mail output from at-pr
@@ -117,16 +116,16 @@ fi
if [ "$STATE" = "${DEFAULTSTATE}" ]; then
$LIBEXECDIR/mail-agent << __EOF__
-${STEALTH_HEADER}From: $7 (GNATS Management)
-To: $6, $RESP_ADDR, $7
+${STEALTH_HEADER}From: $6 (GNATS Management)
+To: $5, $RESP_ADDR, $6
Subject: PR $2 not analyzed in $1 hours
PR $2 was not analyzed within the acknowledgment period
of $1 business hours. The pertinent information is:
- Submitter-Id: $4
- Originator: $5
+ Submitter-Id: $3
+ Originator: $4
Synopsis: $SYNOPSIS
Person responsible for the PR: $RESPONSIBLE
Index: file-pr.c
===================================================================
RCS file: /cvsroot/gnats/gnats/gnats/file-pr.c,v
retrieving revision 1.49
diff -u -p -r1.49 file-pr.c
--- file-pr.c 28 Oct 2002 22:57:50 -0000 1.49
+++ file-pr.c 31 Oct 2002 22:45:09 -0000
@@ -29,8 +29,7 @@ Software Foundation, 59 Temple Place - S
static int needs_analysis (PR *pr);
static int run_atpr(PR *pr, AdmEntry *submitter, int submitter_rtime,
- struct tm *expired, char *bug_name, char *path,
- ErrorDesc *err);
+ struct tm *expired, char *bug_name, ErrorDesc *err);
static int getBugNumber (const DatabaseInfo database, ErrorDesc *err);
static char* derive_submitter (PR *pr);
@@ -401,7 +400,7 @@ createNewPRFile (PR *pr, int flag_autocr
&& needs_analysis (pr))
{
if (run_atpr (pr, submitter, submitter_rtime, expired, bug_name,
- prPath, err) != 0)
+ err) != 0)
{
bug_number = -1;
}
@@ -532,8 +531,7 @@ arg_quote (const char *s)
static int
run_atpr (PR *pr, AdmEntry *submitter, int submitter_rtime,
- struct tm *expired, char *bug_name, char *path,
- ErrorDesc *err)
+ struct tm *expired, char *bug_name, ErrorDesc *err)
{
char *at_pr;
char *command = NULL;
@@ -573,7 +571,7 @@ run_atpr (PR *pr, AdmEntry *submitter, i
fprintf (p, "%s --database %s %d %s %s %s '%s' '%s' '%s'\n", at_pr,
databaseName (pr->database),
- submitter_rtime, bug_name, path,
+ submitter_rtime, bug_name,
submitter->admFields[SubmitterAdmKey],
orig, cont, pa);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: remove unused argument from at-pr
2002-10-31 16:05 remove unused argument from at-pr Mel Hatzis
@ 2002-11-01 15:11 ` Yngve Svendsen
0 siblings, 0 replies; 2+ messages in thread
From: Yngve Svendsen @ 2002-11-01 15:11 UTC (permalink / raw)
To: hatzis, help-gnats
At 14:50 31.10.2002 -0800, Mel Hatzis wrote:
>I noticed that there was an unused argument in at-pr
>and thought I'd provide a patch to get rid of it.
Nice catch. Committed.
- Yngve
_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-01 0:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-31 16:05 remove unused argument from at-pr Mel Hatzis
2002-11-01 15:11 ` Yngve Svendsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).