* vc-p4.el (vc-p4-annotate-command-internal): s/string-to-int/string-to-number/

[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7238]
This commit is contained in:
Magnus Henoch 2009-05-27 09:57:06 -08:00
parent d1bbfc11ce
commit 4c98e00c6b

View file

@ -712,13 +712,13 @@ Optional arg VERSION is a version to annotate from."
(if (string-match "\\(.*\\)@\\([0-9]+\\)" file-spec) (if (string-match "\\(.*\\)@\\([0-9]+\\)" file-spec)
(progn (progn
(setq file-name (match-string 1 file-spec)) (setq file-name (match-string 1 file-spec))
(setq change (string-to-int (match-string 2 file-spec))))) (setq change (string-to-number (match-string 2 file-spec)))))
;; we asked for blame constrained by a revision ;; we asked for blame constrained by a revision
(if (string-match "\\(.*\\)#\\([0-9]+\\)" file-spec) (if (string-match "\\(.*\\)#\\([0-9]+\\)" file-spec)
(progn (progn
(setq file-name (match-string 1 file-spec)) (setq file-name (match-string 1 file-spec))
(setq head-rev (string-to-int (match-string 2 file-spec))))) (setq head-rev (string-to-number (match-string 2 file-spec)))))
;; make sure the filespec is unambiguous ;; make sure the filespec is unambiguous
;;(p4-exec-p4 buffer (list "files" file-name) t) ;;(p4-exec-p4 buffer (list "files" file-name) t)
@ -750,8 +750,8 @@ Optional arg VERSION is a version to annotate from."
;; a non-branch change: ;; a non-branch change:
(if (looking-at blame-change-regex) (if (looking-at blame-change-regex)
(let ((rev (string-to-int (match-string 1))) (let ((rev (string-to-number (match-string 1)))
(ch (string-to-int (match-string 2))) (ch (string-to-number (match-string 2)))
(op (match-string 3)) (op (match-string 3))
(date (match-string 4)) (date (match-string 4))
(author (match-string 5))) (author (match-string 5)))
@ -818,11 +818,11 @@ Optional arg VERSION is a version to annotate from."
;;(set-buffer buffer) ;;(set-buffer buffer)
(goto-char (point-max)) (goto-char (point-max))
(while (re-search-backward blame-revision-regex nil t) (while (re-search-backward blame-revision-regex nil t)
(let ((la (string-to-int (match-string 1))) (let ((la (string-to-number (match-string 1)))
(lb (string-to-int (match-string 2))) (lb (string-to-number (match-string 2)))
(op (match-string 3)) (op (match-string 3))
(ra (string-to-int (match-string 4))) (ra (string-to-number (match-string 4)))
(rb (string-to-int (match-string 5)))) (rb (string-to-number (match-string 5))))
(if (= lb 0) (if (= lb 0)
(setq lb la)) (setq lb la))
(if (= rb 0) (if (= rb 0)
@ -860,7 +860,7 @@ Optional arg VERSION is a version to annotate from."
(move-to-column 0) (move-to-column 0)
(insert (format "%10s %7s %6s %4s\n" "Date" "Author" "Change" "Rev")) (insert (format "%10s %7s %6s %4s\n" "Date" "Author" "Change" "Rev"))
(while (setq line (vc-p4-read-output ch-buffer)) (while (setq line (vc-p4-read-output ch-buffer))
(setq cnum (string-to-int line)) (setq cnum (string-to-number line))
(if (and nil (= cnum old-cnum)) (if (and nil (= cnum old-cnum))
(insert (format "%29s " "")) (insert (format "%29s " ""))