[Cmake-commits] [cmake-commits] king committed cmCTestBZR.cxx 1.3 1.4

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Feb 9 13:31:15 EST 2010


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

Modified Files:
	cmCTestBZR.cxx 
Log Message:
cmCTestBZR: Strip trailing slashes from paths

Our internal path processing methods assume no trailing slashes, but bzr
adds trailing slashes to updated directories.  This can lead to empty
entries in Update.xml files.  We address the problem by stripping the
slashes as soon as they are parsed.


Index: cmCTestBZR.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestBZR.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** cmCTestBZR.cxx	28 Sep 2009 15:42:57 -0000	1.3
--- cmCTestBZR.cxx	9 Feb 2010 18:31:12 -0000	1.4
***************
*** 277,280 ****
--- 277,281 ----
        {
        this->CurChange.Path.assign(&this->CData[0], this->CData.size());
+       cmSystemTools::ConvertToUnixSlashes(this->CurChange.Path);
        this->Changes.push_back(this->CurChange);
        }
***************
*** 283,286 ****
--- 284,288 ----
        // symlinks have an arobase at the end in the log
        this->CurChange.Path.assign(&this->CData[0], this->CData.size()-1);
+       cmSystemTools::ConvertToUnixSlashes(this->CurChange.Path);
        this->Changes.push_back(this->CurChange);
        }
***************
*** 378,384 ****
      }
  
!   void DoPath(char c0, char c1, char c2, std::string const& path)
      {
      if(path.empty()) return;
  
      const std::string dir = cmSystemTools::GetFilenamePath(path);
--- 380,387 ----
      }
  
!   void DoPath(char c0, char c1, char c2, std::string path)
      {
      if(path.empty()) return;
+     cmSystemTools::ConvertToUnixSlashes(path);
  
      const std::string dir = cmSystemTools::GetFilenamePath(path);
***************
*** 489,495 ****
      }
  
!   void DoPath(char c0, char c1, char c2, std::string const& path)
      {
      if(path.empty()) return;
  
      if ( c0=='C' )
--- 492,499 ----
      }
  
!   void DoPath(char c0, char c1, char c2, std::string path)
      {
      if(path.empty()) return;
+     cmSystemTools::ConvertToUnixSlashes(path);
  
      if ( c0=='C' )



More information about the Cmake-commits mailing list