[Cl-darcs-cvs] r165 - cl-darcs/trunk

mhenoch at common-lisp.net mhenoch at common-lisp.net
Wed Mar 5 08:03:55 UTC 2008


Author: mhenoch
Date: Wed Mar  5 03:03:55 2008
New Revision: 165

Modified:
   cl-darcs/trunk/repo.lisp
Log:
Handle empty inventory files


Modified: cl-darcs/trunk/repo.lisp
==============================================================================
--- cl-darcs/trunk/repo.lisp	(original)
+++ cl-darcs/trunk/repo.lisp	Wed Mar  5 03:03:55 2008
@@ -48,8 +48,11 @@
   (let (tag-patches patches)
     (with-open-stream (in (make-instance 'unreadable-stream
 					 :base-stream (open-upath inventory-file :binary t)))
-      ;; If first line is "Starting with tag:",
-      (let ((first-line (read-binary-line in)))
+      (let ((first-line (read-binary-line in nil :eof)))
+	(when (eq first-line :eof)
+	  ;; XXX: should this be (list nil)?
+	  (return-from read-repo-patch-list nil))
+	;; If first line is "Starting with tag:",
 	(if (string= (bytes-to-string first-line) "Starting with tag:")
 	    (let* ((tag-patch
 		    ;; read the first patch...



More information about the Cl-darcs-cvs mailing list