From 9d1f471845b0d90592b077b5d44b926786a3657d Mon Sep 17 00:00:00 2001 From: Brad King Date: Sat, 18 Oct 2008 12:07:15 -0400 Subject: [PATCH] BUG: Fix recognition of files deleted from CVS The output of "cvs update" contains a line such as one of cvs update: `foo.txt' is no longer in the repository cvs update: foo.txt is no longer in the repository cvs update: warning: foo.txt is not (any longer) pertinent when file "foo.txt" has been removed in the version to which the update occurs. Previously only the first case would be recognized. This fixes the regular expression to match all these cases. --- Source/CTest/cmCTestUpdateHandler.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index e6a60731df..efcea4c9ae 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -653,7 +653,9 @@ int cmCTestUpdateHandler::ProcessHandler() "(Updated to|At) revision ([0-9]+)\\."); cmsys::RegularExpression file_removed_line( - "cvs update: `(.*)' is no longer in the repository"); + "cvs update: `?([^']*)'? is no longer in the repository"); + cmsys::RegularExpression file_removed_line2( + "cvs update: warning: `?([^']*)'? is not \\(any longer\\) pertinent"); cmsys::RegularExpression file_update_line("([A-Z]) *(.*)"); std::string current_path = ""; bool first_file = true; @@ -702,6 +704,11 @@ int cmCTestUpdateHandler::ProcessHandler() removed_line = "D " + file_removed_line.match(1); line = removed_line.c_str(); } + else if ( file_removed_line2.find(line) ) + { + removed_line = "D " + file_removed_line2.match(1); + line = removed_line.c_str(); + } if ( file_update_line.find(line) ) { if ( file_count == 0 )