Code

instance -> tracker, node -> item
[roundup.git] / doc / upgrading.txt
index c14a40ce02bfd497da16a7e5d7b4b9524c9847d4..ce6ae6dfaa91843df66e4ec1df283eeefd269eb8 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::
@@ -24,18 +24,38 @@ This has been a fairly major revision of Roundup:
    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
 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 +70,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
@@ -75,7 +95,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 +106,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 +129,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
 ~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -212,8 +234,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 +341,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>
 
 
 
@@ -327,7 +349,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
@@ -350,12 +372,16 @@ to::
      '''
      pass
 
+You will also need to install the new version of roundup.cgi from the source
+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
+You'll want to make a backup of your current tracker 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
+used to create your tracker, and modify it according to your local schema
 changes.
 
 If you need help with the new templating system, please ask questions on the
@@ -366,8 +392,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 :)
 
 
@@ -423,7 +449,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::