ENH: Remove generation of unused Update.xml parts
This removes generation of some Update.xml content that is not used by any Dart1, Dart2, or CDash servers: - Revisions elements - Directory attribute of File elements - File elements within Author elements The content was generated only because the original Dart1 Tcl client generated it, but the content was never used.
This commit is contained in:
parent
832459c392
commit
57a1d0093e
|
@ -692,7 +692,7 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
std::string current_path = "<no-path>";
|
std::string current_path = "<no-path>";
|
||||||
bool first_file = true;
|
bool first_file = true;
|
||||||
|
|
||||||
cmCTestUpdateHandler::AuthorsToUpdatesMap authors_files_map;
|
std::set<cmStdString> author_set;
|
||||||
int numUpdated = 0;
|
int numUpdated = 0;
|
||||||
int numModified = 0;
|
int numModified = 0;
|
||||||
int numConflicting = 0;
|
int numConflicting = 0;
|
||||||
|
@ -821,10 +821,6 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
std::string semail1 = "Unknown";
|
std::string semail1 = "Unknown";
|
||||||
std::string comment1 = "";
|
std::string comment1 = "";
|
||||||
std::string srevision2 = "Unknown";
|
std::string srevision2 = "Unknown";
|
||||||
std::string sdate2 = "Unknown";
|
|
||||||
std::string sauthor2 = "Unknown";
|
|
||||||
std::string comment2 = "";
|
|
||||||
std::string semail2 = "Unknown";
|
|
||||||
if ( updateType == cmCTestUpdateHandler::e_CVS )
|
if ( updateType == cmCTestUpdateHandler::e_CVS )
|
||||||
{
|
{
|
||||||
bool have_first = false;
|
bool have_first = false;
|
||||||
|
@ -854,11 +850,6 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
sdate1 = cvs_date_author_regex.match(1);
|
sdate1 = cvs_date_author_regex.match(1);
|
||||||
sauthor1 = cvs_date_author_regex.match(2);
|
sauthor1 = cvs_date_author_regex.match(2);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
sdate2 = cvs_date_author_regex.match(1);
|
|
||||||
sauthor2 = cvs_date_author_regex.match(2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ( sline && cvs_end_of_comment_regex.find(clp) ||
|
else if ( sline && cvs_end_of_comment_regex.find(clp) ||
|
||||||
cvs_end_of_file_regex.find(clp))
|
cvs_end_of_file_regex.find(clp))
|
||||||
|
@ -880,11 +871,6 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
comment1 += clp;
|
comment1 += clp;
|
||||||
comment1 += "\n";
|
comment1 += "\n";
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
comment2 += clp;
|
|
||||||
comment2 += "\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -949,9 +935,6 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
cmOStringStream mRevStream;
|
cmOStringStream mRevStream;
|
||||||
mRevStream << minrev;
|
mRevStream << minrev;
|
||||||
srevision2 = mRevStream.str();
|
srevision2 = mRevStream.str();
|
||||||
sauthor2 = it->Author;
|
|
||||||
comment2 = it->Message;
|
|
||||||
sdate2 = it->Date;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1014,7 +997,7 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
<< path.c_str() << " / " << fname.c_str() << " was updated by "
|
<< path.c_str() << " / " << fname.c_str() << " was updated by "
|
||||||
<< sauthor1.c_str() << " to revision: " << srevision1.c_str()
|
<< sauthor1.c_str() << " to revision: " << srevision1.c_str()
|
||||||
<< " from revision: " << srevision2.c_str() << std::endl);
|
<< " from revision: " << srevision2.c_str() << std::endl);
|
||||||
os << "\t\t<File Directory=\"" << cmXMLSafe(path) << "\">"
|
os << "\t\t<File>"
|
||||||
<< cmXMLSafe(fname)
|
<< cmXMLSafe(fname)
|
||||||
<< "</File>\n"
|
<< "</File>\n"
|
||||||
<< "\t\t<Directory>" << cmXMLSafe(path)
|
<< "\t\t<Directory>" << cmXMLSafe(path)
|
||||||
|
@ -1028,36 +1011,6 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
<< "\t\t<Revision>" << srevision1 << "</Revision>\n"
|
<< "\t\t<Revision>" << srevision1 << "</Revision>\n"
|
||||||
<< "\t\t<PriorRevision>" << srevision2 << "</PriorRevision>"
|
<< "\t\t<PriorRevision>" << srevision2 << "</PriorRevision>"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
if ( srevision2 != srevision1 )
|
|
||||||
{
|
|
||||||
os
|
|
||||||
<< "\t\t<Revisions>\n"
|
|
||||||
<< "\t\t\t<Revision>" << srevision1 << "</Revision>\n"
|
|
||||||
<< "\t\t\t<PreviousRevision>" << srevision2
|
|
||||||
<< "</PreviousRevision>\n"
|
|
||||||
<< "\t\t\t<Author>" << cmXMLSafe(sauthor1)
|
|
||||||
<< "</Author>\n"
|
|
||||||
<< "\t\t\t<Date>" << cmXMLSafe(sdate1)
|
|
||||||
<< "</Date>\n"
|
|
||||||
<< "\t\t\t<Comment>" << cmXMLSafe(comment1)
|
|
||||||
<< "</Comment>\n"
|
|
||||||
<< "\t\t\t<Email>" << cmXMLSafe(semail1)
|
|
||||||
<< "</Email>\n"
|
|
||||||
<< "\t\t</Revisions>\n"
|
|
||||||
<< "\t\t<Revisions>\n"
|
|
||||||
<< "\t\t\t<Revision>" << srevision2 << "</Revision>\n"
|
|
||||||
<< "\t\t\t<PreviousRevision>" << srevision2
|
|
||||||
<< "</PreviousRevision>\n"
|
|
||||||
<< "\t\t\t<Author>" << cmXMLSafe(sauthor2)
|
|
||||||
<< "</Author>\n"
|
|
||||||
<< "\t\t\t<Date>" << cmXMLSafe(sdate2)
|
|
||||||
<< "</Date>\n"
|
|
||||||
<< "\t\t\t<Comment>" << cmXMLSafe(comment2)
|
|
||||||
<< "</Comment>\n"
|
|
||||||
<< "\t\t\t<Email>" << cmXMLSafe(semail2)
|
|
||||||
<< "</Email>\n"
|
|
||||||
<< "\t\t</Revisions>" << std::endl;
|
|
||||||
}
|
|
||||||
if ( mod == 'C' )
|
if ( mod == 'C' )
|
||||||
{
|
{
|
||||||
os << "\t</Conflicting>" << std::endl;
|
os << "\t</Conflicting>" << std::endl;
|
||||||
|
@ -1074,12 +1027,7 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
{
|
{
|
||||||
os << "\t</Updated>" << std::endl;
|
os << "\t</Updated>" << std::endl;
|
||||||
}
|
}
|
||||||
cmCTestUpdateHandler::UpdateFiles *u = &authors_files_map[sauthor1];
|
author_set.insert(sauthor1);
|
||||||
cmCTestUpdateHandler::StringPair p;
|
|
||||||
p.first = path;
|
|
||||||
p.second = fname;
|
|
||||||
u->push_back(p);
|
|
||||||
|
|
||||||
current_path = path;
|
current_path = path;
|
||||||
}
|
}
|
||||||
file_count ++;
|
file_count ++;
|
||||||
|
@ -1116,20 +1064,11 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||||
os << "\t</Directory>" << std::endl;
|
os << "\t</Directory>" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestUpdateHandler::AuthorsToUpdatesMap::iterator it;
|
// TODO: Skip the author list when submitting to CDash.
|
||||||
for ( it = authors_files_map.begin();
|
for(std::set<cmStdString>::const_iterator ai = author_set.begin();
|
||||||
it != authors_files_map.end();
|
ai != author_set.end(); ++ai)
|
||||||
it ++ )
|
|
||||||
{
|
{
|
||||||
os << "\t<Author>\n"
|
os << "\t<Author><Name>" << cmXMLSafe(*ai) << "</Name></Author>\n";
|
||||||
<< "\t\t<Name>" << it->first << "</Name>" << std::endl;
|
|
||||||
cmCTestUpdateHandler::UpdateFiles *u = &(it->second);
|
|
||||||
for ( cc = 0; cc < u->size(); cc ++ )
|
|
||||||
{
|
|
||||||
os << "\t\t<File Directory=\"" << (*u)[cc].first << "\">"
|
|
||||||
<< (*u)[cc].second << "</File>" << std::endl;
|
|
||||||
}
|
|
||||||
os << "\t</Author>" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, DEBUG, "End" << std::endl);
|
cmCTestLog(this->CTest, DEBUG, "End" << std::endl);
|
||||||
|
|
|
@ -59,8 +59,6 @@ private:
|
||||||
struct StringPair :
|
struct StringPair :
|
||||||
public std::pair<std::string, std::string>{};
|
public std::pair<std::string, std::string>{};
|
||||||
struct UpdateFiles : public std::vector<StringPair>{};
|
struct UpdateFiles : public std::vector<StringPair>{};
|
||||||
struct AuthorsToUpdatesMap :
|
|
||||||
public std::map<std::string, UpdateFiles>{};
|
|
||||||
|
|
||||||
// Determine the type of version control
|
// Determine the type of version control
|
||||||
int DetermineType(const char* cmd, const char* type);
|
int DetermineType(const char* cmd, const char* type);
|
||||||
|
|
Loading…
Reference in New Issue