]> git.eshelyaron.com Git - emacs.git/commitdiff
; Account for spaces before the filename
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 10 Jan 2016 01:38:34 +0000 (04:38 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 10 Jan 2016 01:38:34 +0000 (04:38 +0300)
lisp/vc/vc-hg.el
test/automated/vc-hg.el

index 85e23769db85c7e71293455c78ddd043dfe21f3f..8cb3547b13b8b9143eb98cee32ee2d39b6f2cb88 100644 (file)
@@ -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)))))
 
index 6a746ce58903e4b5ee668ea3de2b300955eea897..68282713a8ab48f11d9cb7eedf4cc803522b28ce 100644 (file)
@@ -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"