[Cmake-commits] [cmake-commits] king committed cmCTestUpdateHandler.cxx 1.53 1.54 cmCTestUpdateHandler.h 1.8 1.9
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Feb 17 11:37:20 EST 2009
Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv9528/Source/CTest
Modified Files:
cmCTestUpdateHandler.cxx cmCTestUpdateHandler.h
Log Message:
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.
Index: cmCTestUpdateHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestUpdateHandler.cxx,v
retrieving revision 1.53
retrieving revision 1.54
diff -C 2 -d -r1.53 -r1.54
*** cmCTestUpdateHandler.cxx 16 Feb 2009 15:01:43 -0000 1.53
--- cmCTestUpdateHandler.cxx 17 Feb 2009 16:37:18 -0000 1.54
***************
*** 693,697 ****
bool first_file = true;
! cmCTestUpdateHandler::AuthorsToUpdatesMap authors_files_map;
int numUpdated = 0;
int numModified = 0;
--- 693,697 ----
bool first_file = true;
! std::set<cmStdString> author_set;
int numUpdated = 0;
int numModified = 0;
***************
*** 822,829 ****
std::string comment1 = "";
std::string srevision2 = "Unknown";
- std::string sdate2 = "Unknown";
- std::string sauthor2 = "Unknown";
- std::string comment2 = "";
- std::string semail2 = "Unknown";
if ( updateType == cmCTestUpdateHandler::e_CVS )
{
--- 822,825 ----
***************
*** 855,863 ****
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) ||
--- 851,854 ----
***************
*** 881,889 ****
comment1 += "\n";
}
- else
- {
- comment2 += clp;
- comment2 += "\n";
- }
}
}
--- 872,875 ----
***************
*** 950,956 ****
mRevStream << minrev;
srevision2 = mRevStream.str();
- sauthor2 = it->Author;
- comment2 = it->Message;
- sdate2 = it->Date;
}
}
--- 936,939 ----
***************
*** 1015,1019 ****
<< sauthor1.c_str() << " to revision: " << srevision1.c_str()
<< " from revision: " << srevision2.c_str() << std::endl);
! os << "\t\t<File Directory=\"" << cmXMLSafe(path) << "\">"
<< cmXMLSafe(fname)
<< "</File>\n"
--- 998,1002 ----
<< sauthor1.c_str() << " to revision: " << srevision1.c_str()
<< " from revision: " << srevision2.c_str() << std::endl);
! os << "\t\t<File>"
<< cmXMLSafe(fname)
<< "</File>\n"
***************
*** 1029,1062 ****
<< "\t\t<PriorRevision>" << srevision2 << "</PriorRevision>"
<< 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' )
{
--- 1012,1015 ----
***************
*** 1075,1084 ****
os << "\t</Updated>" << std::endl;
}
! cmCTestUpdateHandler::UpdateFiles *u = &authors_files_map[sauthor1];
! cmCTestUpdateHandler::StringPair p;
! p.first = path;
! p.second = fname;
! u->push_back(p);
!
current_path = path;
}
--- 1028,1032 ----
os << "\t</Updated>" << std::endl;
}
! author_set.insert(sauthor1);
current_path = path;
}
***************
*** 1117,1134 ****
}
! cmCTestUpdateHandler::AuthorsToUpdatesMap::iterator it;
! for ( it = authors_files_map.begin();
! it != authors_files_map.end();
! it ++ )
{
! os << "\t<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;
}
--- 1065,1073 ----
}
! // TODO: Skip the author list when submitting to CDash.
! for(std::set<cmStdString>::const_iterator ai = author_set.begin();
! ai != author_set.end(); ++ai)
{
! os << "\t<Author><Name>" << cmXMLSafe(*ai) << "</Name></Author>\n";
}
Index: cmCTestUpdateHandler.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestUpdateHandler.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmCTestUpdateHandler.h 10 Mar 2006 20:03:09 -0000 1.8
--- cmCTestUpdateHandler.h 17 Feb 2009 16:37:18 -0000 1.9
***************
*** 60,65 ****
public std::pair<std::string, std::string>{};
struct UpdateFiles : public std::vector<StringPair>{};
- struct AuthorsToUpdatesMap :
- public std::map<std::string, UpdateFiles>{};
// Determine the type of version control
--- 60,63 ----
More information about the Cmake-commits
mailing list