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

Last change on this file was 51, checked in by Magnus Henoch, 17 years ago

Add functions for keeping a pristine. Use it when getting and pulling.

File size: 1.3 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 create-pristine-from-tree (repodir)
20  "Copy the checked-out tree at REPODIR to get a pristine tree."
21  (let* ((darcs-dir (upath-subdir repodir '("_darcs")))
22         (pristine-dir (upath-subdir darcs-dir '("pristine"))))
23    (make-dir pristine-dir)
24    (copy-directory repodir pristine-dir :excluding (list darcs-dir))))
25
26(defun apply-patch-to-pristine (patch repodir)
27  "Apply PATCH to the pristine tree in REPODIR."
28  (apply-patch patch (upath-subdir repodir '("_darcs" "pristine"))))
Note: See TracBrowser for help on using the repository browser.