]> git.cworth.org Git - notmuch-wiki/blob - nmbug.mdwn
Merge branch 'master' of git://notmuchmail.org/git/notmuch-wiki
[notmuch-wiki] / nmbug.mdwn
1 # Experimental Tag Sharing / Pseudo-Bug-Tracking for/with notmuch
2
3 ## Web View
4
5 There is a dump of (one view of) the nmbug [[status|nmbug/status]]. It is even more
6 experimental than everything else here, and currently manually updated.
7 It is generated by a
8  [[python script|http://pivot.cs.unb.ca/git/?p=notmuch-scripts.git;a=blob_plain;f=scripts/nmbug-status.py]].
9
10 ## Getting started
11
12 1. Install and use notmuch version notmuch 0.9+63~gebd1adc or newer.
13
14    The nmbug script is available in `contrib/nmbug`.
15       
16 2. The current tag repo can be obtained by:
17
18    `$ git clone --bare git://pivot.cs.unb.ca/nmbug.git $HOME/.nmbug`
19
20    Check that your git is recent enough by entering:
21
22    `$ git --git-dir=$HOME/.nmbug fetch`
23
24    If you get failures then you need to update your git (as well).
25
26 ## Using nmbug, simple example
27
28     # get the latest version of the tags
29     $ nmbug pull
30
31     # do some tagging; see below for conventions 
32     $ notmuch tag +notmuch::patch $id
33     
34     # write the tag changes from the notmuch database
35     $ nmbug commit
36
37 ## Using nmbug, doing the same thing with more steps
38
39     # get the latest version of the tags
40     $ nmbug fetch
41
42     # Optionally inspect the fetched changes
43
44     $ nmbug status      
45      a   tags/id1/patch
46      d   tags/id2/pushed     
47     
48     # merge the fetched tags into notmuch
49     $ nmbug merge
50     
51     # observe status is clear now,
52     $ nmbug status
53
54     # make the tag changes
55     $ notmuch tag +notmuch::patch id
56
57     # double check your changes
58     $ nmbug status
59     A tags/id/patch
60     
61     # write the tag changes 
62     $ nmbug commit
63
64 ## Submitting tags
65
66 For the moment, we are using a central repo, hosted at:
67     
68     git@pivot.cs.unb.ca:pub/nmbug
69         
70 To get push access, send your public key (ideally in a gpg signed
71 email) to David Bremner.  There is a convenience command:
72    
73     nmbug push
74        
75 But you will have to change your url with:
76    
77     git --git-dir=$HOME/.nmbug remote set-url origin git@pivot.cs.unb.ca:pub/nmbug
78
79 ## Tagging conventions
80
81 _Note that the tag database is probably catching up to these
82 conventions._
83
84 ### Main patch tracking tags
85
86 Initially any patch should be tagged:
87
88     notmuch::patch
89
90 Patches that are for discussion, rather than proposed for master should be tagged:
91
92     notmuch::wip                is "work in progress", posted for review or comment.
93
94 Most patches will be initially tagged:
95
96     notmuch::needs-review       needs some (more) review
97
98 unless they are tagged:
99
100     notmuch::trivial            looks harmless
101
102 Patches keep `notmuch::needs-review` until they either get enough
103 reviews, or one of the following resolutions is reached:
104     
105     notmuch::obsolete           replaced by some other patch
106     notmuch::pushed             is pushed to master
107     notmuch::wontfix            for whatever reason, this patch will not 
108                                 be applied
109
110 Sometimes the process stalls, and patches get tagged:
111
112     notmuch::moreinfo           waiting for feedback from patch proposer 
113                                 or others
114     
115 ### Bug tracking tag
116
117 So far we are just tagging certain messages as bug reports, meaning
118 things that "everyone" agrees should be fixed.
119
120     notmuch::bug                is a bug report
121
122 ### Optional tags
123
124 These patches are more comments and suggestions.
125
126     notmuch::emacs              is a patch/bug for the emacs UI
127     notmuch::feature            provides a new feature
128     notmuch::fix                fixes a bug
129     notmuch::portability        improves portability
130     notmuch::review             is a review
131     notmuch::test               provides a new test/or improves testing
132     notmuch::$n                 this patch should be considered for 
133                                 release $n
134
135 ## Tracking the patch queue
136
137 I (David Bremner) use the following search (in my case as a saved
138 search in emacs):
139     
140     tag:notmuch::patch and not tag:notmuch::pushed and \
141         not tag:notmuch::obsolete and not tag:notmuch::wip \
142             and not tag:notmuch::moreinfo and not tag:notmuch::contrib
143
144 You might or might not want as many exclusions.  Another interesting
145 search is:
146
147     tag:notmuch::reviewed and not tag:notmuch::pushed
148     
149     
150 ## Design notes
151
152 ### Disk format
153
154 The tags are stored in a bare-repo, which means they are not obviously
155 visible. There is an `nmbug archive` command analogous to `git
156 archive` Tags are represented as empty files in the tree; if you extra
157 them, the tree looks something like:
158
159     tags/878waiwi0f.wl%25james@hackervisions.org/
160     tags/878waiwi0f.wl%25james@hackervisions.org/emacs
161     tags/878waiwi0f.wl%25james@hackervisions.org/patch
162     tags/87aa8j7hqu.fsf@zancas.localnet/
163     tags/87aa8j7hqu.fsf@zancas.localnet/patch
164     tags/87aa8j7hqu.fsf@zancas.localnet/pushed
165
166 The `%25` represents hex code for a character that cannot be used directly
167 (in this case %, only because it is needed as an escape).
168
169 ### Assumptions
170
171 - Currently the parser of nmbug (like that of notmuch restore) assumes 
172   that there are no spaces in message-ids.
173     
174     
175     
176