changeset 3146:7ca7407133b7 maint-0.8

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Sun, 13 Feb 2005 22:19:43 +0000
parents ca7c9c19ec4f
children 0a652c47bc9e
files CHANGES.txt doc/whatsnew-0.8.txt roundup/cgi/actions.py templates/classic/html/style.css
diffstat 4 files changed, 67 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Sun Feb 13 21:27:40 2005 +0000
+++ b/CHANGES.txt	Sun Feb 13 22:19:43 2005 +0000
@@ -16,6 +16,7 @@
 - code cleanup (sf patch 1115329 and additional)
 - issue search page allows setting of no sorting / grouping (sf bug
   1119475)
+- better edit conflict handling (sf bug 1118790)
 
 
 2005-01-13 0.8.0b2
--- a/doc/whatsnew-0.8.txt	Sun Feb 13 21:27:40 2005 +0000
+++ b/doc/whatsnew-0.8.txt	Sun Feb 13 22:19:43 2005 +0000
@@ -16,25 +16,39 @@
 
 XXX this section needs more detail
 
-- remove "manual" locking of sqlite database
 - create a new RDBMS cursor after committing
-- roundup-mailgw now logs fatal exceptions rather than mailing them to admin
+- roundup-admin reindex command may now work on single items or classes
+
 - roundup-server options -g and -u accept both ids and names (sf bug 983769)
 - roundup-server now has a configuration file (-C option)
-- added mod_python interface (see installation.txt)
-- added option to turn off registration confirmation via email
-  ("instant_registration" in config) (sf rfe 922209)
-- roundup-admin reindex command may now work on single items or classes
-- record journaltag lookup ("fixes" sf bug 998140)
 - roundup windows service may be installed with command line options
   recognized by roundup-server (but not tracker specification arguments).
   Use this to specify server configuration file for the service.
-- added experimental multi-thread server
-- don't try to import all backends in backends.__init__ unless we *want* to
+
+- added option to turn off registration confirmation via email
+  ("instant_registration" in config) (sf rfe 922209)
+
+
+
+Performance improvements
+========================
+
+We don't try to import all backends in backends.__init__ unless we *want*
+to.
+
+Roundup may now use the Apache mod_python interface (see installation.txt)
+which is much faster than the standard cgi-bin and a little faster than
+roundup-server.
+
+There is now an experimental multi-thread server which should allow faster
+concurrent access.
+
+In the hyperdb, a few other speedups were implemented, such as:
+
+- record journaltag lookup ("fixes" sf bug 998140)
 - unless in debug mode, keep a single persistent connection through a
   single web or mailgw request.
-- extended security.addPermissionToRole to allow skipping the separate
-  getPermission call
+- remove "manual" locking of sqlite database
 
 
 Logging of internal messages
@@ -46,10 +60,16 @@
 The `customization documentation`_ has more details on how this is
 configured.
 
+roundup-mailgw now logs fatal exceptions rather than mailing them to admin.
+
 
 Security Changes
 ================
 
+``security.addPermissionToRole()`` has been extended to allow skipping the
+separate getPermission call.
+
+
 Password Storage
 ----------------
 
@@ -132,6 +152,8 @@
 
 The web interface has seen some changes:
 
+Editing
+
 Templating
   We implement __nonzero__ for HTMLProperty - properties may now be used in
   boolean conditions (eg ``tal:condition="issue/nosy"`` will be false if
@@ -150,6 +172,14 @@
 Standard templates
   We hide "(list)" popup links when issue is only viewable
 
+  The issue search page now has fields to allow no sorting / grouping of
+  the results.
+
+  The default page.html template now has a search box in the top right
+  corner which performs a full-text search of issues. The "show issue"
+  quick jump form in the sidebar has had its font size reduced to use less
+  space.
+
 Web server
   The builtin web server may now perform HTTP Basic Authentication by
   itself.
--- a/roundup/cgi/actions.py	Sun Feb 13 21:27:40 2005 +0000
+++ b/roundup/cgi/actions.py	Sun Feb 13 22:19:43 2005 +0000
@@ -1,4 +1,4 @@
-#$Id: actions.py,v 1.40.2.3 2005-02-12 00:54:36 richard Exp $
+#$Id: actions.py,v 1.40.2.4 2005-02-13 22:19:42 richard Exp $
 
 import re, cgi, StringIO, urllib, Cookie, time, random
 
@@ -510,13 +510,23 @@
         return activity
 
     def detectCollision(self, user_activity, node_activity):
-        if user_activity:
-            return user_activity < node_activity
+        '''Check for a collision and return the list of props we edited
+        that conflict.'''
+        if user_activity < node_activity:
+            props, links = self.client.parsePropsFromForm()
+            key = (self.classname, self.nodeid)
+            # we really only collide for direct prop edit conflicts
+            return props[key].keys()
         else:
-            return 0
+            return []
 
-    def handleCollision(self):
-        self.client.template = 'collision'
+    def handleCollision(self, props):
+        message = self._('Edit Error: someone else has edited this %s (%s). '
+            'View <a target="new" href="%s%s">their changes</a> '
+            'in a new window.')%(self.classname, ', '.join(props),
+            self.classname, self.nodeid)
+        self.client.error_message.append(message)
+        return
 
     def handle(self):
         """Perform an edit of an item in the database.
@@ -525,10 +535,11 @@
 
         """
         user_activity = self.lastUserActivity()
-        if user_activity and self.detectCollision(user_activity,
-                self.lastNodeActivity()):
-            self.handleCollision()
-            return
+        if user_activity:
+            props = self.detectCollision(user_activity, self.lastNodeActivity())
+            if props:
+                self.handleCollision(props)
+                return
 
         props, links = self.client.parsePropsFromForm()
 
--- a/templates/classic/html/style.css	Sun Feb 13 21:27:40 2005 +0000
+++ b/templates/classic/html/style.css	Sun Feb 13 22:19:43 2005 +0000
@@ -118,6 +118,10 @@
   color: white;
   font-weight: bold;
 }
+p.error-message a[href] {
+  color: white;
+  text-decoration: underline;
+}
 
 
 /* style for search forms */

Roundup Issue Tracker: http://roundup-tracker.org/