/[meta-cvs]/meta-cvs/F-205A90D152A06EE04D552B256CDAF850
ViewVC logotype

Contents of /meta-cvs/F-205A90D152A06EE04D552B256CDAF850

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15.6.5 - (hide annotations)
Thu Apr 24 04:02:54 2003 UTC (10 years, 11 months ago) by kaz
Branch: mcvs-1-0-branch
CVS Tags: mcvs-1-0-8, mcvs-1-0-7
Changes since 1.15.6.4: +1 -1 lines
Improved error handling again in a flash of sanity. The whole
idea of ``bail'' as a restart is gone. All code which must perform
some complex cleanup action does so as part of normal unwinding.
And so termination becomes safe.

* code/update.lisp (mcvs-update): Change bail restart to continue.

* code/mcvs-main.lisp (*global-options*): Remove "error-bail".
(*usage*): Remove description of --error-bail.
(mcvs-execute): Bind *mcvs-error-treatment* to :terminate rather
than :bail if controlling TTY cannot be opened.

* code/move.lisp (mcvs-move): Change "Undoing move" error message
to "Undoing changes to map".

* code/add.lisp (mcvs-add): Get rid of bail restart; move cleanup
code into unwind-protect block.

* code/error.lisp (*mcvs-error-treatment*): Touch up docstring.
(mcvs-error-handler): Remove anything having to do with :bail.
Change description of `T' command to suggest that it is safe.

* code/options.lisp (filter-mcvs-options): Remove handling of
"error-bail" option.

* code/mapping.lisp (mapping-update): Get rid of outermost
restart-case, which had just a bail restart. Replace it with
unwind-protect block which does exactly the same restoration.
1 kaz 1.8 ;;; This source file is part of the Meta-CVS program,
2 kaz 1.5 ;;; which is distributed under the GNU license.
3     ;;; Copyright 2002 Kaz Kylheku
4    
5 kaz 1.1 (require "dirwalk")
6     (require "chatter")
7     (require "mapping")
8 kaz 1.6 (require "options")
9 kaz 1.13 (require "generic")
10 kaz 1.1 (provide "update")
11    
12 kaz 1.13 (defun mcvs-update (&optional cvs-options cvs-update-options files)
13     (let ((need-sync (not (find "p" cvs-update-options
14     :key #'first :test #'string=))))
15 kaz 1.15.6.1 (if (or files *metaonly-option* *nometa-option*)
16 kaz 1.15 (mcvs-generic "update" cvs-options cvs-update-options nil
17     files :need-sync-after need-sync
18     :need-update-after t
19     :default-include-meta-files nil)
20 kaz 1.14 (in-sandbox-root-dir
21 kaz 1.13 (if need-sync
22     (progn
23 kaz 1.15.6.3 ;; Push changes in tree to CVS sandbox, so they can be merged
24     ;; with stuff coming from repository.
25 kaz 1.13 (chatter-debug "Synchronizing.~%")
26 kaz 1.15.6.3 (mapping-synchronize :direction :left)
27 kaz 1.1
28 kaz 1.13 (current-dir-restore
29     (chdir *mcvs-dir*)
30 kaz 1.15.6.2 (super-restart-case
31     (progn
32     (chatter-debug "Invoking CVS.~%")
33     (unless (execute-program `("cvs" ,@(format-opt cvs-options)
34     "up" ,@(format-opt
35     cvs-update-options)))
36     (error "CVS update failed.")))
37 kaz 1.15.6.5 (continue ()
38 kaz 1.15.6.2 :report "Update file structure and re-synchronize."
39     (unwind))
40     (retry ()
41     :report "Try invoking CVS again."
42     (retry))))
43 kaz 1.1
44 kaz 1.13 (chatter-debug "Updating file structure.~%")
45     (mapping-update)
46     (chatter-debug "Synchronizing again.~%")
47 kaz 1.15.6.3 (mapping-synchronize :direction :right))
48 kaz 1.13 (current-dir-restore
49     (chdir *mcvs-dir*)
50     (chatter-debug "Invoking CVS.~%")
51 kaz 1.15.6.2 (unless (execute-program `("cvs" ,@(format-opt cvs-options)
52     "up" ,@(format-opt cvs-update-options))))
53     (error "CVS update failed."))))))
54 kaz 1.1 (values))
55 kaz 1.4
56 kaz 1.6 (defun mcvs-update-wrapper (cvs-options cvs-command-options mcvs-args)
57 kaz 1.13 (mcvs-update cvs-options cvs-command-options mcvs-args))

  ViewVC Help
Powered by ViewVC 1.1.5