Skip to content

Commit 8e7957c

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent b9513ff commit 8e7957c

File tree

4 files changed

+67
-21
lines changed

4 files changed

+67
-21
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Fixed:
1616
- code cleanup (sf patch 1115329 and additional)
1717
- issue search page allows setting of no sorting / grouping (sf bug
1818
1119475)
19+
- better edit conflict handling (sf bug 1118790)
1920

2021

2122
2005-01-13 0.8.0b2

doc/whatsnew-0.8.txt

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,39 @@ In Summary
1616

1717
XXX this section needs more detail
1818

19-
- remove "manual" locking of sqlite database
2019
- create a new RDBMS cursor after committing
21-
- roundup-mailgw now logs fatal exceptions rather than mailing them to admin
20+
- roundup-admin reindex command may now work on single items or classes
21+
2222
- roundup-server options -g and -u accept both ids and names (sf bug 983769)
2323
- roundup-server now has a configuration file (-C option)
24-
- added mod_python interface (see installation.txt)
25-
- added option to turn off registration confirmation via email
26-
("instant_registration" in config) (sf rfe 922209)
27-
- roundup-admin reindex command may now work on single items or classes
28-
- record journaltag lookup ("fixes" sf bug 998140)
2924
- roundup windows service may be installed with command line options
3025
recognized by roundup-server (but not tracker specification arguments).
3126
Use this to specify server configuration file for the service.
32-
- added experimental multi-thread server
33-
- don't try to import all backends in backends.__init__ unless we *want* to
27+
28+
- added option to turn off registration confirmation via email
29+
("instant_registration" in config) (sf rfe 922209)
30+
31+
32+
33+
Performance improvements
34+
========================
35+
36+
We don't try to import all backends in backends.__init__ unless we *want*
37+
to.
38+
39+
Roundup may now use the Apache mod_python interface (see installation.txt)
40+
which is much faster than the standard cgi-bin and a little faster than
41+
roundup-server.
42+
43+
There is now an experimental multi-thread server which should allow faster
44+
concurrent access.
45+
46+
In the hyperdb, a few other speedups were implemented, such as:
47+
48+
- record journaltag lookup ("fixes" sf bug 998140)
3449
- unless in debug mode, keep a single persistent connection through a
3550
single web or mailgw request.
36-
- extended security.addPermissionToRole to allow skipping the separate
37-
getPermission call
51+
- remove "manual" locking of sqlite database
3852

3953

4054
Logging of internal messages
@@ -46,10 +60,16 @@ now configured in a single place in the tracker configuration file.
4660
The `customization documentation`_ has more details on how this is
4761
configured.
4862

63+
roundup-mailgw now logs fatal exceptions rather than mailing them to admin.
64+
4965

5066
Security Changes
5167
================
5268

69+
``security.addPermissionToRole()`` has been extended to allow skipping the
70+
separate getPermission call.
71+
72+
5373
Password Storage
5474
----------------
5575

@@ -132,6 +152,8 @@ Web Interface Miscellanea
132152

133153
The web interface has seen some changes:
134154

155+
Editing
156+
135157
Templating
136158
We implement __nonzero__ for HTMLProperty - properties may now be used in
137159
boolean conditions (eg ``tal:condition="issue/nosy"`` will be false if
@@ -150,6 +172,14 @@ Templating
150172
Standard templates
151173
We hide "(list)" popup links when issue is only viewable
152174

175+
The issue search page now has fields to allow no sorting / grouping of
176+
the results.
177+
178+
The default page.html template now has a search box in the top right
179+
corner which performs a full-text search of issues. The "show issue"
180+
quick jump form in the sidebar has had its font size reduced to use less
181+
space.
182+
153183
Web server
154184
The builtin web server may now perform HTTP Basic Authentication by
155185
itself.

roundup/cgi/actions.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: actions.py,v 1.40.2.3 2005-02-12 00:54:36 richard Exp $
1+
#$Id: actions.py,v 1.40.2.4 2005-02-13 22:19:42 richard Exp $
22

33
import re, cgi, StringIO, urllib, Cookie, time, random
44

@@ -510,13 +510,23 @@ def lastNodeActivity(self):
510510
return activity
511511

512512
def detectCollision(self, user_activity, node_activity):
513-
if user_activity:
514-
return user_activity < node_activity
513+
'''Check for a collision and return the list of props we edited
514+
that conflict.'''
515+
if user_activity < node_activity:
516+
props, links = self.client.parsePropsFromForm()
517+
key = (self.classname, self.nodeid)
518+
# we really only collide for direct prop edit conflicts
519+
return props[key].keys()
515520
else:
516-
return 0
521+
return []
517522

518-
def handleCollision(self):
519-
self.client.template = 'collision'
523+
def handleCollision(self, props):
524+
message = self._('Edit Error: someone else has edited this %s (%s). '
525+
'View <a target="new" href="%s%s">their changes</a> '
526+
'in a new window.')%(self.classname, ', '.join(props),
527+
self.classname, self.nodeid)
528+
self.client.error_message.append(message)
529+
return
520530

521531
def handle(self):
522532
"""Perform an edit of an item in the database.
@@ -525,10 +535,11 @@ def handle(self):
525535
526536
"""
527537
user_activity = self.lastUserActivity()
528-
if user_activity and self.detectCollision(user_activity,
529-
self.lastNodeActivity()):
530-
self.handleCollision()
531-
return
538+
if user_activity:
539+
props = self.detectCollision(user_activity, self.lastNodeActivity())
540+
if props:
541+
self.handleCollision(props)
542+
return
532543

533544
props, links = self.client.parsePropsFromForm()
534545

templates/classic/html/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ p.error-message {
118118
color: white;
119119
font-weight: bold;
120120
}
121+
p.error-message a[href] {
122+
color: white;
123+
text-decoration: underline;
124+
}
121125

122126

123127
/* style for search forms */

0 commit comments

Comments
 (0)