changeset 41786:b6c062bb4be3

contrib: also linkify tracebacks in compilation output when using hg-test-mode Differential Revision: https://phab.mercurial-scm.org/D6001
author Augie Fackler <augie@google.com>
date Thu, 21 Feb 2019 20:12:39 -0500
parents b6a757de2fff
children 2a6ca0d94b70
files contrib/hg-test-mode.el
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/hg-test-mode.el	Thu Feb 21 19:59:00 2019 -0500
+++ b/contrib/hg-test-mode.el	Thu Feb 21 20:12:39 2019 -0500
@@ -54,6 +54,11 @@
   (run-hooks 'hg-test-mode-hook))
 
 (with-eval-after-load "compile"
+  ;; Link to Python sources in tracebacks in .t failures.
+  (add-to-list 'compilation-error-regexp-alist-alist
+               '(hg-test-output-python-tb
+                 "^\\+ +File ['\"]\\([^'\"]+\\)['\"], line \\([0-9]+\\)," 1 2))
+  (add-to-list 'compilation-error-regexp-alist 'hg-test-output-python-tb)
   ;; Link to source files in test-check-code.t violations.
   (add-to-list 'compilation-error-regexp-alist-alist
                '(hg-test-check-code-output