Commit d7e4ffdd authored by kaz's avatar kaz
Browse files

New commands, sync-from-cvs and sync-to-cvs.

* code/mcvs-main.lisp (*sync-to-cvs-options*, *sync-from-cvs-options*):
New option constants.
(*mcvs-command-table*): New entries.
(*usage*): New help text.

* code/generic.lisp (mcvs-generic): New keyword parameter
no-invoke-cvs.
(mcvs-sync-to-wrapper, mcvs-sync-from-wrapper): New functions.
parent efb7c072
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
2003-04-23  Kaz Kylheku  <kaz@ashi.footprints.net>

	New commands, sync-from-cvs and sync-to-cvs.

	* code/mcvs-main.lisp (*sync-to-cvs-options*, *sync-from-cvs-options*):
	New option constants.
	(*mcvs-command-table*): New entries.
	(*usage*): New help text.

	* code/generic.lisp (mcvs-generic): New keyword parameter
	no-invoke-cvs.
	(mcvs-sync-to-wrapper, mcvs-sync-from-wrapper): New functions.

2003-04-23  Kaz Kylheku  <kaz@ashi.footprints.net>

	Improved error handling again in a flash of sanity. The whole
+8 −1
Original line number Diff line number Diff line
@@ -133,6 +133,8 @@
(define-option-constant *edit-options*)
(define-option-constant *unedit-options*)
(define-option-constant *editors-options*)
(define-option-constant *sync-to-cvs-options*)
(define-option-constant *sync-from-cvs-options*)

(defun mcvs-help (global-options command-options args)
  (declare (special *usage* *mcvs-command-table*)
@@ -205,7 +207,9 @@
   ("watchers" ,#'mcvs-watchers-wrapper nil ,*watchers-options*)
   ("edit" ,#'mcvs-edit-wrapper nil ,*edit-options*)
   ("unedit" ,#'mcvs-unedit-wrapper nil ,*unedit-options*)
   ("editors" ,#'mcvs-editors-wrapper nil ,*editors-options*)))
   ("editors" ,#'mcvs-editors-wrapper nil ,*editors-options*)
   ("sync-from-cvs" ,#'mcvs-sync-from-wrapper nil ,*editors-options*)
   ("sync-to-cvs" ,#'mcvs-sync-to-wrapper nil ,*editors-options*)))

(defconstant *usage*
"Meta-CVS command syntax:
@@ -315,6 +319,9 @@ Commands:
  edit               Indicate the intent to edit a watched file.
  unedit             Retract the indication signaled by edit.
  editors            See who is editing files.
  sync-to-cvs        Synchronize tree in the direction of the CVS sandbox.
                     Useful when extending Meta-CVS with external scripts.
  sync-from-cvs      Synchronize CVS sandbox to the tree.
  convert            Convert a CVS module to a Meta-CVS project. This requires
                     filesystem-level access to the repository. This is
                     currently an experimental command that is known not
+29 −18
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
(defun mcvs-generic (cvs-command cvs-options command-options command-args 
		     files &key need-sync-before need-sync-after 
		     default-include-meta-files need-update-after 
		     global-if-empty-file-list)
		     global-if-empty-file-list no-invoke-cvs)
  (in-sandbox-root-dir
    (let (files-to-process
	  (filemap (mapping-read *mcvs-map-local*))
@@ -50,6 +50,7 @@
	  (chatter-debug "Synchronizing.~%")
	  (mapping-synchronize :filemap files-to-process
			       :direction :left))
	(unless no-invoke-cvs
	  (current-dir-restore 
	    (chdir *mcvs-dir*) 
	    (chatter-debug "Invoking CVS.~%")
@@ -66,7 +67,7 @@
				     ,@(mapcar #'(lambda (x) 
						   (basename 
						     (mapping-entry-id x))) 
					     files-to-process))))
					       files-to-process)))))
	(when (and do-meta-files need-update-after)
	  (chatter-debug "Updating file structure.~%")
	  (mapping-update))
@@ -118,3 +119,13 @@

(defun mcvs-editors-wrapper (cvs-options cvs-command-options mcvs-args)
  (mcvs-generic "editors" cvs-options cvs-command-options nil mcvs-args))

(defun mcvs-sync-to-wrapper (cvs-options cvs-command-options mcvs-args)
  (mcvs-generic "" cvs-options cvs-command-options nil mcvs-args
		:need-sync-before t
		:no-invoke-cvs t))

(defun mcvs-sync-from-wrapper (cvs-options cvs-command-options mcvs-args)
  (mcvs-generic "" cvs-options cvs-command-options nil mcvs-args
		:need-sync-after t
		:no-invoke-cvs t))
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@

Release 1.0.7, 2003-0?-??:

  New commands sync-to-cvs and sync-from-cvs expose the hard link
  synchronization algorithm.

  Revamped error recovery logic. To continue in an error situation now
  consistently means ``take the bold action that may erase data''
  or ``proceed in the most obvious way to finish the specified job''.