summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 41f0b9f)
raw | patch | inline | side by side (parent: 41f0b9f)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 19 Jun 2002 03:07:19 +0000 (03:07 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 19 Jun 2002 03:07:19 +0000 (03:07 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@791 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/backends/back_anydbm.py | patch | blob | history | |
roundup/backends/blobfiles.py | patch | blob | history |
index 5ea64da8956f9f76bf1daccdd1f7cc0bbaf3c4cf..60159cdec953908fdc4fd6510485e91b89a93682 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: back_anydbm.py,v 1.35 2002-05-25 07:16:24 rochecompaan Exp $
+#$Id: back_anydbm.py,v 1.36 2002-06-19 03:07:19 richard 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
db[nodeid] = marshal.dumps(l)
- def _doStoreFile(self, name, **databases):
- # the file is currently ".tmp" - move it to its real name to commit
- os.rename(name+".tmp", name)
- pattern = name.split('/')[-1]
- self.indexer.add_files(dir=os.path.dirname(name), pattern=pattern)
- self.indexer.save_index()
-
def rollback(self):
''' Reverse all actions from the current transaction.
'''
#
#$Log: not supported by cvs2svn $
+#Revision 1.35 2002/05/25 07:16:24 rochecompaan
+#Merged search_indexing-branch with HEAD
+#
#Revision 1.34 2002/05/15 06:21:21 richard
# . node caching now works, and gives a small boost in performance
#
index ccf3976ec7be9b5e87c9c1548dd7f95e30b28ad3..3f110e5b01a7a6fe396b8c9662270ef940f9a131 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: blobfiles.py,v 1.3 2002-02-27 07:33:34 grubert Exp $
+#$Id: blobfiles.py,v 1.4 2002-06-19 03:07:19 richard Exp $
'''
This module exports file storage for roundup backends.
Files are stored into a directory hierarchy.
return files_in_dir(files_dir)
def _doStoreFile(self, name, **databases):
- '''Must be implemented by subclass
+ '''Store the file as part of a transaction commit.
'''
- raise NotImplementedError
+ # the file is currently ".tmp" - move it to its real name to commit
+ os.rename(name+".tmp", name)
+ pattern = name.split('/')[-1]
+ self.indexer.add_files(dir=os.path.dirname(name), pattern=pattern)
+ self.indexer.save_index()
# $Log: not supported by cvs2svn $
+# Revision 1.3 2002/02/27 07:33:34 grubert
+# . add, vim line and cvs log key.
+#
#
# vim: set filetype=python ts=4 sw=4 et si