mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-01 08:17:38 +00:00
Fix vg-hg-annotate-time bug
* lisp/vc/vc-hg.el (vc-hg-annotate-time): Fix extraction of timestamp from string. * test/lisp/vc/vc-hg-tests.el (vc-hg-annotate-time): Test that the correct timestamp is found. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
1c369263db
commit
73126d62a8
@ -584,8 +584,8 @@ Optional arg REVISION is a revision to annotate from."
|
||||
(vc-annotate-convert-time
|
||||
(let ((str (match-string-no-properties 2)))
|
||||
(encode-time 0 0 0
|
||||
(string-to-number (substring str 6 8))
|
||||
(string-to-number (substring str 4 6))
|
||||
(string-to-number (substring str 8 10))
|
||||
(string-to-number (substring str 5 7))
|
||||
(string-to-number (substring str 0 4)))))))
|
||||
|
||||
(defun vc-hg-annotate-extract-revision-at-line ()
|
||||
|
@ -53,6 +53,8 @@
|
||||
(ert-deftest vc-hg-annotate-time ()
|
||||
(with-temp-buffer
|
||||
(save-excursion (insert "philringnalda 218075 2014-11-28 CLOBBER:"))
|
||||
(should (floatp (vc-hg-annotate-time)))))
|
||||
(should (equal (vc-hg-annotate-time)
|
||||
(vc-annotate-convert-time
|
||||
(encode-time 0 0 0 28 11 2014))))))
|
||||
|
||||
;;; vc-hg-tests.el ends here
|
||||
|
Loading…
Reference in New Issue
Block a user