Database Internals

The PyDitz issue database consists of a single directory containing a bunch of files in YAML format. There are two kinds of file:

  1. A single project file, called project.yaml, specifying all the releases in the project.
  2. An issue file for each issue, named issue-id.yaml, where id is its hexadecimal issue ID.

Here’s an example issue file from PyDitz’s own issue database, which also gives an example of how referenced issues are stored in the file (in the form {issue [id]}):

--- !ditz.rubyforge.org,2008-03-06/issue 
title: Add a user config file
desc: At $HOME/.ditzrc.
type: :task
component: PyDitz
release: "0.5"
reporter: Glenn Hutchings <zondo42@gmail.com>
status: :closed
disposition: :fixed
creation_time: 2013-12-11 16:19:23.740000 Z
references: []

id: e7de7b259a4849a4cb95b09366017b8926803625
log_events: 
- - 2013-12-11 16:19:23.780000 Z
  - Glenn Hutchings <zondo42@gmail.com>
  - created
  - ""
- - 2013-12-11 16:22:49.321000 Z
  - Glenn Hutchings <zondo42@gmail.com>
  - commented
  - This could also have hooks for various things (see {issue 6c6ff24fab46b717b9c72c0ef54e2129178e4104}).
- - 2013-12-11 16:30:17.320000 Z
  - Glenn Hutchings <zondo42@gmail.com>
  - commented
  - Could also set username and email here, to be used by 'ditz init'.
- - 2013-12-11 17:28:13.821000 Z
  - Glenn Hutchings <zondo42@gmail.com>
  - changed status from unstarted to in progress
  - |-
    Need to move DitzDB.message() method to separate logger, so it can be
    used for config file read message.
- - 2013-12-12 08:21:29.116000 Z
  - Glenn Hutchings <zondo42@gmail.com>
  - commented
  - Rearranged logging stuff.
- - 2013-12-12 22:01:23.987573 Z
  - Glenn Hutchings <zondo42@gmail.com>
  - closed with disposition fixed
  - That'll do for now.