[Cl-darcs-cvs] r152 - cl-darcs/trunk
mhenoch at common-lisp.net
mhenoch at common-lisp.net
Tue Jan 8 18:05:49 UTC 2008
Author: mhenoch
Date: Tue Jan 8 13:05:49 2008
New Revision: 152
Modified:
cl-darcs/trunk/get.lisp
Log:
CREATE-REPO: Create directory if it doesn't exist. Always make an empty pristine tree.
Modified: cl-darcs/trunk/get.lisp
==============================================================================
--- cl-darcs/trunk/get.lisp (original)
+++ cl-darcs/trunk/get.lisp Tue Jan 8 13:05:49 2008
@@ -1,4 +1,4 @@
-;;; Copyright (C) 2006, 2007 Magnus Henoch
+;;; Copyright (C) 2006, 2007, 2008 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
@@ -19,8 +19,15 @@
(defun create-repo (repodir)
"Create an empty repository."
(setf repodir (fad:pathname-as-directory repodir))
+
+ ;; Create the directory if it doesn't exist, then get the absolute
+ ;; path.
+ (ensure-directories-exist repodir)
+ (setf repodir (truename repodir))
+
+ ;; Darcsify it.
(prepare-new-repo repodir)
- (create-pristine-from-tree repodir))
+ (create-empty-pristine repodir))
;; get_cmd in Get.lhs
(defun get-repo (inrepodir outname &key (partial nil) (query nil))
More information about the Cl-darcs-cvs
mailing list