/[meta-cvs]/meta-cvs/F-AFC09F145399B1273F4BF98702F5BE8C
ViewVC logotype

Contents of /meta-cvs/F-AFC09F145399B1273F4BF98702F5BE8C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations)
Thu Jan 31 06:17:50 2002 UTC (12 years, 2 months ago) by kaz
Branch: MAIN
CVS Tags: mcvs-0-2
Changes since 1.9: +2 -3 lines
Factored out repeated code for reading and writing of the MAP and
MAP-LOCAL files.

* mapping.lisp (mapping-read, mapping-write): New functions.
(mapping-synchronize, mapping-update): Use new functions.
* move.lisp (mcvs-move): Likewise.
* filt.lisp (mcvs-filt): Likewise.
* add.lisp (mcvs-add): Likewise.
* remove.lisp (mcvs-remove): Likewise.
* checkout.lisp (mcvs-checkout): Likewise.
* diff.lisp (mcvs-diff): Likewise.
* import.lisp (mcvs-import): Likewise.
1 ;;; This source file is part of the Meta-CVS program,
2 ;;; which is distributed under the GNU license.
3 ;;; Copyright 2002 Kaz Kylheku
4
5 (require "system")
6 (require "mapping")
7 (require "chatter")
8 (require "options")
9 (provide "diff")
10
11 (defun mcvs-diff (cvs-options diff-options files)
12 (in-sandbox-root-dir
13 (let (files-to-diff
14 (filemap (mapping-read *mcvs-map-local*)))
15
16 (chatter-info "Preparing diff list.~%")
17 (when (null files)
18 (setf files '(".")))
19 (dolist (file files)
20 (can-restart-here ("Continue preparing diff list.")
21 (let* ((full-name (sandbox-translate-path file))
22 (entries (filemap-prefix-matches filemap full-name)))
23 (if (not entries)
24 (error "mcvs-diff: ~a is not known to Meta-CVS." full-name)
25 (setf files-to-diff (nconc files-to-diff entries))))))
26
27 (when files-to-diff
28 (chatter-info "Synchronizing.~%")
29 (mapping-synchronize)
30
31 (current-dir-restore
32 (chdir *mcvs-dir*)
33 (chatter-info "Invoking CVS.~%")
34 (execute-program `("cvs" ,@(format-opt cvs-options)
35 "diff" ,@(format-opt diff-options)
36 "MAP"
37 ,@(mapcar #'(lambda (x)
38 (basename (first x)))
39 files-to-diff))))))
40 (values)))
41
42 (defun mcvs-diff-wrapper (cvs-options cvs-command-options mcvs-args)
43 (mcvs-diff cvs-options cvs-command-options mcvs-args))

  ViewVC Help
Powered by ViewVC 1.1.5