emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/vc.el
Date: Tue, 04 Feb 2003 07:12:12 -0500

Index: emacs/lisp/vc.el
diff -c emacs/lisp/vc.el:1.347 emacs/lisp/vc.el:1.348
*** emacs/lisp/vc.el:1.347      Thu Dec 26 09:04:21 2002
--- emacs/lisp/vc.el    Tue Feb  4 07:12:09 2003
***************
*** 6,12 ****
  ;; Maintainer: Andre Spiegel <address@hidden>
  ;; Keywords: tools
  
! ;; $Id: vc.el,v 1.347 2002/12/26 14:04:21 spiegel Exp $
  
  ;; This file is part of GNU Emacs.
  
--- 6,12 ----
  ;; Maintainer: Andre Spiegel <address@hidden>
  ;; Keywords: tools
  
! ;; $Id: vc.el,v 1.348 2003/02/04 12:12:09 lektu Exp $
  
  ;; This file is part of GNU Emacs.
  
***************
*** 148,154 ****
  ;;   contents with those of the master version.  If the backend does not
  ;;   have such a brief-comparison feature, the default implementation of
  ;;   this function can be used, which delegates to a full
! ;;   vc-BACKEND-diff.  (Note that vc-BACKEND-diff must not run 
  ;;   asynchronously in this case.)
  ;;
  ;; - mode-line-string (file)
--- 148,154 ----
  ;;   contents with those of the master version.  If the backend does not
  ;;   have such a brief-comparison feature, the default implementation of
  ;;   this function can be used, which delegates to a full
! ;;   vc-BACKEND-diff.  (Note that vc-BACKEND-diff must not run
  ;;   asynchronously in this case.)
  ;;
  ;; - mode-line-string (file)
***************
*** 722,728 ****
  (defun vc-default-previous-version (backend file rev)
    "Guess the version number immediately preceding REV for FILE.
  This default implementation works for <major>.<minor>-style version numbers
! as used by RCS and CVS."  
    (let ((branch (vc-branch-part rev))
          (minor-num (string-to-number (vc-minor-part rev))))
      (when branch
--- 722,728 ----
  (defun vc-default-previous-version (backend file rev)
    "Guess the version number immediately preceding REV for FILE.
  This default implementation works for <major>.<minor>-style version numbers
! as used by RCS and CVS."
    (let ((branch (vc-branch-part rev))
          (minor-num (string-to-number (vc-minor-part rev))))
      (when branch
***************
*** 782,788 ****
             (error (format "File not under version control: `%s'" file)))
         (unless (vc-editable-p ,filevar)
           (let ((state (vc-state ,filevar)))
!            (if (stringp state) 
                 (error (format "`%s' is locking `%s'" state ,filevar))
               (vc-checkout ,filevar t))))
         (save-excursion
--- 782,788 ----
             (error (format "File not under version control: `%s'" file)))
         (unless (vc-editable-p ,filevar)
           (let ((state (vc-state ,filevar)))
!            (if (stringp state)
                 (error (format "`%s' is locking `%s'" state ,filevar))
               (vc-checkout ,filevar t))))
         (save-excursion
***************
*** 1787,1793 ****
         (setq rel1-default (vc-workfile-version file)))
        ;; if the file is not locked, use last and previous version as default
        (t
!        (setq rel1-default (vc-call previous-version file 
                                     (vc-workfile-version file)))
         (if (string= rel1-default "") (setq rel1-default nil))
         (setq rel2-default (vc-workfile-version file))))
--- 1787,1793 ----
         (setq rel1-default (vc-workfile-version file)))
        ;; if the file is not locked, use last and previous version as default
        (t
!        (setq rel1-default (vc-call previous-version file
                                     (vc-workfile-version file)))
         (if (string= rel1-default "") (setq rel1-default nil))
         (setq rel2-default (vc-workfile-version file))))
***************
*** 2187,2193 ****
  Replace various columns with version control information, VC-INFO.
  This code, like dired, assumes UNIX -l format."
    (beginning-of-line)
!   (when (re-search-forward  
           ;; Match link count, owner, group, size.  Group may be missing,
           ;; and only the size is present in OS/2 -l format.
           "^..[drwxlts-]+ \\( *[0-9]+\\( [^ ]+ +\\([^ ]+ +\\)?[0-9]+\\)?\\) "
--- 2187,2193 ----
  Replace various columns with version control information, VC-INFO.
  This code, like dired, assumes UNIX -l format."
    (beginning-of-line)
!   (when (re-search-forward
           ;; Match link count, owner, group, size.  Group may be missing,
           ;; and only the size is present in OS/2 -l format.
           "^..[drwxlts-]+ \\( *[0-9]+\\( [^ ]+ +\\([^ ]+ +\\)?[0-9]+\\)?\\) "
***************
*** 2514,2520 ****
    "Update the current buffer's file to the latest version on its branch.
  If the file contains no changes, and is not locked, then this simply replaces
  the working file with the latest version on its branch.  If the file contains
! changes, and the backend supports merging news, then any recent changes from 
  the current branch are merged into the working file."
    (interactive)
    (vc-ensure-vc-buffer)
--- 2514,2520 ----
    "Update the current buffer's file to the latest version on its branch.
  If the file contains no changes, and is not locked, then this simply replaces
  the working file with the latest version on its branch.  If the file contains
! changes, and the backend supports merging news, then any recent changes from
  the current branch are merged into the working file."
    (interactive)
    (vc-ensure-vc-buffer)
***************
*** 2524,2538 ****
          (vc-checkout file nil "")
        (if (eq (vc-checkout-model file) 'locking)
            (if (eq (vc-state file) 'edited)
!               (error 
!                (substitute-command-keys 
             "File is locked--type \\[vc-revert-buffer] to discard changes"))
!             (error 
               (substitute-command-keys
!            "Unexpected file state (%s)--type \\[vc-next-action] to correct") 
                     (vc-state file)))
          (if (not (vc-find-backend-function (vc-backend file) 'merge-news))
!             (error "Sorry, merging news is not implemented for %s" 
                     (vc-backend file))
            (vc-call merge-news file)
            (vc-resynch-window file t t))))))
--- 2524,2538 ----
          (vc-checkout file nil "")
        (if (eq (vc-checkout-model file) 'locking)
            (if (eq (vc-state file) 'edited)
!               (error
!                (substitute-command-keys
             "File is locked--type \\[vc-revert-buffer] to discard changes"))
!             (error
               (substitute-command-keys
!            "Unexpected file state (%s)--type \\[vc-next-action] to correct")
                     (vc-state file)))
          (if (not (vc-find-backend-function (vc-backend file) 'merge-news))
!             (error "Sorry, merging news is not implemented for %s"
                     (vc-backend file))
            (vc-call merge-news file)
            (vc-resynch-window file t t))))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]