source: cl-darcs/tags/0.1.0/init.lisp

Last change on this file was 1, checked in by Magnus Henoch, 18 years ago

Initial import

File size: 1.2 KB
Line 
1;;; Copyright (C) 2006 Magnus Henoch
2;;;
3;;; This program is free software; you can redistribute it and/or
4;;; modify it under the terms of the GNU General Public License as
5;;; published by the Free Software Foundation; either version 2 of the
6;;; License, or (at your option) any later version.
7;;;
8;;; This program is distributed in the hope that it will be useful,
9;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
10;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11;;; General Public License for more details.
12;;;
13;;; You should have received a copy of the GNU General Public License
14;;; along with this program; if not, write to the Free Software
15;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
16
17(in-package :darcs)
18
19(defun init-tree (treedir)
20  "Initialize TREEDIR for use as a Darcs tree."
21  ;; _darcs/current is actually a "pristine" directory
22  (dolist (dir '(("_darcs") ("_darcs" "patches") ("_darcs" "prefs")
23                 ("_darcs" "current") "_darcs" "inventories"))
24    (make-dir (merge-pathnames 
25               (make-pathname :directory (cons :relative dir))
26               treedir)))
27 
28  (write-inventory treedir ()))
Note: See TracBrowser for help on using the repository browser.