diff roundup-admin @ 48:671203878652

Moved over to using marshal in the bsddb and anydbm backends. roundup-admin now has a "freshen" command that'll load/save all nodes (not retired - mod hyperdb.Class.list() so it lists retired nodes)
author Richard Jones <richard@users.sourceforge.net>
date Mon, 23 Jul 2001 08:20:44 +0000
parents e5e9ea306a09
children 3a7e5515c1bd
line wrap: on
line diff
--- a/roundup-admin	Mon Jul 23 07:56:05 2001 +0000
+++ b/roundup-admin	Mon Jul 23 08:20:44 2001 +0000
@@ -1,6 +1,6 @@
 #! /usr/bin/python
 
-# $Id: roundup-admin,v 1.1 2001-07-23 03:46:48 richard Exp $
+# $Id: roundup-admin,v 1.2 2001-07-23 08:20:44 richard Exp $
 
 import sys
 if int(sys.version[0]) < 2:
@@ -254,6 +254,16 @@
             classname, nodeid = roundupdb.splitDesignator(designator)
             db.getclass(classname).retire(nodeid)
 
+    elif command == 'freshen':
+        n, db = determineLogin(instance, argv, n)
+        for classname, cl in db.classes.items():
+            properties = cl.properties.keys()
+            for nodeid in cl.list():
+                node = {}
+                for name in properties:
+                    node[name] = cl.get(nodeid, name)
+                db.setnode(classname, nodeid, node)
+
     else:
         print "Unknown command '%s'"%command
         usage()
@@ -267,6 +277,9 @@
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.1  2001/07/23 03:46:48  richard
+# moving the bin files to facilitate out-of-the-boxness
+#
 # Revision 1.1  2001/07/22 11:15:45  richard
 # More Grande Splite stuff
 #

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