ENH: Improve output, and handle 'G' files in subversion

This commit is contained in:
Andy Cedilnik 2005-02-16 14:24:43 -05:00
parent 8ec1ab2ab0
commit 71f00352fa
1 changed files with 25 additions and 7 deletions

View File

@ -453,11 +453,7 @@ int cmCTestUpdateHandler::ProcessHandler()
} }
std::cout << " Gathering version information (each . represents one updated file):" << std::endl; std::cout << " Gathering version information (each . represents one updated file):" << std::endl;
if ( !m_Verbose ) int file_count = 0;
{
std::cout << " ";
std::cout.flush();
}
for ( cc= 0 ; cc < lines.size(); cc ++ ) for ( cc= 0 ; cc < lines.size(); cc ++ )
{ {
const char* line = lines[cc].c_str(); const char* line = lines[cc].c_str();
@ -465,13 +461,18 @@ int cmCTestUpdateHandler::ProcessHandler()
{ {
if ( !m_Verbose ) if ( !m_Verbose )
{ {
if ( file_count == 0 )
{
std::cout << " ";
std::cout.flush();
}
std::cout << "."; std::cout << ".";
} }
std::cout.flush(); std::cout.flush();
std::string upChar = file_update_line.match(1); std::string upChar = file_update_line.match(1);
std::string upFile = file_update_line.match(2); std::string upFile = file_update_line.match(2);
char mod = upChar[0]; char mod = upChar[0];
if ( mod != 'M' && mod != 'C' ) if ( mod != 'M' && mod != 'C' && mod != 'G' )
{ {
count ++; count ++;
} }
@ -676,6 +677,11 @@ int cmCTestUpdateHandler::ProcessHandler()
num_conflicting ++; num_conflicting ++;
os << "\t<Conflicting>" << std::endl; os << "\t<Conflicting>" << std::endl;
} }
else if ( mod == 'G' )
{
num_conflicting ++;
os << "\t<Conflicting>" << std::endl;
}
else if ( mod == 'M' ) else if ( mod == 'M' )
{ {
num_modified ++; num_modified ++;
@ -731,6 +737,10 @@ int cmCTestUpdateHandler::ProcessHandler()
{ {
os << "\t</Conflicting>" << std::endl; os << "\t</Conflicting>" << std::endl;
} }
else if ( mod == 'G' )
{
os << "\t</Conflicting>" << std::endl;
}
else if ( mod == 'M' ) else if ( mod == 'M' )
{ {
os << "\t</Modified>" << std::endl; os << "\t</Modified>" << std::endl;
@ -747,9 +757,13 @@ int cmCTestUpdateHandler::ProcessHandler()
current_path = path; current_path = path;
} }
file_count ++;
} }
} }
if ( file_count )
{
std::cout << std::endl; std::cout << std::endl;
}
if ( num_updated ) if ( num_updated )
{ {
std::cout << " Found " << num_updated << " updated files" << std::endl; std::cout << " Found " << num_updated << " updated files" << std::endl;
@ -764,6 +778,10 @@ int cmCTestUpdateHandler::ProcessHandler()
std::cout << " Found " << num_conflicting << " conflicting files" std::cout << " Found " << num_conflicting << " conflicting files"
<< std::endl; << std::endl;
} }
if ( num_modified == 0 && num_conflicting == 0 && num_updated == 0 )
{
std::cout << " Project is up-to-date" << std::endl;
}
if ( !first_file ) if ( !first_file )
{ {
os << "\t</Directory>" << std::endl; os << "\t</Directory>" << std::endl;