Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #47 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Relazify the database if the plugin version has changed

Reported by: stuarth Owned by: stuarth
Priority: major Milestone: 2.2.2
Component: Plugin Version: 2.2.1
Keywords: Cc:

Description

Often the lazified database format changes between database versions. Since the user cannot force the database to be re-lazified without performing a clear-and-rescan this can be somewhat inconvenient.

The plugin should detect it's been upgraded and completely remove and replace the lazified information in the database.

Change History

comment:1 Changed 5 years ago by stuarth

Two ideas for how to do this:

  1. Store the plugin version in the metainformation table in the database;
  2. Store the plugin version in a new preference (that the user doesn't see - it won't appear on the plugin settings page).

Either way it would work in the same way:

  1. In the rescan callback (which is also called when the plugin initialises), it reads the last plugin version from the preference/database.
  2. It then compares that with the current plugin version (the subversion tag $Revision$ will be used to auto-populate the revision of the plugin).
  3. If they are the same then the current behaviour continues - anything not yet lazified is lazified, but anything already in the database is left alone.
  4. If the versions are different then the lazification has to be replaced. It proceeds as it currently does but doesn't ignore already lazified entries.

comment:2 Changed 5 years ago by stuarth

  • Status changed from new to assigned
  • Milestone set to 2.2.2

As the database lazification is changing in milestone:2.2.2 I'll also get this into that version - it's a pretty straightforward change.

Having looked at the metainformation approach I believe it's neater to just use a preference.

comment:3 Changed 5 years ago by stuarth

  • Type changed from defect to enhancement

comment:4 Changed 5 years ago by stuarth

With this enhancement, the re-lazify database button on the plugin settings page should also forcibly relazify.

comment:5 Changed 5 years ago by stuarth

  • Status changed from assigned to closed
  • Resolution set to fixed

This has been done in r201. On that basis I'm closing this as implemented.

Note: See TracTickets for help on using tickets.