Mercurial > emacs
changeset 4656:29bd5f3d0059
(vc-locked-example): Renamed from vc-quiescent-p. Now yields example of
why current directory is not quiescent. All callers changed to use this.
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Fri, 27 Aug 1993 03:55:16 +0000 |
parents | 604a401e05a4 |
children | 5049c683d5e9 |
files | lisp/vc.el |
diffstat | 1 files changed, 23 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/vc.el Fri Aug 27 01:57:48 1993 +0000 +++ b/lisp/vc.el Fri Aug 27 03:55:16 1993 +0000 @@ -995,14 +995,15 @@ ;; Named-configuration entry points -(defun vc-quiescent-p () - ;; Is the current directory ready to be snapshot? - (catch 'quiet +(defun vc-locked-example () + ;; Return an example of why the current directory is not ready to be snapshot + ;; or nil if no such example exists. + (catch 'vc-locked-example (vc-file-tree-walk (function (lambda (f) (if (and (vc-registered f) (vc-locking-user f)) - (throw 'quiet nil))))) - t)) + (throw 'vc-locked-example f))))) + nil)) ;;;###autoload (defun vc-create-snapshot (name) @@ -1011,13 +1012,14 @@ directory. For each file, the version level of its latest version becomes part of the named configuration." (interactive "sNew snapshot name: ") - (if (not (vc-quiescent-p)) - (error "Can't make a snapshot since some files are locked") - (vc-file-tree-walk - (function (lambda (f) (and - (vc-name f) - (vc-backend-assign-name f name))))) - )) + (let ((locked (vc-locked-example))) + (if locked + (error "File %s is locked" locked) + (vc-file-tree-walk + (function (lambda (f) (and + (vc-name f) + (vc-backend-assign-name f name))))) + ))) ;;;###autoload (defun vc-retrieve-snapshot (name) @@ -1026,13 +1028,15 @@ Otherwise, all registered files are checked out (unlocked) at their version levels in the snapshot." (interactive "sSnapshot name to retrieve: ") - (if (not (vc-quiescent-p)) - (error "Can't retrieve snapshot sine some files are locked") - (vc-file-tree-walk - (function (lambda (f) (and - (vc-name f) - (vc-error-occurred (vc-backend-checkout f nil name)))))) - )) + (let ((locked (vc-locked-example))) + (if locked + (error "File %s is locked" locked) + (vc-file-tree-walk + (function (lambda (f) (and + (vc-name f) + (vc-error-occurred + (vc-backend-checkout f nil name)))))) + ))) ;; Miscellaneous other entry points