(concat
"^\\(?: *[^ ]+ +\\)?\\([0-9]+\\) " ;User and revision.
"\\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\)" ;Date.
- "\\( [^:]+\\)?:")) ;Filename,
+ "\\(?: +\\([^:]+\\)\\)?:")) ;Filename.
(defun vc-hg-annotate-time ()
(when (looking-at vc-hg-annotate-re)
(when (looking-at vc-hg-annotate-re)
(if (match-beginning 3)
(cons (match-string-no-properties 1)
- (expand-file-name (substring (match-string-no-properties 3) 1)
+ (expand-file-name (match-string-no-properties 3)
(vc-hg-root default-directory)))
(match-string-no-properties 1)))))
(ert-deftest vc-hg-annotate-extract-revision-at-line-with-both ()
(with-temp-buffer
- (save-excursion (insert "philringnalda 218075 2014-11-28 CLOBBER:"))
+ (save-excursion (insert "philringnalda 218075 2014-11-28 CLOBBER:"))
(should (equal (vc-hg-annotate-extract-revision-at-line)
(cons
"218075"