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.
This commit is contained in:
Brad King 2008-10-18 12:07:15 -04:00
parent 407a2bc737
commit 9d1f471845
1 changed files with 8 additions and 1 deletions

View File

@ -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 = "<no-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 )