[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-cvs.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-cvs.el |
Date: |
Fri, 09 May 2003 10:32:02 -0400 |
Index: emacs/lisp/vc-cvs.el
diff -c emacs/lisp/vc-cvs.el:1.59 emacs/lisp/vc-cvs.el:1.60
*** emacs/lisp/vc-cvs.el:1.59 Thu May 8 16:44:50 2003
--- emacs/lisp/vc-cvs.el Fri May 9 10:32:01 2003
***************
*** 5,11 ****
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <address@hidden>
! ;; $Id: vc-cvs.el,v 1.59 2003/05/08 20:44:50 monnier Exp $
;; This file is part of GNU Emacs.
--- 5,11 ----
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <address@hidden>
! ;; $Id: vc-cvs.el,v 1.60 2003/05/09 14:32:01 monnier Exp $
;; This file is part of GNU Emacs.
***************
*** 257,281 ****
Compared to the default implementation, this function does two things:
Handle the special case of a CVS file that is added but not yet
committed and support display of sticky tags."
! (let* ((state (vc-state file))
! (rev (vc-workfile-version file))
! (sticky-tag (vc-file-getprop file 'vc-cvs-sticky-tag))
! (sticky-tag-printable (and sticky-tag
! (not (string= sticky-tag ""))
! (concat "[" sticky-tag "]"))))
! (cond ((string= rev "0")
! ;; A file that is added but not yet committed.
! "CVS @@")
! ((or (eq state 'up-to-date)
! (eq state 'needs-patch))
! (concat "CVS-" rev sticky-tag-printable))
! ((stringp state)
! (concat "CVS:" state ":" rev sticky-tag-printable))
! (t
! ;; Not just for the 'edited state, but also a fallback
! ;; for all other states. Think about different symbols
! ;; for 'needs-patch and 'needs-merge.
! (concat "CVS:" rev sticky-tag-printable)))))
(defun vc-cvs-dired-state-info (file)
"CVS-specific version of `vc-dired-state-info'."
--- 257,270 ----
Compared to the default implementation, this function does two things:
Handle the special case of a CVS file that is added but not yet
committed and support display of sticky tags."
! (let ((sticky-tag (vc-file-getprop file 'vc-cvs-sticky-tag))
! (string (if (string= (vc-workfile-version file) "0")
! ;; A file that is added but not yet committed.
! "CVS @@"
! (vc-default-mode-line-string 'CVS file))))
! (if (zerop (length sticky-tag))
! string
! (concat string "[" sticky-tag "]"))))
(defun vc-cvs-dired-state-info (file)
"CVS-specific version of `vc-dired-state-info'."
***************
*** 447,452 ****
--- 436,453 ----
switches))))
(vc-mode-line file)
(message "Checking out %s...done" filename)))))
+
+ (defun vc-cvs-delete-file (file)
+ (vc-cvs-command nil 0 file "remove" "-f"))
+
+ (defun vc-cvs-rename-file (old new)
+ ;; CVS doesn't know how to move files, so we just remove&add.
+ (condition-case nil
+ (add-name-to-file old new)
+ (error (rename-file old new)))
+ (vc-cvs-delete-file old)
+ (with-current-buffer (find-file-noselect new)
+ (vc-register)))
(defun vc-cvs-revert (file &optional contents-done)
"Revert FILE to the version it was based on."