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

Diff of /emacs/lisp/vc.el

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

revision 1.328 by spiegel, Thu Feb 28 09:59:08 2002 UTC revision 1.329 by spiegel, Thu Feb 28 13:01:48 2002 UTC
# Line 2571  changes found in the master file; use \\ Line 2571  changes found in the master file; use \\
2571      (vc-revert-file file)      (vc-revert-file file)
2572      (message "Reverting %s...done" file)))      (message "Reverting %s...done" file)))
2573    
2574    ;;;###autoload
2575    (defun vc-update ()
2576      "Update the current buffer's file to the latest version on its branch.
2577    If the file contains no changes, and is not locked, then this simply replaces
2578    the working file with the latest version on its branch.  If the file contains
2579    changes, and the backend supports merging news, then any recent changes from
2580    the current branch are merged into the working file."
2581      (interactive)
2582      (vc-ensure-vc-buffer)
2583      (vc-buffer-sync nil)
2584      (let ((file buffer-file-name))
2585        (if (vc-up-to-date-p file)
2586            (vc-checkout file nil "")
2587          (if (eq (vc-checkout-model file) 'locking)
2588              (if (eq (vc-state file) 'edited)
2589                  (error
2590                   (substitute-command-keys
2591               "File is locked--type \\[vc-revert-buffer] to discard changes"))
2592                (error
2593                 (substitute-command-keys
2594               "Unexpected file state (%s)--type \\[vc-next-action] to correct")
2595                       (vc-state file)))
2596            (if (not (vc-find-backend-function (vc-backend file) 'merge-news))
2597                (error "Sorry, merging news is not implemented for %s"
2598                       (vc-backend file))
2599              (vc-call merge-news file)
2600              (vc-resynch-window file t t))))))
2601    
2602  (defun vc-version-backup-file (file &optional rev)  (defun vc-version-backup-file (file &optional rev)
2603    "Return name of backup file for revision REV of FILE.    "Return name of backup file for revision REV of FILE.
2604  If version backups should be used for FILE, and there exists  If version backups should be used for FILE, and there exists

Legend:
Removed from v.1.328  
changed lines
  Added in v.1.329

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