From 8cad188c59f73494a65152684adc528fdeca0206 Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Mon, 17 Dec 2012 16:43:46 +0000 Subject: [PATCH] got rid of svnInfo class git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@412 951219d9-93cf-4727-9268-0efd64621fa3 --- slsDetectorSoftware/commonFiles/svnInfo.h | 120 ------------------ .../gotthardDetectorServer/svnInfoGotthard.h | 8 +- .../mythenDetectorServer/svnInfoMythen.h | 6 +- .../slsDetector/slsDetector.cpp | 1 - slsDetectorSoftware/slsDetector/svnInfoLib.h | 6 +- 5 files changed, 10 insertions(+), 131 deletions(-) delete mode 100644 slsDetectorSoftware/commonFiles/svnInfo.h diff --git a/slsDetectorSoftware/commonFiles/svnInfo.h b/slsDetectorSoftware/commonFiles/svnInfo.h deleted file mode 100644 index c98ee7312..000000000 --- a/slsDetectorSoftware/commonFiles/svnInfo.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef SVN_INFO_H -#define SVN_INFO_H - -#include -#include -#include -#include -using namespace std; - -/** - * - * @short reads svnInfo.txt and populates this class members - */ - -class svnInfo{ -public: - /** Constructor : populates the class members from svnInfo.txt*/ - svnInfo(string const path){ - revision=0; - char fName[100]; - strcpy(fName,path.c_str()); - strcat(fName,"/svnInfo.txt"); - //read from file and populate class - string sLine,sArgName; - ifstream inFile; - inFile.open(fName, ifstream::in); - if(inFile.is_open()) - { - while(inFile.good()) - { - getline(inFile,sLine); - istringstream sstr(sLine); - - if(sstr.good()){ - sstr>>sArgName; - - if(sArgName=="Path:"){ - if(sstr.good()) - sstr>>Path; - } - else if(sArgName=="URL:"){ - if(sstr.good()) - sstr>>URL; - } - else if(sArgName=="Repository"){ - - if(sstr.good()){ - sstr>>sArgName; - - if(sArgName=="Root:"){ - if(sstr.good()) - sstr>>repositoryRoot; - } - else{ - if(sstr.good()) - sstr>>repositoryUUID; - } - } - } - else if(sArgName=="Revision:"){ - if(sstr.good()){ - int rev=0; - sstr>>sArgName; - sscanf(sArgName.c_str(),"%x",&rev); - revision = ((int64_t)rev); - } - } - else if(sArgName=="NodeKind:"){ - if(sstr.good()) - sstr>>nodeKind; - } - else if(sArgName=="Schedule:"){ - if(sstr.good()) - sstr>>schedule; - } - else if(sArgName=="Last"){ - if(sstr.good()){ - if(sstr.good()){ - sstr>>sArgName; - - if(sArgName=="Author:"){ - if(sstr.good()) - sstr>>lastChangedAuthor; - } - else if(sArgName=="Rev:"){ - if(sstr.good()) - sstr>>lastChangedRev; - } - else if(sArgName=="Date:"){ - if(sstr.good()) - sstr>>lastChangedDate; - } - } - } - } - } - } - inFile.close(); - }else - cout << "ERROR: Could not open svn Info file: svnInfo.txt" << endl; - }; - - /** Returns revision */ - int64_t getRevision(){return revision;}; - -private: - string Path; - string URL; - string repositoryRoot; - string repositoryUUID; - int64_t revision; - string nodeKind; - string schedule; - string lastChangedAuthor; - string lastChangedRev; - string lastChangedDate; -}; - - -#endif diff --git a/slsDetectorSoftware/gotthardDetectorServer/svnInfoGotthard.h b/slsDetectorSoftware/gotthardDetectorServer/svnInfoGotthard.h index 8e7492a6b..763666328 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/svnInfoGotthard.h +++ b/slsDetectorSoftware/gotthardDetectorServer/svnInfoGotthard.h @@ -2,10 +2,10 @@ #define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/gotthardDetectorServer" //#define SVNREPPATH "" #define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3" -//#define SVNREV 0x374 +//#define SVNREV 0x411 //#define SVNKIND "" //#define SVNSCHED "" -#define SVNAUTH "l_maliakal_d" -#define SVNREV 0x374 -#define SVNDATE 0x20121210 +#define SVNAUTH "bergamaschi" +#define SVNREV 0x411 +#define SVNDATE 0x20121217 // diff --git a/slsDetectorSoftware/mythenDetectorServer/svnInfoMythen.h b/slsDetectorSoftware/mythenDetectorServer/svnInfoMythen.h index 20202fe66..3403bda5c 100644 --- a/slsDetectorSoftware/mythenDetectorServer/svnInfoMythen.h +++ b/slsDetectorSoftware/mythenDetectorServer/svnInfoMythen.h @@ -2,10 +2,10 @@ #define MYTHENSVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/mythenDetectorServer" //#define SVNREPPATH "" #define MYTHENSVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3" -//#define SVNREV 0x380 +//#define SVNREV 0x411 //#define SVNKIND "" //#define SVNSCHED "" #define MYTHENSVNAUTH "bergamaschi" -#define MYTHENSVNREV 0x380 -#define MYTHENSVNDATE 0x20121213 +#define MYTHENSVNREV 0x411 +#define MYTHENSVNDATE 0x20121217 // diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index b78236bc4..9496f8be2 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -1588,7 +1588,6 @@ int64_t slsDetector::getId( idMode mode, int imod){ #endif if (mode==THIS_SOFTWARE_VERSION) { ret=OK; - // svnInfo* s = new svnInfo(THIS_PATH); retval=SVNREVLIB; retval=(retval<<32) | SVNDATELIB; } else { diff --git a/slsDetectorSoftware/slsDetector/svnInfoLib.h b/slsDetectorSoftware/slsDetector/svnInfoLib.h index acdb1ed38..50dbb13c0 100644 --- a/slsDetectorSoftware/slsDetector/svnInfoLib.h +++ b/slsDetectorSoftware/slsDetector/svnInfoLib.h @@ -2,10 +2,10 @@ #define SVNURLLIB "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware" //#define SVNREPPATH "" #define SVNREPUUIDLIB "951219d9-93cf-4727-9268-0efd64621fa3" -//#define SVNREV 0x410 +//#define SVNREV 0x411 //#define SVNKIND "" //#define SVNSCHED "" -#define SVNAUTHLIB "l_maliakal_d" -#define SVNREVLIB 0x410 +#define SVNAUTHLIB "bergamaschi" +#define SVNREVLIB 0x411 #define SVNDATELIB 0x20121217 //