summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b42898)
raw | patch | inline | side by side (parent: 2b42898)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 16 Oct 2001 03:48:01 +0000 (03:48 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 16 Oct 2001 03:48:01 +0000 (03:48 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@304 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup-admin | patch | blob | history | |
roundup/hyperdb.py | patch | blob | history |
diff --git a/roundup-admin b/roundup-admin
index f301ff0f065ba9fd9ce536c44d65c6c62c1f8399..d3b5d658a610df27e337a22205c6c7260e440387 100755 (executable)
--- a/roundup-admin
+++ b/roundup-admin
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: roundup-admin,v 1.28 2001-10-13 00:07:39 richard Exp $
+# $Id: roundup-admin,v 1.29 2001-10-16 03:48:01 richard Exp $
import sys
if int(sys.version[0]) < 2:
def do_find(db, args, comma_sep=0):
'''Usage: find classname propname=value ...
- Find the nodes of the given class with a given property value.
+ Find the nodes of the given class with a given link property value.
- Find the nodes of the given class with a given property value. The
+ Find the nodes of the given class with a given link property value. The
value may be either the nodeid of the linked node, or its key value.
'''
classname = args[0]
propname, value = args[1].split('=')
num_re = re.compile('^\d+$')
if not num_re.match(value):
- propcl = cl.properties[propname].classname
- propcl = db.getclass(propcl)
+ propcl = cl.properties[propname]
+ if (not isinstance(propcl, hyperdb.Link) and not
+ isinstance(type, hyperdb.Multilink)):
+ print 'You may only "find" link properties'
+ return 1
+ propcl = db.getclass(propcl.classname)
value = propcl.lookup(value)
# now do the find
#
# $Log: not supported by cvs2svn $
+# Revision 1.28 2001/10/13 00:07:39 richard
+# More help in admin tool.
+#
# Revision 1.27 2001/10/11 23:43:04 richard
# Implemented the comma-separated printing option in the admin tool.
# Fixed a typo (more of a vim-o actually :) in mailgw.
diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py
index 528582fb695bcab5076b77955f07a532a8dec586..dbca83709d456c464e89514793ab0cf69f33837a 100644 (file)
--- a/roundup/hyperdb.py
+++ b/roundup/hyperdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: hyperdb.py,v 1.25 2001-10-11 00:17:51 richard Exp $
+# $Id: hyperdb.py,v 1.26 2001-10-16 03:48:01 richard Exp $
# standard python modules
import cPickle, re, string
elif t == 2 and not v.search(node[k]):
# RE search
break
-# elif t == 3 and node[k][:len(v)] != v:
-# # start anchored
-# break
-# elif t == 4 and node[k][-len(v):] != v:
-# # end anchored
-# break
-# elif t == 5 and node[k].find(v) == -1:
-# # substring search
-# break
elif t == 6 and node[k] != v:
# straight value comparison for the other types
break
#
# $Log: not supported by cvs2svn $
+# Revision 1.25 2001/10/11 00:17:51 richard
+# Reverted a change in hyperdb so the default value for missing property
+# values in a create() is None and not '' (the empty string.) This obviously
+# breaks CSV import/export - the string 'None' will be created in an
+# export/import operation.
+#
# Revision 1.24 2001/10/10 03:54:57 richard
# Added database importing and exporting through CSV files.
# Uses the csv module from object-craft for exporting if it's available.