/[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.134.4.1 by spiegel, Fri Nov 9 15:11:14 2001 UTC revision 1.134.4.2 by spiegel, Fri Dec 14 08:19:06 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    
321    If FILE is not registered, this function always returns nil."
322    (or (vc-file-getprop file 'vc-checkout-model)    (or (vc-file-getprop file 'vc-checkout-model)
323        (vc-file-setprop file 'vc-checkout-model        (if (vc-backend file)
324                         (vc-call checkout-model file))))            (vc-file-setprop file 'vc-checkout-model
325                               (vc-call checkout-model file)))))
326    
327  (defun vc-user-login-name (&optional uid)  (defun vc-user-login-name (&optional uid)
328    "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 336  UID is returned as a string."
336  (defun vc-state (file)  (defun vc-state (file)
337    "Return the version control state of FILE.    "Return the version control state of FILE.
338    
339  The value returned is one of:  If FILE is not registered, this function always returns nil.
340    For registered files, the value returned is one of:
341    
342    'up-to-date        The working file is unmodified with respect to the    'up-to-date        The working file is unmodified with respect to the
343                       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 365  The value returned is one of:
365                       should be resolved by the user (vc-next-action will                       should be resolved by the user (vc-next-action will
366                       prompt the user to do it)."                       prompt the user to do it)."
367    (or (vc-file-getprop file 'vc-state)    (or (vc-file-getprop file 'vc-state)
368        (vc-file-setprop file 'vc-state        (if (vc-backend file)
369                         (vc-call state-heuristic file))))            (vc-file-setprop file 'vc-state
370                               (vc-call state-heuristic file)))))
371    
372  (defsubst vc-up-to-date-p (file)  (defsubst vc-up-to-date-p (file)
373    "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 380  and does not employ any heuristic at all
380     (vc-call-backend backend 'state file))     (vc-call-backend backend 'state file))
381    
382  (defun vc-workfile-version (file)  (defun vc-workfile-version (file)
383    "Return version level of the current workfile FILE."    "Return the version level of the current workfile FILE.
384    If FILE is not registered, this function always returns nil."
385    (or (vc-file-getprop file 'vc-workfile-version)    (or (vc-file-getprop file 'vc-workfile-version)
386        (vc-file-setprop file 'vc-workfile-version        (if (vc-backend file)
387                         (vc-call workfile-version file))))            (vc-file-setprop file 'vc-workfile-version
388                               (vc-call workfile-version file)))))
389    
390  ;;; actual version-control code starts here  ;;; actual version-control code starts here
391    
# Line 412  and does not employ any heuristic at all Line 420  and does not employ any heuristic at all
420        (if (consp result) (car result) result)))))        (if (consp result) (car result) result)))))
421    
422  (defun vc-check-master-templates (file templates)  (defun vc-check-master-templates (file templates)
423    "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.  
424    
425  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
426  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 470  to do that, use this command a second ti
470  (define-key global-map "\C-x\C-q" 'vc-toggle-read-only)  (define-key global-map "\C-x\C-q" 'vc-toggle-read-only)
471    
472  (defun vc-default-make-version-backups-p (backend file)  (defun vc-default-make-version-backups-p (backend file)
473    "Return non-nil if unmodified repository versions should    "Return non-nil if unmodified versions should be backed up locally.
474  be backed up locally.  The default is to switch off this feature."  The default is to switch off this feature."
475    nil)    nil)
476    
477  (defun vc-version-backup-file-name (file &optional rev manual regexp)  (defun vc-version-backup-file-name (file &optional rev manual regexp)

Legend:
Removed from v.1.134.4.1  
changed lines
  Added in v.1.134.4.2

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