Update of /project/lisppaste/cvsroot/lisppaste2 In directory common-lisp.net:/tmp/cvs-serv4249
Modified Files: persistent-pastes.lisp variable.lisp web-server.lisp Log Message: Make persistence default
Date: Sat Jan 17 13:07:21 2004 Author: bmastenbrook
Index: lisppaste2/persistent-pastes.lisp diff -u lisppaste2/persistent-pastes.lisp:1.2 lisppaste2/persistent-pastes.lisp:1.3 --- lisppaste2/persistent-pastes.lisp:1.2 Sat Jan 17 13:02:14 2004 +++ lisppaste2/persistent-pastes.lisp Sat Jan 17 13:07:21 2004 @@ -11,7 +11,7 @@ (cons 'annotations (mapcar #'paste-alist (paste-annotations paste)))))
(defun save-pastes-to-file (file-name) - (with-open-file (file file-name :direction :output) + (with-open-file (file file-name :direction :output :if-exists :supersede) (let ((*print-readably* t)) (format file "~A~%" (prin1-to-string (mapcar #'paste-alist *pastes*))))))
Index: lisppaste2/variable.lisp diff -u lisppaste2/variable.lisp:1.5 lisppaste2/variable.lisp:1.6 --- lisppaste2/variable.lisp:1.5 Sat Jan 17 12:54:13 2004 +++ lisppaste2/variable.lisp Sat Jan 17 13:07:21 2004 @@ -1,4 +1,4 @@ -;;;; $Id: variable.lisp,v 1.5 2004/01/17 17:54:13 bmastenbrook Exp $ +;;;; $Id: variable.lisp,v 1.6 2004/01/17 18:07:21 bmastenbrook Exp $ ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/variable.lisp,v $
;;;; See the LICENSE file for licensing information. @@ -55,4 +55,6 @@ (defvar *pastes* nil) (defvar *paste-counter* 0) (defvar *connection* nil) -(defvar *channels* nil) \ No newline at end of file +(defvar *channels* nil) + +(defvar *paste-file* "pastes.lisp-expr") \ No newline at end of file
Index: lisppaste2/web-server.lisp diff -u lisppaste2/web-server.lisp:1.17 lisppaste2/web-server.lisp:1.18 --- lisppaste2/web-server.lisp:1.17 Sat Jan 17 12:54:13 2004 +++ lisppaste2/web-server.lisp Sat Jan 17 13:07:21 2004 @@ -1,4 +1,4 @@ -;;;; $Id: web-server.lisp,v 1.17 2004/01/17 17:54:13 bmastenbrook Exp $ +;;;; $Id: web-server.lisp,v 1.18 2004/01/17 18:07:21 bmastenbrook Exp $ ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/web-server.lisp,v $
;;;; See the LICENSE file for licensing information. @@ -173,6 +173,7 @@ (if annotate (push paste (paste-annotations paste-to-annotate)) (push paste *pastes*)) + (save-pastes-to-file *paste-file*) (araneida:html-stream (araneida:request-stream request) `(html