/[meta-cvs]/meta-cvs/F-993DC8DDEC493F0D641AC0C23DB6BAB0
ViewVC logotype

Contents of /meta-cvs/F-993DC8DDEC493F0D641AC0C23DB6BAB0

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.28 - (hide annotations)
Fri Nov 24 04:53:50 2006 UTC (7 years, 4 months ago) by kaz
Branch: MAIN
Changes since 1.27: +1 -1 lines
Stylistic change.

* code/add.lisp: Change in-package calls not to use the all-caps
"META-CVS" string string, but rather the :meta-cvs keyword.
* code/branch.lisp: Likewise.
* code/chatter.lisp: Likewise.
* code/checkout.lisp: Likewise.
* code/clisp-unix.lisp: Likewise.
* code/cmucl-unix.lisp: Likewise.
* code/convert.lisp: Likewise.
* code/create.lisp: Likewise.
* code/dirwalk.lisp: Likewise.
* code/error.lisp: Likewise.
* code/execute.lisp: Likewise.
* code/filt.lisp: Likewise.
* code/find-bind.lisp: Likewise.
* code/generic.lisp: Likewise.
* code/grab.lisp: Likewise.
* code/link.lisp: Likewise.
* code/main.lisp: Likewise.
* code/mapping.lisp: Likewise.
* code/memoize.lisp: Likewise.
* code/move.lisp: Likewise.
* code/multi-hash.lisp: Likewise.
* code/options.lisp: Likewise.
* code/paths.lisp: Likewise.
* code/print.lisp: Likewise.
* code/prop.lisp: Likewise.
* code/purge.lisp: Likewise.
* code/rcs-utils.lisp: Likewise.
* code/remap.lisp: Likewise.
* code/remove.lisp: Likewise.
* code/restart.lisp: Likewise.
* code/restore.lisp: Likewise.
* code/seqfuncs.lisp: Likewise.
* code/slot-refs.lisp: Likewise.
* code/split.lisp: Likewise.
* code/sync.lisp: Likewise.
* code/types.lisp: Likewise.
* code/unix.lisp: Likewise.
* code/update.lisp: Likewise.
* code/watch.lisp: Likewise.
1 kaz 1.10 ;;; This source file is part of the Meta-CVS program,
2 kaz 1.8 ;;; which is distributed under the GNU license.
3     ;;; Copyright 2002 Kaz Kylheku
4    
5 kaz 1.28 (in-package :meta-cvs)
6 kaz 1.1
7 kaz 1.18 (defun mcvs-remove (recursivep files &key no-sync)
8 kaz 1.11 (when (null files)
9     (return-from mcvs-remove (values)))
10    
11 kaz 1.5 (in-sandbox-root-dir
12 kaz 1.11 (let (files-to-remove (filemap (mapping-read *mcvs-map*)))
13 kaz 1.1
14 kaz 1.13 (chatter-debug "Unmapping.~%")
15 kaz 1.1 (dolist (file files)
16     (can-restart-here ("Continue unmapping files.")
17 kaz 1.5 (let* ((full-name (sandbox-translate-path file))
18 kaz 1.23 (abs-name (canonicalize-path
19     (real-to-abstract-path full-name)))
20 kaz 1.19 (entries (mapping-prefix-matches filemap abs-name)))
21 kaz 1.16 (cond
22     ((path-prefix-equal *mcvs-dir* full-name)
23 kaz 1.22 (error "cannot remove ~a: path is in a reserved Meta-CVS area."
24 kaz 1.16 full-name))
25     ((and (second entries) (not recursivep))
26 kaz 1.22 (error "cannot remove ~a: it is a directory, use -R to remove."
27 kaz 1.16 full-name))
28 kaz 1.17 ((not entries)
29     (if (exists full-name)
30 kaz 1.22 (error "cannot remove ~a: it is local, not versioned under Meta-CVS."
31 kaz 1.17 full-name)
32 kaz 1.22 (error "cannot remove ~a: it does not exist." full-name)))
33 kaz 1.17 (t (setf files-to-remove (nconc files-to-remove entries)))))))
34 kaz 1.1
35     (when files-to-remove
36 kaz 1.26 ;; Removed files might have unsynchronized local edits, which
37     ;; will be irretrievably lost if we don't synchronize.
38     ;; But the grab command does not need this, hence no-sync option.
39 kaz 1.13 (chatter-debug "Synchronizing.~%")
40 kaz 1.18 (unless no-sync
41 kaz 1.26 (mapping-synchronize :direction :left))
42 kaz 1.1 (let ((new-filemap (set-difference filemap files-to-remove
43 kaz 1.20 :test #'mapping-same-id-p)))
44 kaz 1.11 (mapping-write new-filemap *mcvs-map* :sort-map t))
45 kaz 1.1
46 kaz 1.13 (chatter-debug "Updating file structure.~%")
47 kaz 1.18 (mapping-update :no-delete-removed no-sync))))
48 kaz 1.1 (values))
49 kaz 1.6
50 kaz 1.9 (defun mcvs-remove-wrapper (cvs-options cvs-command-options mcvs-args)
51 kaz 1.15 (declare (ignore cvs-options))
52     (find-bind (:test #'string= :key #'first)
53     ((recursivep "R"))
54     cvs-command-options
55     (mcvs-remove recursivep mcvs-args)))
56 kaz 1.21
57     (defconstant *remove-help*
58     "Syntax:
59    
60     mcvs remove [ options ] objects ...
61    
62     Options:
63    
64 kaz 1.24 -R Recursive behavior: recursively remove objects
65     in subdirectories. By default, trying to remove
66     a subdirectory signals a continuable error.
67 kaz 1.21
68     Semantics:
69    
70     The remove command removes objects from the mapping. To propagate
71     the removal to the repository, a commit operation must be invoked.
72    
73     Removed files are not actually subject to a CVS-level erasure; they are
74     merely removed from the map, but still exist in the MCVS subdirectory. Their
75     local modifications are not lost. To actually remove files from CVS,
76     use the purge command. Removed files that have not been purged can be
77     recovered via the restore command which re-creates mapping entries for them
78     in the lost+found directory under machine-generated names; they can then be
79     renamed to more appropriate names. Symbolic links cannot be restored;
80     they exist as mapping entries only.")

  ViewVC Help
Powered by ViewVC 1.1.5