annotate man/gnats/p-usage.texi @ 149:538048ae2ab8 r20-3b1

Import from CVS: tag r20-3b1
author cvs
date Mon, 13 Aug 2007 09:36:16 +0200
parents 48d667d6f17f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
112
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
1 @node Invoking the tools
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
2 @chapter Invoking the @sc{gnats} tools
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
3 @cindex usage for the @sc{gnats} tools
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
4 @cindex invoking the @sc{gnats} tools
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
5 @cindex tool usage for software maintainers
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
6
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
7 The following programs comprise @sc{gnats}:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
8
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
9 @cindex user utilities
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
10 @subheading User Utilities
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
11
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
12 These tools are used by the maintainers of a body of work
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
13 (@w{@code{send-pr}} is also used by the end users of the product).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
14
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
15 @table @code
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
16 @item send-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
17 Used by anyone who has a problem with a body of work to submit a report
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
18 of the problem to the maintainers of that work
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
19 (@pxref{send-pr,,Submitting Problem Reports}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
20
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
21 @item query-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
22 Used by software maintainers to query the @sc{gnats} database
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
23 (@pxref{query-pr,,Querying the database}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
24
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
25 @item edit-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
26 Used by software maintainers to edit Problem Reports (to record new
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
27 data, to change the responsible party, etc.) (@pxref{edit-pr,,Editing
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
28 existing Problem Reports}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
29
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
30 @item view-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
31 Used by software maintainers to view individual Problem Reports using
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
32 Emacs (@pxref{view-pr,,Viewing individual Problem Reports}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
33 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
34
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
35 @cindex administrative utilities
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
36 @subheading Administrative Utilities
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
37
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
38 These tools are used by the @sc{gnats} administrator; see also
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
39 @ref{Management,,@sc{gnats} Administration}. For complete explanations
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
40 of these utilities, see @ref{Admin utils,,Administrative utilities}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
41
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
42 @table @code
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
43 @item mkcat
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
44 Creates new categories (@pxref{mkcat,,Adding a problem category}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
45
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
46 @item rmcat
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
47 Removes existing categories (@pxref{rmcat,,Removing a problem
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
48 category}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
49
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
50 @item gen-index
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
51 Generates an up-to-date copy of the index used by @code{query-pr} and
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
52 @code{edit-pr} (@pxref{index file,,The @code{index} file}). Use
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
53 @code{gen-index} to rebuild the index if it becomes corrupted, or if you
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
54 need a copy of the current index for some reason
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
55 (@pxref{gen-index,,Regenerating the index}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
56
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
57 @item mkdist
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
58 Creates a distribution of the program @code{send-pr} for offsite
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
59 submitters of PRs (@pxref{mkdist,,Configuring @code{send-pr} for the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
60 outside world}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
61 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
62
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
63 @cindex internal utilities
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
64 @subheading Internal Utilities
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
65
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
66 These tools are used internally by @sc{gnats}. You should not need to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
67 run these by hand. For complete explanations of these utilities, see
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
68 @ref{Internal utils,,Internal utilities}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
69
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
70 @table @code
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
71 @item queue-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
72 Handles incoming bugs, first through a mail alias by queueing incoming
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
73 PRs as they arrive, and second as a periodic transfer agent between the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
74 queue and the database.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
75
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
76 @item file-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
77 Files Problem Reports as they come in.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
78
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
79 @item at-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
80 Sends reminders to maintainers based on quoted response times.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
81
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
82 @item pr-edit
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
83 Used by @code{edit-pr} to error-check and submit edited Problem Reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
84 (also @pxref{edit-pr,,Editing existing Problem Reports}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
85
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
86 @item pr-addr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
87 Used by the @code{edit-pr} script to retrieve correct addresses from the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
88 @file{responsible} file.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
89 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
90
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
91 @xref{Locations,,Where @sc{gnats} lives}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
92
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
93 @menu
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
94 * send-pr:: Submitting Problem Reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
95 * edit-pr:: Editing existing Problem Reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
96 * query-pr:: Querying the database
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
97 * view-pr:: Viewing individual Problem Reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
98 @end menu
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
99
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
100 @node send-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
101 @section Submitting Problem Reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
102 @cindex @code{send-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
103 @cindex using @code{send-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
104 @cindex invoking @code{send-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
105 @cindex reporting problems with @code{send-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
106
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
107 Use @code{send-pr} to submit Problem Reports to the database.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
108 @code{send-pr} is both a shell script and a Lisp program for @sc{gnu}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
109 Emacs; both implementations provide a template for submitters to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
110 complete. In most cases, @code{send-pr} can determine intelligent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
111 default values for several fields, partially automating the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
112 bug-reporting process.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
113
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
114 @xref{mkdist,,Configuring @code{send-pr} for the outside world}, for
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
115 information on distributing a version of @code{send-pr} customized with
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
116 your site's configuration.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
117
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
118 @lowersections
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
119 @include s-usage.texi
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
120 @raisesections
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
121
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
122 @c ---------------------------------------------------------------
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
123 @node edit-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
124 @section Editing existing Problem Reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
125 @cindex using @code{edit-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
126 @cindex invoking @code{edit-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
127 @cindex @code{edit-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
128
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
129 Use @code{edit-pr} to make changes to existing PRs in the database.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
130 @code{edit-pr} is both a shell script and a Lisp program for @sc{gnu}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
131 Emacs. Both implementations are essentially identical, though the Emacs
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
132 interface provides interactive prompting for some of the fields.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
133
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
134 @code{edit-pr} first examines the PR you wish to edit and locks it if it
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
135 is not already locked. This is to prevent you from editing a PR at the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
136 same time as another user. If the PR you wish to edit is already in the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
137 process of being edited, @code{edit-pr} tells you the name of the person
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
138 who owns the lock.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
139
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
140 You may edit any field in the database that you wish. We recommend that
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
141 you avoid deleting any information in the @sc{Text} and @sc{MultiText}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
142 fields (such as @samp{>Description:} and @samp{>How-To-Repeat:}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
143 (@pxref{Fields,,Problem Report format}). We also recommend that you
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
144 record the final solution to the problem in the @samp{>Fix:} field for
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
145 future reference.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
146
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
147 If you change the @samp{>Responsible:} field, @code{edit-pr} prompts you
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
148 to supply a reason for the change. @code{edit-pr} then mails copies of
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
149 the change message to the previous responsible party, and to the new
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
150 responsible party. The change is then recorded in the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
151 @samp{>Audit-Trail:} section of the PR as follows:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
152
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
153 @table @asis
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
154 @item @code{Responsible-Changed-<From>-<To>}: The value change, supplied
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
155 automatically by @code{edit-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
156
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
157 @item @code{Responsible-Changed-By}: Your name here, supplied
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
158 automatically by @code{edit-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
159
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
160 @item @code{Responsible-Changed-When}: The current date, supplied
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
161 automatically by @code{edit-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
162
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
163 @item @code{Responsible-Changed-Why}: Your reason for the change; you
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
164 are prompted for this.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
165 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
166
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
167 If you change the @samp{>State:} field, you are prompted to supply a
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
168 reason for the change. Copies of the change message are then mailed to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
169 the responsible party, and to the original submitter of the Problem
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
170 Report. The change is then recorded in the @samp{Audit-Trail} section
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
171 of the PR as follows:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
172
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
173 @table @asis
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
174 @item @code{State-Changed-<From>-<To>}: The value change, supplied
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
175 automatically by @code{edit-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
176
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
177 @item @code{State-Changed-By}: Your name here, supplied
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
178 automatically by @code{edit-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
179
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
180 @item @code{State-Changed-When}: The current date, supplied
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
181 automatically by @code{edit-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
182
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
183 @item @code{State-Changed-Why}: Your reason for the change; you are
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
184 prompted for this.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
185 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
186
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
187 The PR is then resubmitted to the database, and the index is updated
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
188 (@pxref{index file,,The @code{index} file}). For information on
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
189 @code{pr-edit}, the main driver for @code{edit-pr}, see @ref{Internal
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
190 utils,,Internal utilities}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
191
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
192 @menu
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
193 * edit-pr in Emacs:: Using @code{edit-pr} from within Emacs
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
194 * edit-pr from the shell:: Invoking @code{edit-pr} from the shell
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
195 @end menu
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
196
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
197 @node edit-pr in Emacs
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
198 @subsection Using @code{edit-pr} from within Emacs
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
199 @cindex @code{edit-pr} in Emacs
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
200
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
201 Call @code{edit-pr} from within Emacs with @w{@code{M-x
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
202 edit-pr}}@footnote{If typing @w{@samp{M-x edit-pr}} doesn't work, see
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
203 your system administrator for help loading @code{edit-pr} into Emacs.}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
204 When @code{edit-pr} prompts you for a PR identification number, type the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
205 number of the PR you wish to edit.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
206
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
207 If the PR is locked, Emacs announces the login name of the person who
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
208 has locked the file. If not, @w{@code{M-x edit-pr}} locks the PR, loads
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
209 it into a buffer named @samp{*edit-pr*}, and places the cursor in the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
210 @samp{>Number:} field. (@emph{Do not change this field}.)
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
211
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
212 Edit the PR to reflect correct information. Resubmit the PR to the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
213 database using @w{@samp{C-c C-c}} (see below).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
214
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
215 The easiest way to edit a PR from Emacs is to use the special key
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
216 bindings provided. These are:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
217
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
218 @table @code
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
219 @item C-c C-c
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
220 @itemx M-x gnats-submit-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
221 Saves and resubmits the PR currently being edited. Do this when you
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
222 finish editing the PR; if you simply kill the buffer, your changes are
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
223 lost.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
224
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
225 @item C-x C-s
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
226 @itemx M-x save-buffer
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
227 Saves the current buffer tp a file. You are prompted for a filename.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
228 This is not a special key binding, but at one point in the history of
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
229 @sc{gnats} it was used to resubmit the PR (i.e., it was bound to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
230 @w{@samp{M-x gnats-submit-pr}}). @w{@samp{C-x C-s}} now simply saves a
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
231 copy of the PR. This command @emph{does not} resubmit the PR to the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
232 database. Use @w{@samp{C-c C-c}} to resubmit the PR.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
233
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
234 @item C-x k
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
235 @itemx M-x gnats:kill-buffer (@emph{use this only with Emacs 18})
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
236 @itemx M-x kill-buffer
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
237 Kills the current buffer (destroying all changes) and unlocks the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
238 current PR. Use this to back out of a change without affecting the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
239 database.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
240
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
241 @item C-c C-u
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
242 @itemx M-x unlock-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
243 Unlocks a PR that you have locked. Use this if you have a locked PR
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
244 from a failed editing session. You are prompted for the @var{gnats-id}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
245 of a PR to unlock.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
246
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
247 @item C-c C-q
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
248 @item M-x unlock-buffer
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
249 Removes the lock on the current PR, allowing others to edit it. The
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
250 buffer remains active and non-writeable. To relock a PR, simply type
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
251 @samp{e} in the buffer containing the Problem Report.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
252
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
253 @item C-c C-e
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
254 @itemx M-x edit-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
255 Runs @code{edit-pr} in a new buffer.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
256
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
257 @item C-c C-f
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
258 @itemx M-x change-field
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
259 Changes the field under the cursor. @code{edit-pr} prompts you for a
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
260 new value. If you use
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
261
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
262 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
263 C-u C-c C-f @emph{or}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
264 C-u M-x change-field
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
265 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
266
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
267 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
268 you are prompted for a field to change.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
269
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
270 @item C-c C-a
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
271 @itemx M-x gnats-mail-reply
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
272 Sends mail to the originator of this PR, using the address in the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
273 @samp{From:} field of the mail header. The @samp{Subject}, @samp{To:},
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
274 and @samp{Cc:} fields are constructed from the Problem Report currently
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
275 being edited. Edit the message, and use @w{@samp{C-c C-c}} to send it.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
276
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
277 @item C-c RET
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
278 @itemx C-c C-m
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
279 @itemx M-x gnats-mail-other-window
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
280 Splits the current window, and starts a mail message. The
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
281 @samp{Subject:} field is constructed from the Problem Report currently
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
282 being edited. Edit the message, and use @w{@samp{C-c C-c}} to send it.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
283
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
284 @item C-c C-r
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
285 @itemx M-x gnats-responsible-change-from-to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
286 Changes the @samp{>Responsible:} field. @code{edit-pr} prompts you for
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
287 the new responsible person, and for a message describing the reason for
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
288 the change. When you type @w{@samp{C-c C-c}} to resubmit the PR, the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
289 cursor is placed in a mail buffer containing a copy of the change. You
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
290 can then edit this buffer and type @w{@samp{C-c C-c}} again to send the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
291 mail.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
292
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
293 @item C-c C-s
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
294 @itemx M-x gnats-state-change-from-to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
295 Changes the @samp{>State:} field. @code{edit-pr} prompts you for the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
296 new state, and for a message describing the reason for the change. When
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
297 you type @w{@samp{C-c C-c}} to resubmit the PR, the cursor is placed in
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
298 a mail buffer containing a copy of the change. You can then edit this
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
299 buffer and type @w{@samp{C-c C-c}} again to send the mail.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
300
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
301 @item C-c C-t
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
302 @itemx M-x category-change-from-to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
303 Changes the @samp{>Category:} field of the PR. @code{edit-pr} prompts
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
304 you for the new category. @code{edit-pr} also prompts you with the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
305 question
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
306
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
307 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
308 Update the >Responsible field?
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
309 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
310
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
311 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
312 Type @samp{y} to change the value of the @samp{>Responsible:} field to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
313 the name of the party responsible for the new category. Type @samp{n} to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
314 keep the current value of @samp{>Responsible:}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
315
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
316 @c FIXME:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
317 @c @item C-c C-f
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
318 @c @itemx M-x change-field
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
319 @c what does this routine do?? I can't figure it out from gnats-el.in...
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
320
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
321 @item M-C-b
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
322 @itemx M-x gnats-backward-field
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
323 Moves the cursor to the beginning of the value of the current field.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
324
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
325 @item M-C-f
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
326 @itemx M-x gnats-forward-field
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
327 Moves the cursor to the end of the value of the current field.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
328
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
329 @item M-p
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
330 @itemx M-x gnats-previous-field
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
331 Moves the cursor back one field to the beginning of the value of the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
332 previous field.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
333
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
334 @item M-n
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
335 @itemx M-x gnats-next-field
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
336 Moves the cursor forward one field to the beginning of the value of the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
337 next field.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
338 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
339
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
340 @node edit-pr from the shell
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
341 @subsection Invoking @code{edit-pr} from the shell
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
342 @cindex @code{edit-pr} from the shell
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
343
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
344 The usage for the @code{edit-pr} shell script is:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
345
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
346 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
347 edit-pr @var{gnats-id} [ -V | --version ] [ -h | --help ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
348 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
349
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
350 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
351 You must first determine which PR you want to edit. The options are:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
352
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
353 @table @code
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
354 @item -V @emph{or} --version
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
355 Prints the version number for @code{edit-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
356
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
357 @item -h @emph{or} --help
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
358 Prints the usage for @code{edit-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
359 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
360
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
361 @code{edit-pr} calls the editor specified in your environment
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
362 variable @code{EDITOR} on a temporary copy of that PR. (If you don't
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
363 have the variable @code{EDITOR} defined in your environment, the default
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
364 editor @code{vi} is used.)
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
365
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
366 Edit the PR, changing any relevant fields or adding to existing
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
367 information. When you exit the editor, @code{edit-pr} prompts you on
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
368 standard input for a reason if you've changed either the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
369 @samp{>Responsible:} field or the @samp{>State:} field. @code{edit-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
370 tracks the information you provide when changing either of these two
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
371 fields, along with the change that occurred, your name, and the time of
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
372 change in the @samp{>Audit-Trail:} field.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
373
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
374 @c ---------------------------------------------------------------
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
375 @node query-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
376 @section Querying the database
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
377 @cindex using @code{query-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
378 @cindex invoking @code{query-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
379 @cindex @code{query-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
380 @cindex querying invdividual problem reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
381
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
382 Obtain information from the database by using the program
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
383 @w{@code{query-pr}}. @code{query-pr} uses search parameters you provide
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
384 to find matching Problem Reports in the database. You can invoke
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
385 @code{query-pr} from the shell or from within Emacs. @code{query-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
386 uses the same arguments whether it is invoked from the shell or from
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
387 Emacs.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
388
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
389 All arguments and options to @code{query-pr} are optional. If you do
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
390 not specify a PR identification number and do not give any search
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
391 parameters, @code{query-pr} displays the entire database. All arguments
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
392 are considered identification numbers of Problem Reports to display.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
393 Any number of options can be given (though some make no sense when
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
394 specified on the same command line); all are connected with a logical
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
395 @code{AND}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
396
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
397 @menu
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
398 * Invoking query-pr::
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
399 * Example queries::
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
400 * Reporting::
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
401 @end menu
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
402
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
403 @node Invoking query-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
404 @subsection Invoking @code{query-pr}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
405
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
406 From the shell, simply type @kbd{query-pr}, followed by any search
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
407 parameters you wish to exercise. From Emacs, type @w{@kbd{M-x
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
408 query-pr}}. @code{query-pr} prompts you for search parameters in the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
409 minibuffer.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
410
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
411 @cindex @code{query-pr} by mail
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
412 @code{query-pr} can also be accessed by electronic mail, if your version
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
413 of @sc{gnats} is configured for this. To use this feature, simply send
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
414 mail to the address @w{@samp{query-pr@@@var{your-site}}} with command
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
415 line arguments or options in the @samp{Subject:} line of the mail
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
416 header. @sc{gnats} replies to your mail with the results of your query.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
417 The default settings for the @code{query-pr} mail server are
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
418
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
419 @cindex the section on query-by-mail needs to be relocated
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
420 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
421 --restricted --state="open|analyzed|feedback|suspended"
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
422 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
423
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
424 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
425 To override the @samp{--state} parameter, specify
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
426 @w{@samp{--state=@var{state}}} in the @code{Subject:} line of the mail
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
427 header. You can not query on confidential Problem Reports by mail.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
428
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
429 The usage for @code{query-pr} is:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
430
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
431 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
432 query-pr [ @var{gnats-id} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
433 [ -c @var{category} | --category=@var{category} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
434 [ -s @var{state} | --state=@var{state} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
435 [ -r @var{responsible} | --responsible=@var{responsible} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
436 [ -S @var{submitter} | --submitter=@var{submitter} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
437 [ -C [ @var{yes} | @var{no} ] | --confidential=[ @var{yes} | @var{no} ] ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
438 [ -e @var{severity} | --severity=@var{severity} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
439 [ -p @var{priority} | --priority=@var{priority} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
440 [ -O @var{originator} | --originator=@var{originator} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
441 [ -L @var{class} | --class=@var{class} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
442 @c [ -k @var{class} | --class=@var{class} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
443 [ -t @var{text} | --text=@var{text} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
444 [ -m @var{text} | --multitext=@var{text} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
445 [ -R | --restricted ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
446 [ -F | --full ] [ -q | --summary ] [ -i | --sql ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
447 [ -P | --print-path ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
448 [ -d @var{directory} | --directory=@var{directory} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
449 [ -o @var{outfile} | --output=@var{outfile} ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
450 [ -V | --version ] [ -h | --help ]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
451 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
452
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
453 If you run @code{query-pr} from within Emacs, you can use
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
454
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
455 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
456 C-x ` @emph{or} M-x next-error
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
457 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
458
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
459 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
460 to scroll through Problem Reports one by one after the search is
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
461 finished.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
462
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
463 @subheading Search criteria
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
464
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
465 The following arguments and options specify search criteria. The lack
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
466 of a criterion indicates that all values for the corresponding field are
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
467 valid for the search. Regular expressions may be used as arguments to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
468 search criteria options; see @ref{Regexps,,Querying using regular
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
469 expressions}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
470
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
471 Using an argument to @code{query-pr} specifies the most stringent search
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
472 criteria, that of a single PR.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
473
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
474 @table @code
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
475 @item @var{gnats-id}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
476 The identification number of the PR you wish to view, as shown in the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
477 @samp{>Number:} field. Any number of @var{gnats-id} arguments may be
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
478 given.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
479
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
480 @item -c @var{category}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
481 @itemx --category=@var{category}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
482 Search only for PRs with a @samp{>Category:} value of @var{category}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
483 For a list of valid categories, type @w{@samp{send-pr -L}} from the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
484 shell.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
485
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
486 @item -s @var{state}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
487 @itemx --state=@var{state}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
488 Search only for PRs with a @samp{>State:} value of @var{state}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
489 @var{state} must be one of: @samp{open}, @samp{analyzed},
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
490 @samp{feedback}, @samp{closed}, or @samp{suspended}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
491
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
492 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
493 This field may be searched using regular expressions. @xref{Regexps,,
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
494 Querying using regular expressions}. Also see @ref{Example
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
495 queries,,Example queries}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
496
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
497 @item -r @var{responsible}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
498 @itemx --responsible=@var{responsible}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
499 Search only for PRs with a @samp{>Responsible:} value of @var{responsible}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
500
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
501 @item -S @var{submitter}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
502 @itemx --submitter=@var{submitter}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
503 Search only for PRs with a @samp{>Submitter:} value of @var{submitter}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
504
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
505 @item -C [@var{yes} | @var{no}]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
506 @itemx --confidential=[@var{yes} | @var{no}]
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
507 Search only for PRs with a @samp{>Confidential:} value of either
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
508 @var{yes} or @var{no}. If this option is not given, all PRs are
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
509 eligible for the search regardless of their confidentiality.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
510
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
511 @item -e @var{severity}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
512 @itemx --severity=@var{severity}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
513 Search only for PRs with a @samp{>Severity:} value of @var{severity}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
514 @var{severity} must be one of: @samp{critical}, @samp{serious}, or
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
515 @samp{non-critical}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
516
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
517 @item -p @var{priority}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
518 @itemx --priority=@var{priority}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
519 Search only for PRs with a @samp{>Priority:} value of @var{priority}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
520 @var{priority} must be one of: @samp{high}, @samp{medium}, or
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
521 @samp{low}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
522
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
523 @item -O @var{originator}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
524 @itemx --originator=@var{originator}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
525 Search only for PRs with an @samp{>Originator:} value of @var{originator}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
526
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
527 Since this option does not reference the index, queries using it finish
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
528 much faster if you also use another search criterion that @emph{is} part
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
529 of the index (@pxref{index file,,The @code{index} file}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
530
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
531 @item -L @var{class}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
532 @itemx --class=@var{class}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
533 Search only for PRs with a @samp{>Class:} value of @var{class}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
534 Since this option does not reference the index, queries using it finish
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
535 much faster if you also use another search criterion that @emph{is} part
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
536 of the index (@pxref{index file,,The @code{index} file}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
537
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
538 @ignore
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
539 @c FIXME - check if these need @w, and make sure this option goes in!
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
540 @item -k @var{class}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
541 @itemx --class=@var{class}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
542 Search only for PRs with a @samp{>Class:} value of @var{class}. @var{class}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
543 must be one of: @samp{sw-bug}, @samp{doc-bug}, @samp{change-request},
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
544 @samp{support}, @samp{duplicate}, or @samp{mistaken}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
545
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
546 Since this option does not reference the index, queries using it finish
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
547 much faster if you also use another search criterion that @emph{is} part
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
548 of the index (@pxref{index file,,The @code{index} file}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
549 @end ignore
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
550
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
551 @item -t @var{text}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
552 @itemx --text=@var{text}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
553 Search the @sc{Text} fields in the database for the regular expression
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
554 @var{text}. @sc{Text} fields include the following (the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
555 @samp{>} and @samp{:} Problem Report fieldname delimiters have been
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
556 removed for the sake of brevity and readability):
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
557
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
558 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
559 @group
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
560 Submitter-Id Originator Synopsis
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
561 Category Release Responsible
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
562 Arrival-Date
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
563 @end group
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
564 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
565
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
566 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
567 @xref{Regexps,,Querying using regular expressions}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
568
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
569 Queries using this option can be slow. Since this option does not
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
570 reference the index, queries using it finish much faster if you also use
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
571 another search criterion that @emph{is} part of the index (@pxref{index
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
572 file,,The @code{index} file}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
573
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
574 @item -m @var{text}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
575 @item --multitext=@var{text}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
576 Search the @sc{MultiText} fields in the database for the regular
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
577 expression @var{text}. @sc{MultiText} fields include the following
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
578 (again, the fieldname delimiters @samp{>} and @samp{:} have been
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
579 omitted):
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
580
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
581 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
582 @group
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
583 Organization Environment Description
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
584 How-To-Repeat Fix Audit-Trail
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
585 Unformatted
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
586 @end group
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
587 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
588
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
589 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
590 @xref{Regexps,,Querying using regular expressions}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
591
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
592 Queries using this option can be very slow. Since this option does not
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
593 reference the index, queries using it finish much faster if you also use
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
594 another search criterion that @emph{is} part of the index (@pxref{index
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
595 file,,The @code{index} file}).
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
596
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
597 @item -R
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
598 @itemx --restricted
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
599 Omit from the search path PRs whose @samp{>Confidential:} fields contain
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
600 the value @samp{yes}. This is equivalent to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
601
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
602 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
603 query-pr --confidential=no
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
604 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
605
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
606 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
607 and also disallows the use of the options
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
608 @w{@samp{--outfile=@var{outfile}}} and
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
609 @w{@samp{--directory=@var{directory}}}. This option is used with the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
610 @w{@code{mail-query}} tool.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
611
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
612 @item -x
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
613 @itemx --skip-closed
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
614 Omit closed PRs from the search path. This option is ignored if you
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
615 also use @w{@samp{-s @var{state}}} or @samp{--state=@var{state}}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
616 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
617
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
618 @subheading Output format
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
619
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
620 Use the following options to select the format in which the Problem
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
621 Report is printed. Use only one of these options for a given search.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
622 If you do not specify one of these options, a header@footnote{A
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
623 @dfn{header} includes the mail header fields as well as the following
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
624 fields: @samp{>Number:}, @samp{>Category:}, @samp{>Synopsis:},
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
625 @samp{>Confidential:}, @samp{>Severity:}, @samp{>Priority:},
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
626 @samp{>Responsible:}, @samp{>State:}, @samp{>Class:},
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
627 @samp{>Submitter-Id:}, @samp{>Originator:}, @samp{>Release:}, and
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
628 @samp{>Arrival-Date:}. For suggestions on using alternate output
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
629 formats in database reports, see @ref{Reporting,,Reporting}.} for the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
630 Problem Reports meeting the search criteria is printed.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
631
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
632 @table @code
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
633 @item -F
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
634 @itemx --full
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
635 Prints all fields in the Problem Report rather than just summary
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
636 information.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
637
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
638 @item -q
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
639 @itemx --summary
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
640 Print a short single-line summary of PR information, delimited by
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
641 whitespace, including the following fields in order (the @samp{>} and
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
642 @samp{:} Problem Report fieldname delimiters have been removed for the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
643 sake of brevity and readability):
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
644
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
645 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
646 Number Responsible Category
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
647 State Severity Priority
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
648 Submitter-Id Synopsis
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
649 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
650
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
651 @item -i
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
652 @itemx --sql
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
653 Prints information on a single line with fields delimited by pipes
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
654 (@samp{|}), which can be uploaded into a relational database. When you
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
655 use this option, @code{query-pr} outputs @sc{Enumerated} fields
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
656 numerically rather than textually; see @ref{Reporting,,Reporting on
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
657 groups of Problem Reports}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
658
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
659 @samp{query-pr -i} outputs the following fields, in order (again, the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
660 fieldname delimiters @samp{>} and @samp{:} have been omitted):
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
661
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
662 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
663 Number Category Synopsis
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
664 Confidential Severity Priority
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
665 Responsible State Class
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
666 Submitter-Id Arrival-Date Originator
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
667 Release
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
668 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
669
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
670 When you use the @samp{-i} option, @samp{query-pr} outputs the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
671 @sc{Enumerated} fields in the database, namely @samp{>Severity:},
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
672 @samp{>Priority:}, @samp{>State:}, and @samp{>Class:}, as numbers rather
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
673 than text. @xref{Reporting,,Reporting on groups of Problem Reports},
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
674 for details.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
675
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
676 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
677
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
678 @subheading Other options
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
679
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
680 @code{query-pr} also accepts the following options:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
681
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
682 @table @code
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
683 @item -P
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
684 @itemx --print-path
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
685 Prints the path which @code{query-pr} used to find the current PR. A
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
686 line of the form @samp{@var{directory}/@var{number}:@var{number}} is
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
687 printed before each PR. This option is automatically used from within
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
688 Emacs to facilitate scrolling through groups of PRs with @w{@kbd{C-x `}}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
689
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
690 @item -d @var{directory}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
691 @itemx --directory=@var{directory}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
692 Changes the search directory to @var{directory} from @var{GNATS_ROOT}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
693
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
694 @item -o @var{outfile}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
695 @itemx --output=@var{outfile}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
696 Prints all output to @var{outfile} rather than to the standard output.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
697
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
698 @item -V
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
699 @itemx --version
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
700 Prints the version number for @code{query-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
701
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
702 @item -h
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
703 @itemx --help
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
704 Prints the usage for @code{query-pr}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
705 @end table
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
706
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
707
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
708 @node Example queries
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
709 @subsection Example queries
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
710 @cindex example queries
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
711
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
712 The following simple query:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
713
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
714 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
715 query-pr --category=rats --responsible=fred --state=analyzed
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
716 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
717
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
718 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
719 yields all PRs in the database which contain the field values:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
720
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
721 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
722 >Category: rats @emph{and}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
723 >Responsible: fred @emph{and}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
724 >State: analyzed
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
725 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
726
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
727 The following query:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
728
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
729 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
730 query-pr --state="o|a"
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
731 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
732
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
733 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
734 yields all PRs in the database whose @samp{>State:} values match either
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
735 @samp{open} or @samp{analyzed} (@pxref{Regexps,,Querying using regular
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
736 expressions}. This search is useful as a daily report that lists all
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
737 Problem Reports which require attention.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
738
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
739 The report can be further altered using an alternate output format for
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
740 @code{query-pr}; see @ref{Reporting,,Reporting on groups of Problem
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
741 Reports}. A more fine-grained report may be obtained by specifying more
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
742 search parameters, e.g. narrowing the search down by
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
743 @w{@samp{>Submitter:}} or by @samp{>Responsible:}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
744
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
745 The following query:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
746
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
747 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
748 query-pr --text="The quick.*brown fox"
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
749 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
750
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
751 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
752 yields all PRs whose @sc{Text} fields contain the text @samp{The quick}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
753 followed by @samp{brown fox} within the same field.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
754 @xref{Regexps,,Querying using regular expressions}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
755
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
756 @node Reporting
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
757 @subsection Reporting on groups of Problem Reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
758 @cindex reporting
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
759 @cindex writing reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
760
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
761 There currently exists no separate reporting mechanism in @sc{gnats} from
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
762 @code{query-pr}. However, the @samp{-q} and @samp{-i} options to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
763 @code{query-pr} allow for easy reporting.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
764
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
765 For example, a report on the current open Problem Reports in the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
766 database can be obtained using @code{awk} with
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
767
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
768 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
769 query-pr -q | awk '@{print $3 "/" $1 ": " $4@}'
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
770 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
771
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
772 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
773 which yields a list of the form
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
774
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
775 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
776 @var{category}/@var{gnats-id}: @var{state}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
777 @emph{etc@dots{}}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
778 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
779
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
780 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
781 For example:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
782
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
783 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
784 sprockets/123: open
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
785 widgets/456: analyzed
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
786 @emph{etc@dots{}}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
787 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
788
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
789 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
790 The @samp{-i} option to @code{query-pr} yields output delimited by pipes
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
791 (@samp{|}). This results in the following:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
792
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
793 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
794 @var{gnats-id}|@var{category}|@var{synopsis}|@var{confidential}|\
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
795 @var{severity}|@var{priority}|@var{responsible}|@var{state}|@var{class}|\
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
796 @var{submitter-id}|@var{arrival-date}|@var{originator}|@var{release}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
797 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
798
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
799 A report on Problem Reports in the database that are currently
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
800 @samp{open} or @samp{analyzed} might resemble the following (the example
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
801 is split into two lines in order to fit onto the page; it is intended to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
802 be typed on one command line):
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
803
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
804 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
805 query-pr -i -s "o|a" | \
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
806 awk -F\| '@{print $1 " " $2 " " $8 " " $3@}'
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
807 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
808
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
809 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
810 which yields
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
811
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
812 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
813 @var{gnats-id} @var{category} @var{state} @var{responsible} @var{synopsis}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
814 @emph{etc@dots{}}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
815 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
816
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
817 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
818 For example:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
819
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
820 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
821 123 sprockets 1 fred The sprockets program gives bad output
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
822 456 widgets 2 barney The foo widget doesn't work with 'bar'
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
823 789 widgets 1 wilma The 'baz' widget is broken
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
824 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
825
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
826 @noindent
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
827 When you use the @samp{-i} option, @samp{query-pr} outputs the
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
828 @sc{Enumerated} fields in the database, namely @samp{>Severity:},
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
829 @samp{>Priority:}, @samp{>State:}, and @samp{>Class:}, as numbers rather
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
830 than text. In the example above, a @samp{>State:} value of @samp{1}
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
831 means @samp{open}, @samp{2} means @samp{analyzed}, and so forth.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
832 @sc{Enumerated} fields are output according to the following paradigm:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
833
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
834 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
835 >Severity: >Priority:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
836 critical 1 high 1
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
837 serious 2 medium 2
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
838 non-critical 3 low 3
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
839
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
840 >State: >Class:
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
841 open 1 sw-bug 1
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
842 analyzed 2 doc-bug 2
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
843 suspended 3 support 3
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
844 feedback 4 change-request 4
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
845 closed 5 mistaken 5
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
846 duplicate 6
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
847 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
848
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
849 This makes sorting on these values easy, when combined with @code{sort}.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
850 It is left as an exercise for the reader to figure out how to do this.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
851
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
852 @ignore
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
853 @c it works something like...
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
854 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
855 query-pr -i -s "o|a" | \
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
856 awk -F\| '@{print $8 "|" $1 "|" $2 "|" $3@}' | \
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
857 sort -n | \
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
858 awk -F\| '@{if $1 = "1" then \
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
859 print "Open bugs:\n" $2 " " $3 " " $3@}' \
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
860 '@{if $1 = "2" then \
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
861 print "Analyzed bugs:\n" $2 " " $3 " " $3@}'
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
862 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
863 @end ignore
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
864
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
865 @node view-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
866 @section Viewing individual Problem Reports
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
867 @cindex @code{view-pr} in Emacs
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
868
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
869 Use @code{view-pr} from within Emacs to view individual Problem Reports.
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
870 Invoke @code{view-pr} with
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
871
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
872 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
873 M-x view-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
874 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
875
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
876 You are prompted to enter a Problem Report identification number
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
877 (@var{gnats-id}). You can also invoke @code{view-pr} with
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
878
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
879 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
880 C-u @var{gnats-id} M-x view-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
881 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
882
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
883 @code{view-pr} allows you to view @var{gnats-id}. This is identical to
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
884 using
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
885
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
886 @smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
887 C-u @var{gnats-id} M-x query-pr
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
888 @end smallexample
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
889
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
890 except that you may choose to edit the PR at any time by pressing
48d667d6f17f Import from CVS: tag r20-1b8
cvs
parents:
diff changeset
891 @samp{e}.