/[emacs]/emacs/lisp/vc-hooks.el
ViewVC logotype

Diff of /emacs/lisp/vc-hooks.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.136 by pj, Tue Dec 11 07:35:18 2001 UTC revision 1.137 by spiegel, Fri Dec 14 07:58:33 2001 UTC
# Line 304  If the file is not registered, or the ma Line 304  If the file is not registered, or the ma
304  (defun vc-checkout-model (file)  (defun vc-checkout-model (file)
305    "Indicate how FILE is checked out.    "Indicate how FILE is checked out.
306    
307  Possible values:  If FILE is not registered, this function always returns nil.
308    For registered files, the possible values are:
309    
310    'implicit   File is always writeable, and checked out `implicitly'    'implicit   FILE is always writeable, and checked out `implicitly'
311                when the user saves the first changes to the file.                when the user saves the first changes to the file.
312    
313    'locking    File is read-only if up-to-date; user must type    'locking    FILE is read-only if up-to-date; user must type
314                \\[vc-toggle-read-only] before editing.  Strict locking                \\[vc-toggle-read-only] before editing.  Strict locking
315                is assumed.                is assumed.
316    
317    'announce   File is read-only if up-to-date; user must type    'announce   FILE is read-only if up-to-date; user must type
318                \\[vc-toggle-read-only] before editing.  But other users                \\[vc-toggle-read-only] before editing.  But other users
319                may be editing at the same time."                may be editing at the same time."
320    (or (vc-file-getprop file 'vc-checkout-model)    (or (vc-file-getprop file 'vc-checkout-model)
321        (vc-file-setprop file 'vc-checkout-model        (if (vc-backend file)
322                         (vc-call checkout-model file))))            (vc-file-setprop file 'vc-checkout-model
323                               (vc-call checkout-model file)))))
324    
325  (defun vc-user-login-name (&optional uid)  (defun vc-user-login-name (&optional uid)
326    "Return the name under which the user is logged in, as a string.    "Return the name under which the user is logged in, as a string.
# Line 332  UID is returned as a string." Line 334  UID is returned as a string."
334  (defun vc-state (file)  (defun vc-state (file)
335    "Return the version control state of FILE.    "Return the version control state of FILE.
336    
337  The value returned is one of:  If FILE is not registered, this function always returns nil.
338    For registered files, the value returned is one of:
339    
340    'up-to-date        The working file is unmodified with respect to the    'up-to-date        The working file is unmodified with respect to the
341                       latest version on the current branch, and not locked.                       latest version on the current branch, and not locked.
# Line 360  The value returned is one of: Line 363  The value returned is one of:
363                       should be resolved by the user (vc-next-action will                       should be resolved by the user (vc-next-action will
364                       prompt the user to do it)."                       prompt the user to do it)."
365    (or (vc-file-getprop file 'vc-state)    (or (vc-file-getprop file 'vc-state)
366        (vc-file-setprop file 'vc-state        (if (vc-backend file)
367                         (vc-call state-heuristic file))))            (vc-file-setprop file 'vc-state
368                               (vc-call state-heuristic file)))))
369    
370  (defsubst vc-up-to-date-p (file)  (defsubst vc-up-to-date-p (file)
371    "Convenience function that checks whether `vc-state' of FILE is `up-to-date'."    "Convenience function that checks whether `vc-state' of FILE is `up-to-date'."
# Line 374  and does not employ any heuristic at all Line 378  and does not employ any heuristic at all
378     (vc-call-backend backend 'state file))     (vc-call-backend backend 'state file))
379    
380  (defun vc-workfile-version (file)  (defun vc-workfile-version (file)
381    "Return version level of the current workfile FILE."    "Return the version level of the current workfile FILE.
382    If FILE is not registered, this function always returns nil."
383    (or (vc-file-getprop file 'vc-workfile-version)    (or (vc-file-getprop file 'vc-workfile-version)
384        (vc-file-setprop file 'vc-workfile-version        (if (vc-backend file)
385                         (vc-call workfile-version file))))            (vc-file-setprop file 'vc-workfile-version
386                               (vc-call workfile-version file)))))
387    
388  ;;; actual version-control code starts here  ;;; actual version-control code starts here
389    
# Line 412  and does not employ any heuristic at all Line 418  and does not employ any heuristic at all
418        (if (consp result) (car result) result)))))        (if (consp result) (car result) result)))))
419    
420  (defun vc-check-master-templates (file templates)  (defun vc-check-master-templates (file templates)
421    "Return non-nil if there is a master corresponding to FILE,    "Return non-nil if there is a master corresponding to FILE.
 according to any of the elements in TEMPLATES.  
422    
423  TEMPLATES is a list of strings or functions.  If an element is a  TEMPLATES is a list of strings or functions.  If an element is a
424  string, it must be a control string as required by `format', with two  string, it must be a control string as required by `format', with two
# Line 463  to do that, use this command a second ti Line 468  to do that, use this command a second ti
468  (define-key global-map "\C-x\C-q" 'vc-toggle-read-only)  (define-key global-map "\C-x\C-q" 'vc-toggle-read-only)
469    
470  (defun vc-default-make-version-backups-p (backend file)  (defun vc-default-make-version-backups-p (backend file)
471    "Return non-nil if unmodified repository versions should be backed up locally.    "Return non-nil if unmodified versions should be backed up locally.
472  The default is to switch off this feature."  The default is to switch off this feature."
473    nil)    nil)
474    

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.137

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26