Code

oops, fixed unit tests for journal change
[roundup.git] / doc / upgrading.txt
index 562f54b53ea3a431dd29f9bb4a4f333e6c119c47..e7615dd15e3e7a67ff26133985d24af3de6a9ed9 100644 (file)
@@ -2,7 +2,7 @@
 Upgrading to newer versions of Roundup
 ======================================
 
-Please read each section carefully and edit your instance home files
+Please read each section carefully and edit your tracker home files
 accordingly.
 
 .. contents::
@@ -13,29 +13,50 @@ Migrating from 0.4.x to 0.5.0
 This has been a fairly major revision of Roundup:
 
 1. Brand new, much more powerful, flexible, tasty and nutritious templating.
-   Unfortunately, this means all your current templates are useless. Please
-   don't hesitate to ask on roundup-users for help (or complete conversions
-   if you're completely stuck)!
+   Unfortunately, this means all your current templates are useless. Hopefully
+   the new documentation and examples will be enough to help you make the
+   transition. Please don't hesitate to ask on roundup-users for help (or
+   complete conversions if you're completely stuck)!
 2. The database backed got a lot more flexible, allowing Metakit and SQL
-   databases! The only SQL database implemented at present is gadfly, but
-   others shouldn't be a whole lot more work.
+   databases! The only decent SQL database implemented at present is sqlite,
+   but others shouldn't be a whole lot more work.
 3. A brand new, highly flexible and much more robust security system including
    a system of Permissions, Roles and Role assignments to users. You may now
    define your own Permissions that may be checked in CGI transactions.
 4. Journalling has been made less storage-hungry, so has been turned on
    by default *except* for author, recipient and nosy link/unlink events. You
-   are advised to turn it off in your instances too.
-5. Because of the above changes, the instance configuration has seen some
+   are advised to turn it off in your trackers too.
+5. We've changed the terminology from "instance" to "tracker", to ease the
+   learning curve/impact for new users.
+6. Because of the above changes, the tracker configuration has seen some
    major changes. See below for the details.
 
-Please, *back up your database* before you start the migration process. This
+Please, **back up your database** before you start the migration process. This
 is as simple as copying the "db" directory and all its contents from your
-instance to somewhere safe.
+tracker to somewhere safe.
 
 
 0.5.0 Configuration
 -------------------
 
+First up, rename your ``instance_config.py`` file to just ``config.py``.
+
+Then edit your tracker's ``__init__.py`` module. It'll currently look
+like this::
+
+ from instance_config import *
+ try:
+     from dbinit import *
+ except ImportError:
+     pass # in installdir (probably :)
+ from interfaces import *
+
+and it needs to be::
+
+ import config
+ from dbinit import open, init
+ from interfaces import Client, MailGW
+
 Due to the new templating having a top-level ``page`` that defines links for
 searching, indexes, adding items etc, the following variables are no longer
 used:
@@ -50,7 +71,7 @@ used:
 - ISSUE_FILTER
 
 The new security implementation will require additions to the dbinit module,
-but also removes the need for the following instance config variables:
+but also removes the need for the following tracker config variables:
 
 - ANONYMOUS_ACCESS
 - ANONYMOUS_REGISTER
@@ -68,6 +89,13 @@ Registration" and/or the "Email Registration" Permission from the "Anonymous"
 Role. See the section on customising security in the `customisation
 documentation`_ for more information.
 
+Finally, the following config variables have been renamed to make more sense:
+
+- INSTANCE_HOME -> TRACKER_HOME
+- INSTANCE_NAME -> TRACKER_NAME
+- ISSUE_TRACKER_WEB -> TRACKER_WEB
+- ISSUE_TRACKER_EMAIL -> TRACKER_EMAIL
+
 
 0.5.0 Schema Specification
 --------------------------
