client - client端的使用者命令

Email回報PR

有下面四隻程式會被用到
send-pr    回報問題的人用的(tester, customer)
query-pr   developer查詢整個database,通常是給查詢條件(regular express),
           找出一群符合條件的PR。例如PR狀態是還open的(表示問題還沒解決)。
edit-pr    developer修改PR(problem report)
view-pr    developer看某一特定pr
	
一個PR的應該有大致的元件如下 1. Mail headers 像電子郵件開頭的協定字串。 2. GNATS fields 一個field就是像資料庫內的欄位,例如姓名,年齡這種欄位。 由'>'開始最後有個':'. 一個field的資料形態有可能是 文字(TEXT), 數字(ENUMERATED其實是c裡面的enum所以可以是代表數字的文字), 或多行文字(MULTITEXT), 在命令列上下send-pr,會去叫出vi來
SEND-PR: -*- send-pr  -*-
SEND-PR: Lines starting with `SEND-PR' will be removed
SEND-PR: automatically as well as all comments (the text 
SEND-PR: below enclosed in `<' and `>').
SEND-PR: 
SEND-PR: Please consult the document `Reporting Problems 
SEND-PR: Using send-pr' if you are not sure how to fill out
SEND-PR: a problem report.
SEND-PR:
SEND-PR: Choose from the following categories:
SEND-PR: apache           bfd              binutils
SEND-PR: bison            build            byacc
To: support-site
Subject: complete this field
From: your-login@your-site
Reply-To: your-login@your-site
X-send-pr-version: send-pr 3.11
X-GNATS-Notify:


>Submitter-Id: your submitter-id
>Originator:   your name here
>Organization: your organization
>Confidential:[ yes | no ] (one line)  ->回答yes/no只有一行不能多行
>Synopsis:    synopsis of the problem (one line)
>Severity:    [non-critical | serious | critical](one line)
>Priority:    [ low | medium | high ] (one line)
>Category:    name of the product (one line)
>Class:       [sw-bug | doc-bug | change-request | support]
>Release:     release number (one line)
>Environment: machine, os, target, libraries (multiple lines)
......
	
SEND-PR:是註解欄會自動消失的,不會進database裡面,跟那個CVS很像。 apache bfd binutils.... 這些是在prefix/share/gnats下的檔案內容的project, 這也是>Category要填的值, 其中在郵件的`Subject:' 和在GNATS欄位中的`>Synopsis:' 通常是一樣的值, 只是mail的主題,通常是問題摘要
To:            bugs@xxx (就是上面email aliases的address)
Subject:       就是問題的摘要
From:          xxx@host

>Submitter-Id: 系統會自動給這個PR 一個ID
>Originator:   你的名字
>Organization: 你的單位
>Confidential:[ yes | no ] (one line)
>Synopsis:    可以跟Mail Header的Subject一樣
>Severity:    [non-critical | serious | critical](one line)
>Priority:    [ low | medium | high ] (one line)
>Category:    name of the product (one line)
>Class:       [sw-bug | doc-bug | change-request | support]
>Release:     release number (one line)
>Environment: machine, os, target, libraries (multiple lines)
......
	
其餘欄位就照著提示填, 把每一欄位填完後離開editor會問你要不要送出

用query-pr去看gnats database結果
query-pr
         --full     全部資訊都輸出
         --summary  只印出重要資訊
         --sql      輸出成SQL格式

         -c "category"     (專案名稱)
         -C "confidential"
         -e "severity"
         -r "responsible"  (誰負責的)
         -s "state"        (open/closed/
         gnats-id          (每個PR都有個ID來識別)

edit-pr gnats-id 
view-pr gnats-id
	
emacs上有gnats的命令,請下send-pr命令
M-x send-pr
M-x query-pr
	

Client/Server回報PR