summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64cfd44)
raw | patch | inline | side by side (parent: 64cfd44)
author | rochecompaan <rochecompaan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 22 Jan 2002 05:06:09 +0000 (05:06 +0000) | ||
committer | rochecompaan <rochecompaan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 22 Jan 2002 05:06:09 +0000 (05:06 +0000) |
information on 'activity' for nodes.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@578 57a73879-2fb5-44c3-a270-3262357dd7e2
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@578 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/backends/back_anydbm.py | patch | blob | history | |
test/test_db.py | patch | blob | history |
index bfdc14217429c520c8c5625b95e14ce54f6b7cef..cca1c86c88e703c0c6ea33cc1e251c54bdd3a828 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: back_anydbm.py,v 1.24 2002-01-21 16:33:20 rochecompaan Exp $
+#$Id: back_anydbm.py,v 1.25 2002-01-22 05:06:08 rochecompaan Exp $
'''
This module defines a backend that saves the hyperdatabase in a database
chosen by anydbm. It is guaranteed to always be available in python
params) = entry
if date_stamp > pack_before or action == 'create':
l.append(entry)
+ elif action == 'set':
+ # grab the last set entry to keep information on
+ # activity
+ last_set_entry = entry
+ date_stamp = last_set_entry[1]
+ # if the last set entry was made after the pack date
+ # then it is already in the list
+ if date_stamp < pack_before:
+ l.append(last_set_entry)
db[key] = marshal.dumps(l)
if db_type == 'gdbm':
db.reorganize()
#
#$Log: not supported by cvs2svn $
+#Revision 1.24 2002/01/21 16:33:20 rochecompaan
+#You can now use the roundup-admin tool to pack the database
+#
#Revision 1.23 2002/01/18 04:32:04 richard
#Rollback was breaking because a message hadn't actually been written to the file. Needs
#more investigation.
diff --git a/test/test_db.py b/test/test_db.py
index 1412b73dc5f5076b825f834b33ba4f897790ad34..664dc56be73385ea3ba16e8f5ad49ab348042692 100644 (file)
--- a/test/test_db.py
+++ b/test/test_db.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: test_db.py,v 1.16 2002-01-21 16:33:20 rochecompaan Exp $
+# $Id: test_db.py,v 1.17 2002-01-22 05:06:09 rochecompaan Exp $
import unittest, os, shutil
def testPack(self):
self.db.issue.create(title="spam", status='1')
+ self.db.commit()
self.db.issue.set('1', status='2')
self.db.commit()
+ self.db.issue.set('1', status='3')
+ self.db.commit()
pack_before = date.Date(". + 1d")
self.db.pack(pack_before)
journal = self.db.getjournal('issue', '1')
- self.assertEqual(1, len(journal))
+ self.assertEqual(2, len(journal))
def testRetire(self):
pass
#
# $Log: not supported by cvs2svn $
+# Revision 1.16 2002/01/21 16:33:20 rochecompaan
+# You can now use the roundup-admin tool to pack the database
+#
# Revision 1.15 2002/01/19 13:16:04 rochecompaan
# Journal entries for link and multilink properties can now be switched on
# or off.