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

Contents of /meta-cvs/F-AFC09F145399B1273F4BF98702F5BE8C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sun Jan 20 20:33:04 2002 UTC (12 years, 3 months ago) by kaz
Branch: MAIN
Adding mcvs-diff.
1 (require "system")
2 (require "mapping")
3 (require "chatter")
4 (provide "diff")
5
6 (defun mcvs-diff (&rest files)
7 (current-dir-restore
8 (let ((down-path (mcvs-locate)) filemap files-to-diff)
9 (if (not down-path)
10 (error "mcvs-diff: could not locate ~a directory." *mcvs-dir*))
11
12 (with-open-file (file *mcvs-map-local* :direction :input)
13 (setf filemap (read file)))
14
15 (chatter-info "Preparing diff list.~%")
16 (when (null files)
17 (setf files '(".")))
18 (dolist (file files)
19 (can-restart-here ("Continue preparing diff list.")
20 (multiple-value-bind (full-name out-of-bounds)
21 (canonicalize-path (path-cat down-path file))
22 (let ((entries (filemap-prefix-lookup filemap full-name)))
23 (if (not entries)
24 (chatter-terse "mcvs-diff: path ~a is not within sandbox." 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" "diff"
35 ,@(mapcar #'(lambda (x)
36 (basename (first x)))
37 files-to-diff))))))
38 (values)))

  ViewVC Help
Powered by ViewVC 1.1.5