writing-clue-files
Size: 3943
Comment: better examples
|
Size: 4062
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
As described in the introductory documentation you can create simple cluefiles {{{bugxml -a}}}. For more complex search criteria you need to edit the XML files as described here. | As described in the [:BugHelper/doc:introductory documentation] you can create simple cluefiles with {{{bugxml -a}}}. For more complex search criteria you need to edit the XML files as described here. |
Line 32: | Line 32: |
{{{ <dontlist> |
{{{ <dontlist> |
Line 96: | Line 95: |
Line 101: | Line 99: |
zthe real benefits of bughelper become apparent when bug triagers and developers share their knowledge of the through common clue files. | The real benefits of bughelper become apparent when bug triagers and developers share their knowledge of the through common clue files. |
Line 109: | Line 107: |
Simply edit the {{{.info}}} for a gien package, commit the changes with | Simply edit the {{{.info}}} for a given package, commit the changes with |
Line 114: | Line 112: |
To push you changes up to the shared repository you need to have your SSH key registered with launchpad. |
|
Line 116: | Line 116: |
{{{??? | {{{bzr push |
Line 121: | Line 121: |
Line 123: | Line 122: |
Go back to '''[:BugHelper/Documentation]'''.[[BR]] | Go back to '''[:BugHelper/doc]'''.[[BR]] |
Writing clue files
As described in the [:BugHelper/doc:introductory documentation] you can create simple cluefiles with bugxml -a. For more complex search criteria you need to edit the XML files as described here.
The basic clue file created with bugxml has this header:
{{{<?xml version="1.0"?> <clues version="0.1"> }}}
and contains a single clue on the form:
{{{ <clue>
<contains>
<op>crash</op>
</contains> <info>A CRASHER BUG</info>
</clue>
}}}
and finally closes with:
{{{</clues> }}}
You can add a long list of clues with the <clues> </clues> tag, each with a list of search strings within <op> </op> tags. Each clue also requires an <info> tag to hold a brief description of the bug type. Uf the clue vdescribes a duplicate then this description would typically be the title of the original bug.
Optional elements
Declaring duplicates: If you create a clue that searches for duplicates of bug #X you can note that specifically in the clue file. Bughelper will then refrain from listing this bug in these searches.
{{{ <dontlist>
<bug>48355</bug>
</dontlist>
}}}
Inheritance: Clues can be inherited from other clue files. totem can for example inherit clues from gnome and gstreamer:
<inherits> <inherit>gnome</inherit> <inherit>gstreamer</inherit> </inherits>
Logical operators: You can also combine the logical opperators AND, OR and NOT to create detailed bug searches. Example:
<clue> <contains> <and> <op>apples</op> <or> <op>oranges</op> <op>pears</op> </or> <bin=not op>bananas</op> </and> </contains> <info>Bug description must contain 'apples' AND either 'oranges' OR 'pears'. It may not contain 'bananas'.</info> </clue>
Examples
Real-life examples from packages/ubiquity.info:
<clues> <clue> <dontlist> <bug>48355</bug> </dontlist> <contains> <and> <op>IOError: [Errno 28] No space left on device</op> <op>copy_all</op> <op bin="not">stepPartAdvanced</op> </and> </contains> <info>This is a dupe of 48355 if the system partitions are big enough</info> </clue> <clue> <dontlist> <bug>48856</bug> </dontlist> <contains> <and> <op>AttributeError: 'NoneType' object has no attribute 'stdin'</op> <op>print >>self.gparted_subp.stdin, "apply"</op> </and> </contains> <info>This is a duplicate of 48856, which was fixed in 1.0.13 and 1.1.1</info> </clue> </clues>
Sharing clue files
The real benefits of bughelper become apparent when bug triagers and developers share their knowledge of the through common clue files.
To start sharing clue files you must first check out the latest a copy of the shared repository as a local bzr branch:
bzr checkout sftp://YOUR-LAUNCHPAD-ID@bazaar.launchpad.net/~bugsquad/bughelper-data/main bughelper-data
This is actually the same repository that bughelper updates its cluefiles from normally, but with this format you can make changes and upload them again with bzr.
Simply edit the .info for a given package, commit the changes with
bzr commit -m "added a totem clue"
To push you changes up to the shared repository you need to have your SSH key registered with launchpad.
and push the changes back up to the shared repository with:
{{{bzr push }}}
Optionally, you can edit the Local-Packages-Dir: line of ~/.bughelper/config` to contain the path to the bughelper-data bzr directory. This will alow you to work directly with the shared repository and stay in sync.
Go back to [:BugHelper/doc].BR CategoryBugSquad
BugHelper/doc/writing-clue-files (last edited 2008-08-06 17:00:36 by localhost)