Edgewall Software
Last modified 7 years ago Last modified on May 25, 2005 11:54:28 AM

A Proposal: Basic Release Management implementation

This would close tickets #505, #1578 and #959.

Based on the TracRoadmap module, I submit the Releaselist module.

The purpose of the Releaselist module is to provide simple release management functionality to Trac. The TracRoadmap module is excellent for grouping tickets as steps necessary to achieve a goal, where the goal may or may not be release-oriented.

Trac currently does not provide a way to tag, organize, and collect binary/packaged releases. Most Trac installations probably use the wiki module for release management, like the Trac project itself (TracDownload).

I would prefer a more structured approach. Enter the Releaselist module.

The Releaselist allows a permitted developer to "tag" a particular subversion changeset with a name.

NOTE: THIS PATCH ALTERS YOUR DATABASE'''

The patch is based on the state of the trunk @ changeset [1087].

After you have applied this patch you will have to upgrade your database to rev 8 from rev 7:

trac-admin /path/to/database upgrade

This will create the new release table and add ONLY the release view related permissions to the anonymous user. You will have to use trac-admin to add the other permissions as listed below to fully use the releaselist manager.


Current Design

This tagged release is stored in a new table (release) in the SQLite database. (None of the other tables are modified with the Releaselist module.) The timeline queries the release table to populate release entries (release=7 for the timline module).

CREATE TABLE release (
// I guess it is more useful to define primary key on 'name'
// than on 'rev', since the 'rev' is already unique in the svn 
// repository. Using 'name' as the primary key gives us a 
// unique name to remember the certain release.
        rev             integer,
        name            text PRIMARY KEY,
        changesetby     text,
        modifiedby      text,
        time            integer,
        timemodified    integer,
        descr           text
);
  • Release rev is the associated TracChangeset index.
  • Release time is the associated TracChangeset time + 1 millisecond. This ensures tagged release appears before the corresponding TracChangeset in the timeline.
  • Release changesetby is the associated TracChangeset author.
  • Release modifiedby is the most recent user to create/modify the release.
  • Releases are listed in the releaselist (based on roadmap.py) which is accessed from the "Releases" toolbar button. http://localhost/trac/releaselist. This requires the RELEASELIST_VIEW permission.
  • An individual release supports URL actions http://localhost/trac/release/35?action=new,edit,or delete. This requires the RELEASE_VIEW and (RELEASE_CREATE, RELEASE_MODIFY, or RELEASE_DELETE) permissions.
  • Releases are tracked in the TracTimeline and a boolean checkbox is provided in the filter dialog to disable their display. The release timeline requires the RELEASE_VIEW permission.
  • Releases have wiki marked-up descriptions. This is convenient for linking to binaries or packaged releases.
  • Releases have links to their corresponding TracChangeset. This requires the CHANGESET_VIEW permission.
  • Releases are created by clicking on the "Tag as New Release" nav link in the TracChangeset module. This requires the RELEASE_CREATE permission.
  • Releases are edited and deleted by nav links in the release view. This assumes the RELEASE_MODIFY, RELEASE_DELETE permissions.
  • A TracChangeset associated with a release will display a link named "Show Tagged Release". This requires the RELEASE_VIEW permission.

Associated Permissions

  • RELEASELIST_VIEW
  • RELEASE_VIEW
  • RELEASE_CREATE
  • RELEASE_MODIFY
  • RELEASE_DELETE

BROKEN list

  • Doesn't highlight the 'Releases' toolbar button when drilled down into a release. Dunno why.

TODO list These requires Python voodoo-magic/kharma that I do not possess. :)

  • Wiki preview for create/modify release.
  • Add a checkbox in release creation/modification interface to insert/remove the tagged release name into the ticket properties version list

Future Ideas

  • Perhaps add an option to create a branch in the subversion repository? The current implementation of "Tag as New Release" is a pure Trac/SQL function - no subversion manipulation.
  • Once ticket #238 is resolved, it would be nice to add a nav link to download a tarball of this releases changeset
  • Once ticket #217 is resolved, it would be nice to have the XMLRPC interface allow tagging of a changeset
  • Replace Releaselist timeline-style display with sophisticated daily, weekly, monthly calendar interface

Attachments

Download all attachments as: .zip