*** gnats/ChangeLog Fri Dec 12 21:30:40 1997 --- gnats/ChangeLog Fri Dec 12 21:31:51 1997 *************** *** 1,3 **** --- 1,16 ---- + Fri Oct 24 16:10:00 1997 Abe Feldman + + * query-pr.c: (main) Look for new qualifiers -M, -B, --modified-before, + --modified-after. Enable -a, -b. (usage) include usage notes on + -a, -b, -B, -M, --modified-before, --modified-after. + * query.c: (do-pr-internal) Check for modified_befoer, + modified_after. if either of these is non-zero, do date-compare + between PR in question and given date. + * query.h: New extern variables modified_befoer, modified_after. + * qvariables.c: Initialize modified_befoer, modified_after + * p-usage.texi: Notes on query-pr qualifiers --arrived-before, + --arrived-after, --modified-befoer, modified-after. + Fri Sep 26 16:00:00 1997 Abe Feldman * file-pr.c: Changed log messages and "punt" function call *** gnats/p-usage.texi Fri Dec 12 21:11:02 1997 --- gnats/p-usage.texi Fri Dec 12 21:31:51 1997 *************** *** 451,456 **** --- 451,460 ---- [ -p @var{priority} | --priority=@var{priority} ] [ -O @var{originator} | --originator=@var{originator} ] [ -L @var{class} | --class=@var{class} ] + [ -b @var{date} | --arrived-before=@var{date} ] + [ -a @var{date} | --arrived-after=@var{date} ] + [ -B @var{date} | --modified-after=@var{date} ] + [ -M @var{date} | --modified-before=@var{date} ] @c [ -k @var{class} | --class=@var{class} ] [ -t @var{text} | --text=@var{text} ] [ -m @var{text} | --multitext=@var{text} ] *************** *** 556,561 **** --- 560,593 ---- Since this option does not reference the index, queries using it finish much faster if you also use another search criterion that @emph{is} part of the index (@pxref{index file,,The @code{index} file}). + + @item -b @var{date} + @itemx --arrived-before=@var{date} + Search only for PRs which arrived before @var{date}. These are PRs with an + @samp{>Arrival Date} value greater than @var{date}. Dates can be of + several formats, such as @samp{12-Oct-1997}, @samp{10/12/97}, + @samp{19971012}, etc. + + @item -a @var{date} + @itemx --arrived-after=@var{date} + Search only for PRs which arrived after @var{date}. These are PRs with an + @samp{>Arrival Date} value less than @var{date}. + + @item -B @var{date} + @itemx --modified-before=@var{date} + Search only for PRs which were last modified before @var{date}. These are PRs + with a @samp{>Last Modified} value less than @var{date}. PRs which have + not been modified (where the @samp{>Last Modified} field is blank), are + not listed. + + + @item -M @var{date} + @itemx --modified-after @var{date} + Search only for PRs which were last modified after @var{date}. These are PRs + with a @samp{>Last Modified} value greater than @var{date}. PRs which have + not been modified (where the @samp{>Last Modified} field is blank), are + not listed. + @ignore @c FIXME - check if these need @w, and make sure this option goes in! *** gnats/query-pr.c Fri Dec 12 21:11:03 1997 --- gnats/query-pr.c Fri Dec 12 21:31:51 1997 *************** *** 66,71 **** --- 66,73 ---- #endif {"arrived-before", 1, NULL, 'b'}, {"arrived-after", 1, NULL, 'a'}, + {"modified-before", 1, NULL, 'B'}, + {"modified-after", 1, NULL, 'M'}, {"list-categories", 0, NULL, 'j'}, {"list-responsible", 0, NULL, 'k'}, {"list-submitters", 0, NULL, 'l'}, *************** *** 162,170 **** memset (s, 0, sizeof (Index)); #ifdef GNATS_RELEASE_BASED ! while ((optc = getopt_long (argc, argv, "A:a:c:C:D:d:e:K:L:m:o:O:p:PQ:s:S:r:t:u:U:y:VFixhqRjkl", #else ! while ((optc = getopt_long (argc, argv, "A:b:c:C:D:d:e:L:m:o:O:p:Ps:S:r:t:u:U:y:VFixhqRjkl", #endif long_options, (int *) 0)) != EOF) { --- 164,172 ---- memset (s, 0, sizeof (Index)); #ifdef GNATS_RELEASE_BASED ! while ((optc = getopt_long (argc, argv, "A:a:B:b:c:C:D:d:e:K:L:M:m:o:O:p:PQ:s:S:r:t:u:U:y:VFixhqRjkl", #else ! while ((optc = getopt_long (argc, argv, "A:a:B:b:c:C:D:d:e:K:L:M:m:o:O:p:Ps:S:r:t:u:U:y:VFixhqRjkl", #endif long_options, (int *) 0)) != EOF) { *************** *** 195,200 **** --- 197,222 ---- } break; + case 'M': + modified_after = get_date (optarg, NULL); + if (modified_after < 0) + { + fprintf (stderr, "%s: could not decypher `%s'\n", + program_name, optarg); + exit (1); + } + break; + + case 'B': + modified_before = get_date (optarg, NULL); + if (modified_after < 0) + { + fprintf (stderr, "%s: could not decypher `%s'\n", + program_name, optarg); + exit (1); + } + break; + case 'd': spec_gnats_root = optarg; break; *************** *** 431,436 **** --- 453,459 ---- Usage: %s [-FhiPRqVx] [-C confidential] [-c category] [-d directory]\n\ [-e severity] [-m mtext] [-O originator] [-o outfile] [-p priority]\n\ [-L class] [-r responsible] [-S submitter] [-s state] [-t text]\n\ + [-b date} [-a date] [-B date] [-M date]\n\ [-y synopsis] [-A release] [--full] [--help] [--print-path] [--version]\n\ [--summary] [--sql] [--skip-closed] [--category=category]\n\ [--confidential=yes|no] [--directory=directory] [--output=outfile]\n\ *************** *** 439,444 **** --- 462,468 ---- [--quarter=quarter] [--keywords=regexp]\n\ [--required-before=date] [--required-after=date]\n\ [--arrived-before=date] [--arrived-after=date]\n\ + [--modified-before=date] [--modified-after=date]\n\ [--severity=severity] [--state=state] [--submitter=submitter]\n\ [--list-categories] [--list-responsible] [--list-submitters]\n\ [--synopsis=synopsis] [--text=text] [--multitext=mtext] [PR] [PR]...\n", *** gnats/query.c Fri Dec 12 21:11:03 1997 --- gnats/query.c Fri Dec 12 21:31:51 1997 *************** *** 387,393 **** char *path, *prnum; { if (originator || text_search || m_text_search \ ! || synopsis || release || arrived_before || arrived_after #ifdef GNATS_RELEASE_BASED || keywords || quarter #endif --- 387,394 ---- char *path, *prnum; { if (originator || text_search || m_text_search \ ! || synopsis || release || arrived_before || arrived_after \ ! || modified_before || modified_after #ifdef GNATS_RELEASE_BASED || keywords || quarter #endif *************** *** 412,417 **** --- 413,424 ---- || (arrived_after && (date_compare (arrived_after, pr[ARRIVAL_DATE].value, 0, DOCONVERT) == 0)) + || (modified_before && ((*pr[LAST_MODIFIED].value == 0) + || (date_compare (modified_before, pr[LAST_MODIFIED].value, + 1, DOCONVERT) == 0))) + || (modified_after && ((*pr[LAST_MODIFIED].value == 0) + || (date_compare (modified_after, pr[LAST_MODIFIED].value, + 0, DOCONVERT) == 0))) #ifdef GNATS_RELEASE_BASED || (quarter && (pr[QUARTER].value == NULL || regfind (quarter, pr[QUARTER].value) != 0)) *** gnats/query.h Fri Dec 12 21:11:03 1997 --- gnats/query.h Fri Dec 12 21:31:51 1997 *************** *** 60,65 **** --- 60,71 ---- /* Look for PRs that arrived after this date. */ extern time_t arrived_after; + /* Look for PRs which were modified before this date. */ + extern time_t modified_before; + + /* Look for PRs which were modified after this date. */ + extern time_t modified_after; + #ifdef GNATS_RELEASE_BASED /* Look for PRs required before this date. */ extern time_t required_before; *** gnats/qvariable.c Fri Dec 12 21:11:02 1997 --- gnats/qvariable.c Fri Dec 12 21:31:51 1997 *************** *** 62,67 **** --- 62,73 ---- /* Look for PRs that arrived after this date. */ time_t arrived_after = (time_t)0; + /* Look for PRs which were modified before this date. */ + time_t modified_before = (time_t)0; + + /* Look for PRs which were modified after this date. */ + time_t modified_after = (time_t)0; + #ifdef GNATS_RELEASE_BASED /* Look for PRs required before this date. */ time_t required_before = (time_t)0;