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

mhenoch at common-lisp.net mhenoch at common-lisp.net
Thu Sep 6 05:53:43 UTC 2007


Author: mhenoch
Date: Thu Sep  6 01:53:42 2007
New Revision: 144

Modified:
   cl-darcs/trunk/get.lisp
   cl-darcs/trunk/repo.lisp
Log:
PREPARE-NEW-REPO: assume and assert that directory exists, instead of creating it.
Callers updated.


Modified: cl-darcs/trunk/get.lisp
==============================================================================
--- cl-darcs/trunk/get.lisp	(original)
+++ cl-darcs/trunk/get.lisp	Thu Sep  6 01:53:42 2007
@@ -1,4 +1,4 @@
-;;; Copyright (C) 2006 Magnus Henoch
+;;; Copyright (C) 2006, 2007 Magnus Henoch
 ;;;
 ;;; This program is free software; you can redistribute it and/or
 ;;; modify it under the terms of the GNU General Public License as
@@ -40,6 +40,7 @@
 	(format t "~{~&~A~}" motd)))
 
     ;; Create directories...
+    (ensure-directories-exist outname)
     (prepare-new-repo outname)
     (set-default-repo outname inrepodir)
 

Modified: cl-darcs/trunk/repo.lisp
==============================================================================
--- cl-darcs/trunk/repo.lisp	(original)
+++ cl-darcs/trunk/repo.lisp	Thu Sep  6 01:53:42 2007
@@ -18,7 +18,8 @@
 
 (defun prepare-new-repo (outname)
   "Create directories for starting a repo at OUTNAME."
-  (make-dir outname)
+  (unless (fad:directory-exists-p outname)
+    (error "Directory ~A does not exist." outname))
   (make-dir (merge-pathnames (make-pathname :directory (list :relative "_darcs"))
 			     outname))
   (dolist (dir '("patches" "checkpoints" "prefs" "inventories"))



More information about the Cl-darcs-cvs mailing list