Commit ba18686c authored by evan@chromium.org's avatar evan@chromium.org

emacs: also handle paths like "..\chrome/foo/bar" seen in build output

Test case amended to include example.

Review URL: http://codereview.chromium.org/6355015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72688 0039d316-1c4b-4281-b951-d872f2087c98
parent 4a6d8564
...@@ -55,3 +55,18 @@ browser - 6 error(s), 0 warning(s) ...@@ -55,3 +55,18 @@ browser - 6 error(s), 0 warning(s)
---------------------- Done ---------------------- ---------------------- Done ----------------------
Build: 244 succeeded, 1 failed, 233 up-to-date, 42 skipped Build: 244 succeeded, 1 failed, 233 up-to-date, 42 skipped
We also see weird paths with mixed slashes like this:
--------------------Configuration: inspector_protocol_sources - Debug|Win32----
--------------------Configuration: installer_util_nacl_win64 - Debug|x64-------
Compiling...
google_chrome_distribution_dummy.cc
helper.cc
installation_state.cc
self_reg_work_item.cc
..\chrome/installer/util/work_item.h(67) : error C2514: 'FilePath' : class has no constructors
..\chrome/installer/util/work_item.h(26) : see declaration of 'FilePath'
delete_tree_work_item.cc
delete_reg_key_work_item.cc
...@@ -45,7 +45,15 @@ ...@@ -45,7 +45,15 @@
; Fix Windows paths ("d:\...\src\"). ; Fix Windows paths ("d:\...\src\").
(save-excursion (save-excursion
(while (re-search-forward "\\(^.:\\\\.*\\\\src\\\\\\)\\(.*?\\)[(:]" nil t) ; This regexp is subtle and rather hard to read. :~(
; Use regexp-builder when making changes to it.
(while (re-search-forward
(concat
; First part: path leader, either of the form
; e:\...src\ or ..\
"\\(^.:\\\\.*\\\\src\\\\\\|\\.\\.\\\\\\)"
; Second part: path, followed by error message marker.
"\\(.*?\\)[(:]") nil t)
(replace-match "" nil t nil 1) (replace-match "" nil t nil 1)
; Line now looks like: ; Line now looks like:
; foo\bar\baz.cc error message here ; foo\bar\baz.cc error message here
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment