changeset 778:fb2ce2b8b2ef

Moved the file storage commit into blobfiles where it belongs.
author Richard Jones <richard@users.sourceforge.net>
date Wed, 19 Jun 2002 03:07:19 +0000
parents bcd284bba81f
children 453aed15ced6
files roundup/backends/back_anydbm.py roundup/backends/blobfiles.py
diffstat 2 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/roundup/backends/back_anydbm.py	Tue Jun 18 03:59:59 2002 +0000
+++ b/roundup/backends/back_anydbm.py	Wed Jun 19 03:07:19 2002 +0000
@@ -15,7 +15,7 @@
 # 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
@@ -466,13 +466,6 @@
 
         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.
         '''
@@ -490,6 +483,9 @@
 
 #
 #$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
 #
--- a/roundup/backends/blobfiles.py	Tue Jun 18 03:59:59 2002 +0000
+++ b/roundup/backends/blobfiles.py	Wed Jun 19 03:07:19 2002 +0000
@@ -15,7 +15,7 @@
 # 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.
@@ -102,10 +102,17 @@
         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

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