Skip to content

Commit 5ed9271

Browse files
author
Richard Jones
committed
sort multilinks a little better for grouping [SF#772935]
1 parent 3edbc91 commit 5ed9271

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ are given with the most recent entry first.
77
- roundup-server now logs IP addresses by default (sf bug 778795)
88
- logfile must be specified if pidfile is (sf bug 772820)
99
- timelog editing via csv interface crashes (sf bug 699837)
10+
- sort multilinks a little better for grouping (sf bug 772935)
1011

1112

1213
2003-07-29 0.6.0b4

roundup/backends/back_anydbm.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.121 2003-05-09 01:47:50 richard Exp $
18+
#$Id: back_anydbm.py,v 1.122 2003-08-12 01:49:30 richard Exp $
1919
'''
2020
This module defines a backend that saves the hyperdatabase in a database
2121
chosen by anydbm. It is guaranteed to always be available in python
@@ -1886,20 +1886,6 @@ def sortfun(a, b, sort=sort, group=group, properties=self.getprops(),
18861886
r = cmp(bv, av)
18871887
if r != 0: return r
18881888

1889-
# Multilink properties are sorted according to how many
1890-
# links are present.
1891-
elif isinstance(propclass, Multilink):
1892-
r = cmp(len(av), len(bv))
1893-
if r == 0:
1894-
# Compare contents of multilink property if lenghts is
1895-
# equal
1896-
r = cmp ('.'.join(av), '.'.join(bv))
1897-
if r:
1898-
if dir == '+':
1899-
return r
1900-
else:
1901-
return -r
1902-
19031889
else:
19041890
# all other types just compare
19051891
if dir == '+':

0 commit comments

Comments
 (0)