* 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
(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 ()
(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