; Account for spaces before the filename
This commit is contained in:
parent
c71e1e86df
commit
cca0f93359
2 changed files with 3 additions and 3 deletions
|
@ -397,7 +397,7 @@ Optional arg REVISION is a revision to annotate from."
|
|||
(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)
|
||||
|
@ -415,7 +415,7 @@ Optional arg REVISION is a revision to annotate from."
|
|||
(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)))))
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
(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"
|
||||
|
|
Loading…
Add table
Reference in a new issue