aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2002-04-08 13:38:48 +0000
committerSam Steingold2002-04-08 13:38:48 +0000
commit968b980cd80c28e6d05a6ee083586ec2d1b585f8 (patch)
tree4024796fda9a9ab10010a89b3af6fd30a090d926
parent2c9dccc9e860008be49dccf20e61744e77b75c91 (diff)
downloademacs-968b980cd80c28e6d05a6ee083586ec2d1b585f8.tar.gz
emacs-968b980cd80c28e6d05a6ee083586ec2d1b585f8.zip
(vc-cvs-checkin): Pass the required argument to `error'.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/vc-cvs.el38
2 files changed, 23 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 357cd0ceb69..5628198bb32 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12002-04-07 Sam Steingold <sds@gnu.org>
2
3 * vc-cvs.el (vc-cvs-checkin): Pass the required argument to `error'.
4
12002-04-08 Pavel Jan,Bm(Bk <Pavel@Janik.cz> 52002-04-08 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
2 6
3 * files.el (display-time-string): Fix last change. 7 * files.el (display-time-string): Fix last change.
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el
index 815b9abf692..5a92f8fa0f3 100644
--- a/lisp/vc-cvs.el
+++ b/lisp/vc-cvs.el
@@ -5,7 +5,7 @@
5;; Author: FSF (see vc.el for full credits) 5;; Author: FSF (see vc.el for full credits)
6;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8;; $Id: vc-cvs.el,v 1.37 2002/03/22 23:10:01 monnier Exp $ 8;; $Id: vc-cvs.el,v 1.38 2002/03/28 14:27:30 spiegel Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -114,7 +114,7 @@ Here's an example that will display the formatted date for sticky
114dates and the word \"Sticky\" for sticky tag names and revisions. 114dates and the word \"Sticky\" for sticky tag names and revisions.
115 115
116 (lambda (tag type) 116 (lambda (tag type)
117 (cond ((eq type 'date) (format-time-string 117 (cond ((eq type 'date) (format-time-string
118 vc-cvs-sticky-date-format-string tag)) 118 vc-cvs-sticky-date-format-string tag))
119 ((eq type 'revision-number) \"Sticky\") 119 ((eq type 'revision-number) \"Sticky\")
120 ((eq type 'symbolic-name) \"Sticky\"))) 120 ((eq type 'symbolic-name) \"Sticky\")))
@@ -127,11 +127,11 @@ displayed. Date and time is displayed for sticky dates.
127 (lambda (tag type) 127 (lambda (tag type)
128 (cond ((eq type 'date) (format-time-string \"%Y%m%d %H:%M\" tag)) 128 (cond ((eq type 'date) (format-time-string \"%Y%m%d %H:%M\" tag))
129 ((eq type 'revision-number) \"Sticky\") 129 ((eq type 'revision-number) \"Sticky\")
130 ((eq type 'symbolic-name) 130 ((eq type 'symbolic-name)
131 (condition-case nil 131 (condition-case nil
132 (progn 132 (progn
133 (string-match \"\\\\([^-]*\\\\)\\\\(.*\\\\)\" tag) 133 (string-match \"\\\\([^-]*\\\\)\\\\(.*\\\\)\" tag)
134 (concat (substring (match-string 1 tag) 0 1) \":\" 134 (concat (substring (match-string 1 tag) 0 1) \":\"
135 (substring (match-string 2 tag) 1 nil))) 135 (substring (match-string 2 tag) 1 nil)))
136 (error tag))))) ; Fall-back to given tag name. 136 (error tag))))) ; Fall-back to given tag name.
137 137
@@ -328,13 +328,13 @@ This is only possible if CVS is responsible for FILE's directory."
328 (concat "-m" comment) 328 (concat "-m" comment)
329 switches)) 329 switches))
330 (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) 330 (if (not (vc-cvs-valid-symbolic-tag-name-p rev))
331 (error "%s is not a valid symbolic tag name") 331 (error "%s is not a valid symbolic tag name" rev)
332 ;; If the input revison is a valid symbolic tag name, we create it 332 ;; If the input revison is a valid symbolic tag name, we create it
333 ;; as a branch, commit and switch to it. 333 ;; as a branch, commit and switch to it.
334 (apply 'vc-cvs-command nil 0 file "tag" "-b" (list rev)) 334 (apply 'vc-cvs-command nil 0 file "tag" "-b" (list rev))
335 (apply 'vc-cvs-command nil 0 file "update" "-r" (list rev)) 335 (apply 'vc-cvs-command nil 0 file "update" "-r" (list rev))
336 (setq status (apply 'vc-cvs-command nil 1 file 336 (setq status (apply 'vc-cvs-command nil 1 file
337 "ci" 337 "ci"
338 (concat "-m" comment) 338 (concat "-m" comment)
339 switches)) 339 switches))
340 (vc-file-setprop file 'vc-cvs-sticky-tag rev))) 340 (vc-file-setprop file 'vc-cvs-sticky-tag rev)))
@@ -634,12 +634,12 @@ encoded as fractional days."
634(defun vc-cvs-annotate-time () 634(defun vc-cvs-annotate-time ()
635 "Return the time of the next annotation (as fraction of days) 635 "Return the time of the next annotation (as fraction of days)
636systime, or nil if there is none." 636systime, or nil if there is none."
637 (let ((time-stamp 637 (let ((time-stamp
638 "^\\S-+\\s-+\\S-+\\s-+\\([0-9]+\\)-\\(\\sw+\\)-\\([0-9]+\\)): ")) 638 "^\\S-+\\s-+\\S-+\\s-+\\([0-9]+\\)-\\(\\sw+\\)-\\([0-9]+\\)): "))
639 (if (looking-at time-stamp) 639 (if (looking-at time-stamp)
640 (progn 640 (progn
641 (let* ((day (string-to-number (match-string 1))) 641 (let* ((day (string-to-number (match-string 1)))
642 (month (cdr (assoc (match-string 2) 642 (month (cdr (assoc (match-string 2)
643 vc-cvs-local-month-numbers))) 643 vc-cvs-local-month-numbers)))
644 (year-tmp (string-to-number (match-string 3))) 644 (year-tmp (string-to-number (match-string 3)))
645 ;; Years 0..68 are 2000..2068. 645 ;; Years 0..68 are 2000..2068.
@@ -731,7 +731,7 @@ If UPDATE is non-nil, then update (resynch) any affected buffers."
731The difference to vc-do-command is that this function always invokes `cvs', 731The difference to vc-do-command is that this function always invokes `cvs',
732and that it passes `vc-cvs-global-switches' to it before FLAGS." 732and that it passes `vc-cvs-global-switches' to it before FLAGS."
733 (apply 'vc-do-command buffer okstatus "cvs" file 733 (apply 'vc-do-command buffer okstatus "cvs" file
734 (if (stringp vc-cvs-global-switches) 734 (if (stringp vc-cvs-global-switches)
735 (cons vc-cvs-global-switches flags) 735 (cons vc-cvs-global-switches flags)
736 (append vc-cvs-global-switches 736 (append vc-cvs-global-switches
737 flags)))) 737 flags))))
@@ -782,7 +782,7 @@ essential information."
782\[\t ]+\\([0-9.]+\\)" 782\[\t ]+\\([0-9.]+\\)"
783 nil t)) 783 nil t))
784 (vc-file-setprop file 'vc-latest-version (match-string 2))) 784 (vc-file-setprop file 'vc-latest-version (match-string 2)))
785 (vc-file-setprop 785 (vc-file-setprop
786 file 'vc-state 786 file 'vc-state
787 (cond 787 (cond
788 ((string-match "Up-to-date" status) 788 ((string-match "Up-to-date" status)
@@ -815,10 +815,10 @@ essential information."
815 ;; lowercase letters, digits, `-', and `_'. 815 ;; lowercase letters, digits, `-', and `_'.
816 (and (string-match "^[a-zA-Z]" tag) 816 (and (string-match "^[a-zA-Z]" tag)
817 (not (string-match "[^a-z0-9A-Z-_]" tag)))) 817 (not (string-match "[^a-z0-9A-Z-_]" tag))))
818 818
819 819
820(defun vc-cvs-parse-sticky-tag (match-type match-tag) 820(defun vc-cvs-parse-sticky-tag (match-type match-tag)
821 "Parse and return the sticky tag as a string. 821 "Parse and return the sticky tag as a string.
822`match-data' is protected." 822`match-data' is protected."
823 (let ((data (match-data)) 823 (let ((data (match-data))
824 (tag) 824 (tag)
@@ -830,11 +830,11 @@ essential information."
830 (t nil)))) 830 (t nil))))
831 (unwind-protect 831 (unwind-protect
832 (progn 832 (progn
833 (cond 833 (cond
834 ;; Sticky Date tag. Convert to to a proper date value (`encode-time') 834 ;; Sticky Date tag. Convert to to a proper date value (`encode-time')
835 ((eq type 'date) 835 ((eq type 'date)
836 (string-match 836 (string-match
837 "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" 837 "\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)"
838 match-tag) 838 match-tag)
839 (let* ((year-tmp (string-to-number (match-string 1 match-tag))) 839 (let* ((year-tmp (string-to-number (match-string 1 match-tag)))
840 (month (string-to-number (match-string 2 match-tag))) 840 (month (string-to-number (match-string 2 match-tag)))
@@ -856,13 +856,13 @@ essential information."
856 (t nil)) 856 (t nil))
857 (cond ((eq vc-cvs-sticky-tag-display nil) nil) 857 (cond ((eq vc-cvs-sticky-tag-display nil) nil)
858 ((eq vc-cvs-sticky-tag-display t) 858 ((eq vc-cvs-sticky-tag-display t)
859 (cond ((eq type 'date) (format-time-string 859 (cond ((eq type 'date) (format-time-string
860 vc-cvs-sticky-date-format-string 860 vc-cvs-sticky-date-format-string
861 tag)) 861 tag))
862 ((eq type 'symbolic-name) tag) 862 ((eq type 'symbolic-name) tag)
863 ((eq type 'revision-number) tag) 863 ((eq type 'revision-number) tag)
864 (t nil))) 864 (t nil)))
865 ((functionp vc-cvs-sticky-tag-display) 865 ((functionp vc-cvs-sticky-tag-display)
866 (funcall vc-cvs-sticky-tag-display tag type)) 866 (funcall vc-cvs-sticky-tag-display tag type))
867 (t nil))) 867 (t nil)))
868 868
@@ -905,7 +905,7 @@ is non-nil."
905 (t 905 (t
906 (vc-file-setprop file 'vc-checkout-time 0) 906 (vc-file-setprop file 'vc-checkout-time 0)
907 (if set-state (vc-file-setprop file 'vc-state 'edited)))))))) 907 (if set-state (vc-file-setprop file 'vc-state 'edited))))))))
908 908
909(provide 'vc-cvs) 909(provide 'vc-cvs)
910 910
911;;; vc-cvs.el ends here 911;;; vc-cvs.el ends here