[Cmake-commits] [cmake-commits] king committed cmCTestGlobalVC.cxx 1.2 1.3 cmCTestGlobalVC.h 1.2 1.3

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Dec 18 08:13:53 EST 2009


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv11269/Source/CTest

Modified Files:
	cmCTestGlobalVC.cxx cmCTestGlobalVC.h 
Log Message:
Submit global tree revision in Update.xml

We teach CTest to report in a <Revision> element the revision of the
source tree that was tested.  This makes sense for all modern VCS tools
because they version the whole tree.  We simply omit this element for
CVS because it only versions files.  See issue #7541.


Index: cmCTestGlobalVC.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestGlobalVC.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** cmCTestGlobalVC.h	28 Sep 2009 15:42:59 -0000	1.2
--- cmCTestGlobalVC.h	18 Dec 2009 13:13:50 -0000	1.3
***************
*** 61,64 ****
--- 61,65 ----
    virtual void LoadRevisions() = 0;
  
+   virtual void WriteXMLGlobal(std::ostream& xml);
    void WriteXMLDirectory(std::ostream& xml, std::string const& path,
                           Directory const& dir);

Index: cmCTestGlobalVC.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestGlobalVC.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** cmCTestGlobalVC.cxx	28 Sep 2009 15:42:59 -0000	1.2
--- cmCTestGlobalVC.cxx	18 Dec 2009 13:13:50 -0000	1.3
***************
*** 108,111 ****
--- 108,124 ----
  
  //----------------------------------------------------------------------------
+ void cmCTestGlobalVC::WriteXMLGlobal(std::ostream& xml)
+ {
+   if(!this->NewRevision.empty())
+     {
+     xml << "\t<Revision>" << this->NewRevision << "</Revision>\n";
+     }
+   if(!this->OldRevision.empty() && this->OldRevision != this->NewRevision)
+     {
+     xml << "\t<PriorRevision>" << this->OldRevision << "</PriorRevision>\n";
+     }
+ }
+ 
+ //----------------------------------------------------------------------------
  bool cmCTestGlobalVC::WriteXMLUpdates(std::ostream& xml)
  {
***************
*** 118,121 ****
--- 131,136 ----
    this->LoadModifications();
  
+   this->WriteXMLGlobal(xml);
+ 
    for(std::map<cmStdString, Directory>::const_iterator
          di = this->Dirs.begin(); di != this->Dirs.end(); ++di)



More information about the Cmake-commits mailing list