@@ -75,7 +103,7 @@ documentation`_ for more information.
 0.5.0 Database backend changes
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Your select_db module in your instance has changed a fair bit. Where it used
+Your select_db module in your tracker has changed a fair bit. Where it used
 to contain::
 
  # WARNING: DO NOT EDIT THIS FILE!!!
@@ -86,9 +114,10 @@ it must now contain::
  # WARNING: DO NOT EDIT THIS FILE!!!
  from roundup.backends.back_anydbm import Database, Class, FileClass, IssueClass
 
+Yes, I realise the irony of the "DO NOT EDIT THIS FILE" statement :)
 Note the addition of the Class, FileClass, IssueClass imports. These are very
 important, as they're going to make the next change work too. You now need to
-modify the top of the dbinit module in your instance from::
+modify the top of the dbinit module in your tracker from::
 
  import instance_config
  from roundup import roundupdb
@@ -108,16 +137,17 @@ modify the top of the dbinit module in your instance from::
      '''
      pass
 
+to::
 
-
-to just::
-
- import instance_config
+ import config
  from select_db import Database, Class, FileClass, IssueClass
 
 Yes, remove the Database and IssueClass definitions and those other imports.
 They're not needed any more!
 
+Look for places in dbinit.py where ``instance_config`` is used too, and
+rename them ``config``.
+
 
 0.5.0 Journalling changes
 ~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -147,7 +177,7 @@ like so::
                     messageid=String(),  inreplyto=String())
 
 Nosy list link event journalling is actually turned off by default now. If you
-want to turn it onn, change to your issue class' nosy list, change its
+want to turn it on, change to your issue class' nosy list, change its
 definition from::
 
     issue = IssueClass(db, "issue",
@@ -212,8 +242,8 @@ process:
 4. Roundup checks that users have appropriate Permissions at appropriate times
    (like editing issues).
 
-Your instance dbinit module's *open* function now has to define any
-Permissions that are specific to your instance, and also the assignment
+Your tracker dbinit module's *open* function now has to define any
+Permissions that are specific to your tracker, and also the assignment
 of Permissions to Roles. At the moment, your open function
 ends with::
 
@@ -319,7 +349,7 @@ The admin user should get "Admin", the anonymous user "Anonymous"
 and all other users "User". The ``fixroles.py`` script in the tools directory
 will do this. Run it like so (where python is your python 2+ binary)::
 
-  python tools/fixroles.py -i <instance home>
+  python tools/fixroles.py -i <tracker home> fixroles
 
 
 
@@ -327,7 +357,7 @@ will do this. Run it like so (where python is your python 2+ binary)::
 ---------------------------
 
 The CGI interface code was completely reorganised and largely rewritten. The
-end result is that this section of your instance interfaces module will need
+end result is that this section of your tracker interfaces module will need
 changing from::
 
  from roundup import mailgw
@@ -357,10 +387,9 @@ cgi-bin directory if you're using it.
 0.5.0 HTML templating
 ---------------------
 
-You'll want to make a backup of your current instance html directory. You
-should then copy the html directory from the Roundup source template that you
-used to create your instance, and modify it according to your local schema
-changes.
+You'll want to make a backup of your current tracker html directory. You
+should then copy the html directory from the Roundup source "classic" template
+and modify it according to your local schema changes.
 
 If you need help with the new templating system, please ask questions on the
 roundup-users mailing list (available through the roundup project page on
@@ -370,8 +399,8 @@ sourceforge, http://roundup.sf.net/)
 0.5.0 Detectors
 ---------------
 
-The nosy reactor has been updated to handle the instance not having an
-"assignedto" property on issues. You may want to copy it into your instance's
+The nosy reactor has been updated to handle the tracker not having an
+"assignedto" property on issues. You may want to copy it into your tracker's
 detectors directory. Chances are you've already fixed it though :)
 
 
@@ -427,7 +456,7 @@ There's also a bug or two fixed in the nosyreactor code.
 0.4.2 HTML templating changes
 -----------------------------
 The link() htmltemplate function now has a "showid" option for links and
-multilinks. When true, it only displays the linked node id as the anchor
+multilinks. When true, it only displays the linked item id as the anchor
 text. The link value is displayed as a tooltip using the title anchor
 attribute. To use in eg. the superseder field, have something like this::
 
@@ -572,7 +601,7 @@ to::
 
 0.4.0 Configuration
 --------------------
-``INSTANCE_NAME`` and ``EMAIL_SIGNATURE_POSITION`` have been added to the
+``TRACKER_NAME`` and ``EMAIL_SIGNATURE_POSITION`` have been added to the
 instance_config.py. The simplest solution is to copy the default values
 from template in the core source.