[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: |
Sam Steingold |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-cvs.el |
Date: |
Mon, 08 Apr 2002 09:38:48 -0400 |
Index: emacs/lisp/vc-cvs.el
diff -c emacs/lisp/vc-cvs.el:1.38 emacs/lisp/vc-cvs.el:1.39
*** emacs/lisp/vc-cvs.el:1.38 Thu Mar 28 09:27:30 2002
--- emacs/lisp/vc-cvs.el Mon Apr 8 09:38:48 2002
***************
*** 5,11 ****
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <address@hidden>
! ;; $Id: vc-cvs.el,v 1.38 2002/03/28 14:27:30 spiegel 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.39 2002/04/08 13:38:48 sds Exp $
;; This file is part of GNU Emacs.
***************
*** 114,120 ****
dates and the word \"Sticky\" for sticky tag names and revisions.
(lambda (tag type)
! (cond ((eq type 'date) (format-time-string
vc-cvs-sticky-date-format-string tag))
((eq type 'revision-number) \"Sticky\")
((eq type 'symbolic-name) \"Sticky\")))
--- 114,120 ----
dates and the word \"Sticky\" for sticky tag names and revisions.
(lambda (tag type)
! (cond ((eq type 'date) (format-time-string
vc-cvs-sticky-date-format-string tag))
((eq type 'revision-number) \"Sticky\")
((eq type 'symbolic-name) \"Sticky\")))
***************
*** 127,137 ****
(lambda (tag type)
(cond ((eq type 'date) (format-time-string \"%Y%m%d %H:%M\" tag))
((eq type 'revision-number) \"Sticky\")
! ((eq type 'symbolic-name)
(condition-case nil
(progn
(string-match \"\\\\([^-]*\\\\)\\\\(.*\\\\)\" tag)
! (concat (substring (match-string 1 tag) 0 1) \":\"
(substring (match-string 2 tag) 1 nil)))
(error tag))))) ; Fall-back to given tag name.
--- 127,137 ----
(lambda (tag type)
(cond ((eq type 'date) (format-time-string \"%Y%m%d %H:%M\" tag))
((eq type 'revision-number) \"Sticky\")
! ((eq type 'symbolic-name)
(condition-case nil
(progn
(string-match \"\\\\([^-]*\\\\)\\\\(.*\\\\)\" tag)
! (concat (substring (match-string 1 tag) 0 1) \":\"
(substring (match-string 2 tag) 1 nil)))
(error tag))))) ; Fall-back to given tag name.
***************
*** 328,340 ****
(concat "-m" comment)
switches))
(if (not (vc-cvs-valid-symbolic-tag-name-p rev))
! (error "%s is not a valid symbolic tag name")
;; If the input revison is a valid symbolic tag name, we create it
! ;; as a branch, commit and switch to it.
(apply 'vc-cvs-command nil 0 file "tag" "-b" (list rev))
(apply 'vc-cvs-command nil 0 file "update" "-r" (list rev))
(setq status (apply 'vc-cvs-command nil 1 file
! "ci"
(concat "-m" comment)
switches))
(vc-file-setprop file 'vc-cvs-sticky-tag rev)))
--- 328,340 ----
(concat "-m" comment)
switches))
(if (not (vc-cvs-valid-symbolic-tag-name-p rev))
! (error "%s is not a valid symbolic tag name" rev)
;; If the input revison is a valid symbolic tag name, we create it
! ;; as a branch, commit and switch to it.
(apply 'vc-cvs-command nil 0 file "tag" "-b" (list rev))
(apply 'vc-cvs-command nil 0 file "update" "-r" (list rev))
(setq status (apply 'vc-cvs-command nil 1 file
! "ci"
(concat "-m" comment)
switches))
(vc-file-setprop file 'vc-cvs-sticky-tag rev)))
***************
*** 634,645 ****
(defun vc-cvs-annotate-time ()
"Return the time of the next annotation (as fraction of days)
systime, or nil if there is none."
! (let ((time-stamp
"^\\S-+\\s-+\\S-+\\s-+\\([0-9]+\\)-\\(\\sw+\\)-\\([0-9]+\\)): "))
(if (looking-at time-stamp)
(progn
(let* ((day (string-to-number (match-string 1)))
! (month (cdr (assoc (match-string 2)
vc-cvs-local-month-numbers)))
(year-tmp (string-to-number (match-string 3)))
;; Years 0..68 are 2000..2068.
--- 634,645 ----
(defun vc-cvs-annotate-time ()
"Return the time of the next annotation (as fraction of days)
systime, or nil if there is none."
! (let ((time-stamp
"^\\S-+\\s-+\\S-+\\s-+\\([0-9]+\\)-\\(\\sw+\\)-\\([0-9]+\\)): "))
(if (looking-at time-stamp)
(progn
(let* ((day (string-to-number (match-string 1)))
! (month (cdr (assoc (match-string 2)
vc-cvs-local-month-numbers)))
(year-tmp (string-to-number (match-string 3)))
;; Years 0..68 are 2000..2068.
***************
*** 731,737 ****
The difference to vc-do-command is that this function always invokes `cvs',
and that it passes `vc-cvs-global-switches' to it before FLAGS."
(apply 'vc-do-command buffer okstatus "cvs" file
! (if (stringp vc-cvs-global-switches)
(cons vc-cvs-global-switches flags)
(append vc-cvs-global-switches
flags))))
--- 731,737 ----
The difference to vc-do-command is that this function always invokes `cvs',
and that it passes `vc-cvs-global-switches' to it before FLAGS."
(apply 'vc-do-command buffer okstatus "cvs" file
! (if (stringp vc-cvs-global-switches)
(cons vc-cvs-global-switches flags)
(append vc-cvs-global-switches
flags))))
***************
*** 782,788 ****
\[\t ]+\\([0-9.]+\\)"
nil t))
(vc-file-setprop file 'vc-latest-version (match-string 2)))
! (vc-file-setprop
file 'vc-state
(cond
((string-match "Up-to-date" status)
--- 782,788 ----
\[\t ]+\\([0-9.]+\\)"
nil t))
(vc-file-setprop file 'vc-latest-version (match-string 2)))
! (vc-file-setprop
file 'vc-state
(cond
((string-match "Up-to-date" status)
***************
*** 815,824 ****
;; lowercase letters, digits, `-', and `_'.
(and (string-match "^[a-zA-Z]" tag)
(not (string-match "[^a-z0-9A-Z-_]" tag))))
!
(defun vc-cvs-parse-sticky-tag (match-type match-tag)
! "Parse and return the sticky tag as a string.
`match-data' is protected."
(let ((data (match-data))
(tag)
--- 815,824 ----
;; lowercase letters, digits, `-', and `_'.
(and (string-match "^[a-zA-Z]" tag)
(not (string-match "[^a-z0-9A-Z-_]" tag))))
!
(defun vc-cvs-parse-sticky-tag (match-type match-tag)
! "Parse and return the sticky tag as a string.
`match-data' is protected."
(let ((data (match-data))
(tag)
***************
*** 830,840 ****
(t nil))))
(unwind-protect
(progn
! (cond
;; Sticky Date tag. Convert to to a proper date value
(`encode-time')
((eq type 'date)
! (string-match
!
"\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)"
match-tag)
(let* ((year-tmp (string-to-number (match-string 1 match-tag)))
(month (string-to-number (match-string 2 match-tag)))
--- 830,840 ----
(t nil))))
(unwind-protect
(progn
! (cond
;; Sticky Date tag. Convert to to a proper date value
(`encode-time')
((eq type 'date)
! (string-match
!
"\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)"
match-tag)
(let* ((year-tmp (string-to-number (match-string 1 match-tag)))
(month (string-to-number (match-string 2 match-tag)))
***************
*** 856,868 ****
(t nil))
(cond ((eq vc-cvs-sticky-tag-display nil) nil)
((eq vc-cvs-sticky-tag-display t)
! (cond ((eq type 'date) (format-time-string
vc-cvs-sticky-date-format-string
tag))
((eq type 'symbolic-name) tag)
((eq type 'revision-number) tag)
(t nil)))
! ((functionp vc-cvs-sticky-tag-display)
(funcall vc-cvs-sticky-tag-display tag type))
(t nil)))
--- 856,868 ----
(t nil))
(cond ((eq vc-cvs-sticky-tag-display nil) nil)
((eq vc-cvs-sticky-tag-display t)
! (cond ((eq type 'date) (format-time-string
vc-cvs-sticky-date-format-string
tag))
((eq type 'symbolic-name) tag)
((eq type 'revision-number) tag)
(t nil)))
! ((functionp vc-cvs-sticky-tag-display)
(funcall vc-cvs-sticky-tag-display tag type))
(t nil)))
***************
*** 905,911 ****
(t
(vc-file-setprop file 'vc-checkout-time 0)
(if set-state (vc-file-setprop file 'vc-state 'edited))))))))
!
(provide 'vc-cvs)
;;; vc-cvs.el ends here
--- 905,911 ----
(t
(vc-file-setprop file 'vc-checkout-time 0)
(if set-state (vc-file-setprop file 'vc-state 'edited))))))))
!
(provide 'vc-cvs)
;;; vc-cvs.el ends here
- [Emacs-diffs] Changes to emacs/lisp/vc-cvs.el,
Sam Steingold <=