mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-02 19:00:05 +02:00
got rid of svnInfo class
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@412 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
5f74a469eb
commit
8cad188c59
@ -1,120 +0,0 @@
|
|||||||
#ifndef SVN_INFO_H
|
|
||||||
#define SVN_INFO_H
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <iostream>
|
|
||||||
#include <sstream>
|
|
||||||
#include <fstream>
|
|
||||||
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
|
|
@ -2,10 +2,10 @@
|
|||||||
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/gotthardDetectorServer"
|
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/gotthardDetectorServer"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
|
#define SVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
|
||||||
//#define SVNREV 0x374
|
//#define SVNREV 0x411
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTH "l_maliakal_d"
|
#define SVNAUTH "bergamaschi"
|
||||||
#define SVNREV 0x374
|
#define SVNREV 0x411
|
||||||
#define SVNDATE 0x20121210
|
#define SVNDATE 0x20121217
|
||||||
//
|
//
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
#define MYTHENSVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/mythenDetectorServer"
|
#define MYTHENSVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware/mythenDetectorServer"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define MYTHENSVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
|
#define MYTHENSVNREPUUID "951219d9-93cf-4727-9268-0efd64621fa3"
|
||||||
//#define SVNREV 0x380
|
//#define SVNREV 0x411
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define MYTHENSVNAUTH "bergamaschi"
|
#define MYTHENSVNAUTH "bergamaschi"
|
||||||
#define MYTHENSVNREV 0x380
|
#define MYTHENSVNREV 0x411
|
||||||
#define MYTHENSVNDATE 0x20121213
|
#define MYTHENSVNDATE 0x20121217
|
||||||
//
|
//
|
||||||
|
@ -1588,7 +1588,6 @@ int64_t slsDetector::getId( idMode mode, int imod){
|
|||||||
#endif
|
#endif
|
||||||
if (mode==THIS_SOFTWARE_VERSION) {
|
if (mode==THIS_SOFTWARE_VERSION) {
|
||||||
ret=OK;
|
ret=OK;
|
||||||
// svnInfo* s = new svnInfo(THIS_PATH);
|
|
||||||
retval=SVNREVLIB;
|
retval=SVNREVLIB;
|
||||||
retval=(retval<<32) | SVNDATELIB;
|
retval=(retval<<32) | SVNDATELIB;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
#define SVNURLLIB "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware"
|
#define SVNURLLIB "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define SVNREPUUIDLIB "951219d9-93cf-4727-9268-0efd64621fa3"
|
#define SVNREPUUIDLIB "951219d9-93cf-4727-9268-0efd64621fa3"
|
||||||
//#define SVNREV 0x410
|
//#define SVNREV 0x411
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTHLIB "l_maliakal_d"
|
#define SVNAUTHLIB "bergamaschi"
|
||||||
#define SVNREVLIB 0x410
|
#define SVNREVLIB 0x411
|
||||||
#define SVNDATELIB 0x20121217
|
#define SVNDATELIB 0x20121217
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user