[GME-commit] GMESRC/GME/XmlBackEnd CoreXmlFile.cpp,1.2,1.3 CoreXmlFile.h,1.2,1.3

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Thu Oct 21 16:51:42 CDT 2004


Update of /var/lib/gme/GMESRC/GME/XmlBackEnd
In directory braindrain:/tmp/cvs-serv22978

Modified Files:
	CoreXmlFile.cpp CoreXmlFile.h 
Log Message:
no message

CVS User: bogyom

Index: CoreXmlFile.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/XmlBackEnd/CoreXmlFile.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CoreXmlFile.cpp	13 Oct 2004 15:17:55 -0000	1.2
--- CoreXmlFile.cpp	21 Oct 2004 20:51:40 -0000	1.3
***************
*** 6,11 ****
--- 6,33 ----
  #include "CommonCollection.h"
  #include "VSSLoginDlg.h"
+ #include "FilesInUseDlg.h"
+ #include "FilesInUseDetailsDlg.h"
  
  using namespace XERCES_CPP_NAMESPACE;
+ using std::string;
+ 
+ void encodeXMLString( string& in, string& out )
+ {
+     int size = in.length();
+     out = "";
+ 
+     for( int i=0; i<size; ++i )
+     {
+         switch( in[i] )
+         {
+             case '<' : out += "&lt;"; break;
+             case '>' : out += "&gt;"; break;
+             case '&' : out += "&amp;"; break;
+             case '\'': out += "&apos;"; break;
+             case '\"': out += "&quot;"; break;
+             default  : out += in[i];
+         }
+     }
+ }
  
  
***************
*** 395,398 ****
--- 417,421 ----
  }
  
+ 
  void XmlObject::createAttributes(ICoreMetaObject *metaobject, int attrSet )
  {
***************
*** 451,454 ****
--- 474,478 ----
      m_openedObject          = NULL;
      m_sourceControl         = SC_NONE;
+     m_savedOnce             = false;
  
      fillParentMap();
***************
*** 663,666 ****
--- 687,695 ----
  		COMRETURN(E_INVALID_USAGE);
  
+     // root's guid chenges evry time the project is modified we should igonre it
+     // it casues some meta interpreter problems!
+     if( m_metaAttributeId == ATTRID_GUID )
+         return S_OK;
+ 
      // TODO: return with specific error code
      //if( m_openedObject->m_readOnly )
***************
*** 684,688 ****
              }
              
- 
              XmlAttrPointer * pointerAttr = (XmlAttrPointer*)it->second;
              if( m_undoMap.find(it->second) == m_undoMap.end() )
--- 713,716 ----
***************
*** 835,840 ****
      }
  
!     m_opened   = true;
!     m_modified = false;
      
      if(ro_mode!=NULL) 
--- 863,869 ----
      }
  
!     m_opened    = true;
!     m_modified  = false;
!     m_savedOnce = true;
      
      if(ro_mode!=NULL) 
***************
*** 851,859 ****
      parseConnectionString( connection );
      setFileNames();
!     
!     // create project folder
!     if( CreateDirectory(m_folderPath.c_str(),NULL) == 0 )
!         COMRETURN(E_FILEOPEN);
!     
      // clear data structures
      clearAll();
--- 880,884 ----
      parseConnectionString( connection );
      setFileNames();
!             
      // clear data structures
      clearAll();
***************
*** 888,892 ****
              createSourceSafeDatabase();
      }
! 
      createProjectFile();
      
--- 913,917 ----
              createSourceSafeDatabase();
      }
!     
      createProjectFile();
      
***************
*** 903,909 ****
  
      if( m_sourceControl != SC_NONE )
!         checkInAll( true );
  
      m_modified = false;
  
      return S_OK;
--- 928,941 ----
  
      if( m_sourceControl != SC_NONE )
!     {
!         if( !m_savedOnce )
!             checkInAll(true);
!         else
!             checkInAll();
! 
!     }
  
      m_modified = false;
+     m_savedOnce = true;
  
      return S_OK;
***************
*** 917,925 ****
  	COMTRY
  	{
! 		if( abort == VARIANT_FALSE && m_modified ) 
  			SaveProject(NULL);
  
          if( m_sourceControl != SC_NONE )
!             checkInAll();
  
          clearAll();
--- 949,957 ----
  	COMTRY
  	{
! 		/*if( abort == VARIANT_FALSE && m_modified ) 
  			SaveProject(NULL);
  
          if( m_sourceControl != SC_NONE )
!             checkInAll();*/
  
          clearAll();
***************
*** 1102,1106 ****
      // example: 
      //   MGX="C:\temp\test1" vssdatabase="frfre" vsspath="dede" user="fdasfdsfds" password="defrefre"
- 
      std::string conn;
      CopyTo(connection, conn);
--- 1134,1137 ----
***************
*** 1259,1262 ****
--- 1290,1327 ----
  }
  
+ void CCoreXmlFile::getContainerName(XmlObject * obj, string& name, string& type)
+ {
+     CComObjPtr<ICoreMetaObject>     metaobject;
+     CComBSTR                        metaToken;
+ 
+     COMTHROW( m_metaProject->get_Object( obj->m_metaid, PutOut(metaobject) ) );
+     COMTHROW( metaobject->get_Token( &metaToken ) );
+ 
+     CopyTo(metaToken, type);
+ 
+     name = "";
+     AttribMapIter it;
+     for( it=obj->m_attributes.begin(); it!=obj->m_attributes.end(); ++it )
+     {
+         XmlAttrBase                    * attr = it->second;
+         CComObjPtr<ICoreMetaAttribute>   metaAttrib;
+         CComBSTR                         attribToken;
+         string                           attribToken2;
+         string                           attrVal;
+ 
+         COMTHROW( metaobject->get_Attribute( it->first, PutOut(metaAttrib) ) );
+         metaAttrib->get_Token( &attribToken );
+ 
+         CopyTo(attribToken, attribToken2);
+ 
+         if( stricmp( attribToken2.c_str(), "name" ) == 0 && attr->getType() == VALTYPE_STRING )
+         {
+             XmlAttrBase * attr = it->second;
+             attr->toString(name);
+             break;
+         }
+     }
+ }
+ 
  void CCoreXmlFile::clearAll()
  {
***************
*** 1519,1522 ****
--- 1584,1588 ----
  
      XmlObjSetIter it;
+     XmlObjSet     containersUsedByOthers;
      
      // count the files need to be checked out
***************
*** 1528,1539 ****
          ASSERT( obj != NULL );
  
!         if( isContainerReadOnly(obj) )
          {
!             readOnlyFiles.insert( obj );            
              if( m_sourceControl != SC_NONE )
              {
                  // check if checked out by other users
                  if( isContinerCheckedOut( obj ) )
                      checkdOutByOthers = true;
              }
          }
--- 1594,1629 ----
          ASSERT( obj != NULL );
  
!         if( m_sourceControl == SC_CLEARCASE )
          {
!             string fileName;
!             getContainerFileName( obj, fileName, true );
! 
!             FILE * f = fopen( fileName.c_str(), "r" );
!             if( f!=NULL )
!             {
!                 fclose(f);
!                 int checkoutState = getCheckOutState( fileName.c_str() );
! 
!                 if( checkoutState == CS_OTHER_USER )
!                 {
!                     checkdOutByOthers = true;
!                     readOnlyFiles.insert( obj );
!                     containersUsedByOthers.insert( obj );
!                 }
!                 else if( checkoutState == SC_NONE )
!                     readOnlyFiles.insert( obj );
!             }
!         }
!         else if( isContainerReadOnly(obj) )
!         {
!             readOnlyFiles.insert( obj );
              if( m_sourceControl != SC_NONE )
              {
                  // check if checked out by other users
                  if( isContinerCheckedOut( obj ) )
+                 {
+                     containersUsedByOthers.insert( obj );
                      checkdOutByOthers = true;
+                 }
              }
          }
***************
*** 1543,1547 ****
          return true;
  
!     // if there is no source control nothing we can be, notify the user and roll back transaction
      if( m_sourceControl == SC_NONE )
      {
--- 1633,1637 ----
          return true;
  
!     // if there is no source control nothing we can do, notify the user and roll back transaction
      if( m_sourceControl == SC_NONE )
      {
***************
*** 1553,1557 ****
      if( checkdOutByOthers )
      {
!         AfxMessageBox( "Cannot perform this operation because some necessery files are checked out by other users." );
          return false;
      }
--- 1643,1649 ----
      if( checkdOutByOthers )
      {
!         CFilesInUseDlg dlg;
!         if( dlg.DoModal() == IDOK )
!             showUsedFiles( containersUsedByOthers );
          return false;
      }
***************
*** 1749,1757 ****
  
  void CCoreXmlFile::createProjectFile()
! {
      FILE * f = fopen( m_projectFileName.c_str(), "wt" );
      if( f == NULL )
          HR_THROW(E_FILEOPEN);
- 
      fprintf( f, "<GME " );
      if( m_vssDatabaseStr.size() > 0 )
--- 1841,1871 ----
  
  void CCoreXmlFile::createProjectFile()
! {    
!     // in case of clearcase directory must be created with clearcase (no addelement, grrrr!)
!     if( m_sourceControl == SC_CLEARCASE )
!     {
!         try
!         {
!             // create and add project folder to source control
!             checkOutFileCC( m_parentFolderPath.c_str() );   // maybe this not needed if we keep it checked out
!             addDirToCC( m_folderPath.c_str() );
!         }
!         catch(...)
!         {
!             AfxMessageBox("ClearCase error! Cannot add project to ClearCase. Errocode=1");
!             m_sourceControl = SC_NONE;
!         }
!     }
!     else
!     {
!         // create project folder
!         if( CreateDirectory(m_folderPath.c_str(),NULL) == 0 )
!             HR_THROW(E_FILEOPEN);
!     }
! 
!     // create projet file
      FILE * f = fopen( m_projectFileName.c_str(), "wt" );
      if( f == NULL )
          HR_THROW(E_FILEOPEN);
      fprintf( f, "<GME " );
      if( m_vssDatabaseStr.size() > 0 )
***************
*** 1759,1763 ****
      fprintf( f, ">\n" );
      fprintf( f, "</GME>\n" );
- 
      fclose( f );
  
--- 1873,1876 ----
***************
*** 1780,1794 ****
          try
          {
!             // add project folder first
!             checkOutFileCC( m_parentFolderPath.c_str() );
!             addDirToCC( m_folderPath.c_str() );
              addFileToCC( m_projectFileName.c_str() );
!             checkInFileCC( m_projectFileName.c_str() );
!             checkInFileCC( m_folderPath.c_str() );
!             checkInFileCC( m_parentFolderPath.c_str() );
          }
          catch(...)
          {
!             AfxMessageBox("Bazmeg van");
              m_sourceControl = SC_NONE;
          }
--- 1893,1905 ----
          try
          {
!             // add project file
              addFileToCC( m_projectFileName.c_str() );
!             //checkInFileCC( m_projectFileName.c_str() );
!             //checkInFileCC( m_folderPath.c_str() );
!             //checkInFileCC( m_parentFolderPath.c_str() );
          }
          catch(...)
          {
!             AfxMessageBox("ClearCase error! Cannot add project to ClearCase. Errocode=2");
              m_sourceControl = SC_NONE;
          }
***************
*** 1819,1822 ****
--- 1930,1934 ----
          m_vssDatabaseStr = vssDatabase;
          char * vssPath   = XMLString::transcode(e->getAttribute(XMLString::transcode("VSSPath")));
+ 
          m_vssPath = vssPath;
          delete vssPath;
***************
*** 1935,1939 ****
              replaceSpaceWithUnderscore(attribToken2);
  
!             fprintf(file, " %s=\"%s\"", attribToken2.c_str(), attrVal.c_str() );            
          }
      }
--- 2047,2054 ----
              replaceSpaceWithUnderscore(attribToken2);
  
!             string encodedAttrVal;
!             encodeXMLString( attrVal, encodedAttrVal );
! 
!             fprintf(file, " %s=\"%s\"", attribToken2.c_str(), encodedAttrVal.c_str() );
          }
      }
***************
*** 2287,2290 ****
--- 2402,2412 ----
          {
              m_sourceControl = SC_SOURCESAFE;
+ 
+             CComObjPtr<IVSSItem> item;
+             CComBSTR path2 = m_vssPath.c_str();
+             COMTHROW( m_vssDatabase->get_VSSItem( path2, false, &(item.p)) );
+ 
+             CComBSTR localSpec = m_folderPath.c_str();
+             COMTHROW( item->put_LocalSpec(localSpec) );
          }
          else
***************
*** 2350,2369 ****
          COMTHROW( item->get_IsCheckedOut(&checkOutState) );
  
-         /*CComObjPtr<IVSSCheckouts> checkouts;
-         COMTHROW( item->get_Checkouts( &(checkouts.p) ));
-         long checkoutNum;
-         COMTHROW( checkouts->get_Count( &checkoutNum ) );
-         if( checkoutNum > 0 )
-         {
-             CComObjPtr<IVSSCheckout> checkout;
-             VARIANT index;
-             index.vt = VT_INT;
-             index.intVal = 1;
-             COMTHROW( checkouts->get_Item(index, &(checkout.p)));
- 
-             CComBSTR userName;
-             COMTHROW( checkout->get_Username( &userName ));
-         }*/
- 
          return checkOutState == VSSFILE_CHECKEDOUT;
      }
--- 2472,2475 ----
***************
*** 2425,2434 ****
      else if( m_sourceControl == SC_CLEARCASE )
      {
!         // todo: make sure parent folder is checked out
! 
! 
! 
! 
! 
          addFileToCC( fileName.c_str() );
      }
--- 2531,2535 ----
      else if( m_sourceControl == SC_CLEARCASE )
      {
!         // parent folder must be checked out
          addFileToCC( fileName.c_str() );
      }
***************
*** 2446,2450 ****
      else if( m_sourceControl == SC_CLEARCASE )
      {
!         getLatestVerCC( m_folderPath.c_str() );
      }
  }
--- 2547,2552 ----
      else if( m_sourceControl == SC_CLEARCASE )
      {
!         // if we use dynamic views we do not need it
!         //getLatestVerCC( m_folderPath.c_str() );
      }
  }
***************
*** 2464,2467 ****
--- 2566,2570 ----
      if( m_sourceControl == SC_SOURCESAFE )
      {
+         // source safe
          CComObjPtr<IVSSItem> projectItem;
          CComBSTR path = m_vssPath.c_str();
***************
*** 2474,2486 ****
      else if( m_sourceControl == SC_CLEARCASE )
      {
!         // TODO clearcase
!         // itt nem eleg a parentet becsekkelni, vegig kell menni az osszes jatekoson
!         // hogy talalom meg oket??????
  
!         // 1. CreateCheckedOutFileQuery-val ossze lehet szedni a kicsekkelt fileokat es becsekkelni oket
  
!         // 2.
  
  
      }
  }
--- 2577,2632 ----
      else if( m_sourceControl == SC_CLEARCASE )
      {
!         // clear case
  
!         // get windows (and clearcase) username
!         char userName[200];
!         unsigned long userNameSize = 200;
!         GetUserName( userName, &userNameSize );
  
!         // get list of checked out files
!         CComObjPtr<ICCCheckedOutFileQuery> checkedOutFileQuery;
  
+         COMTHROW( m_clearCase->CreateCheckedOutFileQuery( PutOut(checkedOutFileQuery) ));
  
+         VARIANT v;
+         v.vt = VT_ARRAY | VT_BSTR;
+         SAFEARRAYBOUND rgsabound[1];  //Denotes number of dimensions
+         rgsabound[0].lLbound   = 0;
+         rgsabound[0].cElements = 1;
+         v.parray = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
+         long count = 0;
+ 
+         CComVariant name = m_folderPath.c_str();
+         COMTHROW( SafeArrayPutElement(v.parray, &count, (void *) &name) );
+         
+         // get list of checked out files
+         CComBSTR user = userName;                
+         COMTHROW( checkedOutFileQuery->put_PathArray( v ) );
+         COMTHROW( checkedOutFileQuery->put_User(user) );
+         CComObjPtr<ICCCheckedOutFiles> files;
+         COMTHROW( checkedOutFileQuery->Apply( PutOut(files) ));
+ 
+         // checkin files
+         long fileCount;
+         COMTHROW( files->get_Count( &fileCount ) );
+         for( int i=0; i<fileCount; ++i )
+         {
+             CComObjPtr<ICCVersion>    version;
+             CComBSTR                  comment = "";
+ 
+             CComObjPtr<ICCCheckedOutFile> checkedOutFile;
+             COMTHROW( files->get_Item( i+1, PutOut(checkedOutFile) ) );
+             checkedOutFile->CheckIn( comment, 1, comment, ccKeep, PutOut(version) );
+             
+             // check out if keepcheck out is true
+             if( keepCheckedOut )
+             {            
+                 CComBSTR path;
+                 checkedOutFile->get_Path(&path);
+                 char buf[MAX_PATH];
+                 sprintf(buf, "%S", path);
+                 checkOutFileCC(buf);
+             }
+         }
      }
  }
***************
*** 2526,2530 ****
      CComBSTR                      path1 = path;
      VARIANT                       path2;
!     HRESULT                       hres;
      VARIANT_BOOL                  isCheckdOut = 0;
  
--- 2672,2676 ----
      CComBSTR                      path1 = path;
      VARIANT                       path2;
!     //HRESULT                       hres;
      VARIANT_BOOL                  isCheckdOut = 0;
  
***************
*** 2535,2539 ****
      COMTHROW( version->get_IsCheckedOut( &isCheckdOut ) );
  
!     return (isCheckdOut>0);
  }
  
--- 2681,2741 ----
      COMTHROW( version->get_IsCheckedOut( &isCheckdOut ) );
  
!     return (isCheckdOut!=0);
! }
! 
! int CCoreXmlFile::getCheckOutState( const char * path )
! {
!     // get windows (and clearcase) username
!     char userName[200];
!     unsigned long userNameSize = 200;
!     GetUserName( userName, &userNameSize );
! 
!     // get list of checked out files by current user
!     CComObjPtr<ICCCheckedOutFileQuery> checkedOutFileQuery;
! 
!     COMTHROW( m_clearCase->CreateCheckedOutFileQuery( PutOut(checkedOutFileQuery) ));
! 
!     VARIANT v;
!     v.vt = VT_ARRAY | VT_BSTR;
!     SAFEARRAYBOUND rgsabound[1];  //Denotes number of dimensions
!     rgsabound[0].lLbound   = 0;
!     rgsabound[0].cElements = 1;
!     v.parray = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
!     long count = 0;
! 
!     CComVariant name = m_folderPath.c_str();
!     COMTHROW( SafeArrayPutElement(v.parray, &count, (void *) &name) );
!     
!     CComBSTR user = userName;
!     COMTHROW( checkedOutFileQuery->put_PathArray( v ) );
!     COMTHROW( checkedOutFileQuery->put_User(user) );
!     CComObjPtr<ICCCheckedOutFiles> files;
!     COMTHROW( checkedOutFileQuery->Apply( PutOut(files) ));
! 
!     long fileCount;
!     COMTHROW( files->get_Count( &fileCount ) );
!     for( int i=0; i<fileCount; ++i )
!     {
!         CComObjPtr<ICCVersion>    version;
!         CComBSTR                  comment = "";
! 
!         CComObjPtr<ICCCheckedOutFile> checkedOutFile;
!         COMTHROW( files->get_Item( i+1, PutOut(checkedOutFile) ) );
! 
!         CComBSTR path2;
!         checkedOutFile->get_Path(&path2);
!         char path3[MAX_PATH];
!         sprintf(path3, "%S", path2);
! 
!         if( stricmp(path, path3) == 0 )
!         {
!             return CS_CURRENT_USER;
!         }
!     }
! 
!     if( isFileCheckedOutCC( path ) )
!         return CS_OTHER_USER;
! 
!     return CS_NOT_CHECKEDOUT;
  }
  
***************
*** 2545,2549 ****
      CComBSTR                      comment = "";
      VARIANT                       path2;
!     HRESULT                       hres;
  
      path2.vt      = VT_BSTR;
--- 2747,2751 ----
      CComBSTR                      comment = "";
      VARIANT                       path2;
!     //HRESULT                       hres;
  
      path2.vt      = VT_BSTR;
***************
*** 2551,2555 ****
     
      COMTHROW( m_clearCase->get_Version( path2, PutOut(version) ) );
!     COMTHROW( version->CheckOut( ccTryReserved, comment, 0, ccVersion_Default, 0, 0, PutOut(checkedOutFile) ) );
      //COMTHROW( version->CheckOut( ccReserved, comment, 0, ccVersion_Default, 0, 0, PutOut(checkedOutFile) ) );
  }
--- 2753,2757 ----
     
      COMTHROW( m_clearCase->get_Version( path2, PutOut(version) ) );
!     version->CheckOut( ccTryReserved, comment, 0, ccVersion_Default, 0, 0, PutOut(checkedOutFile) );
      //COMTHROW( version->CheckOut( ccReserved, comment, 0, ccVersion_Default, 0, 0, PutOut(checkedOutFile) ) );
  }
***************
*** 2585,2589 ****
      elmentTypeName.bstrVal = elementTypeName1;
  
!     COMTHROW( m_clearCase->CreateElement(fileName,comment,1,elmentTypeName,PutOut(checkedOutFile)) ); 
  }
  
--- 2787,2791 ----
      elmentTypeName.bstrVal = elementTypeName1;
  
!     m_clearCase->CreateElement(fileName,comment,1,elmentTypeName,PutOut(checkedOutFile)); 
  }
  
***************
*** 2601,2605 ****
      elmentTypeName.bstrVal = elementTypeName1;
  
!     COMTHROW( m_clearCase->CreateElement(fileName,comment,1,elmentTypeName,PutOut(checkedOutFile)) ); 
  }
  
--- 2803,2807 ----
      elmentTypeName.bstrVal = elementTypeName1;
  
!     m_clearCase->CreateElement(fileName, comment,1,elmentTypeName,PutOut(checkedOutFile));
  }
  
***************
*** 2608,2618 ****
      std::string cmd = "update ";
      cmd += path;
- 
      CComBSTR cmd2 = cmd.c_str();
      BSTR output;
- 
      COMTHROW( m_clearTool->CmdExec( cmd2, &output ) );
  }
  
  
  // egyeb:
--- 2810,2870 ----
      std::string cmd = "update ";
      cmd += path;
      CComBSTR cmd2 = cmd.c_str();
      BSTR output;
      COMTHROW( m_clearTool->CmdExec( cmd2, &output ) );
  }
  
+ void CCoreXmlFile::showUsedFiles( XmlObjSet& containers )
+ {
+     if( m_sourceControl == SC_SOURCESAFE )
+     {
+         CFilesInUseDetailsDlg dlg;
+ 
+         char buf[300];
+ 
+         XmlObjSet::iterator it;
+ 
+         for( it=containers.begin(); it!=containers.end(); ++it )
+         {
+             string fullPath;
+             getSourceSafePath( *it, fullPath );
+             CComBSTR fullPath2 = fullPath.c_str();
+ 
+             CComObjPtr<IVSSItem> item;
+             COMTHROW( m_vssDatabase->get_VSSItem( fullPath2, false, &(item.p)) );
+             CComObjPtr<IVSSCheckouts> checkouts;
+             COMTHROW( item->get_Checkouts( &(checkouts.p) ));
+             long checkoutNum;
+             COMTHROW( checkouts->get_Count( &checkoutNum ) );
+             if( checkoutNum > 0 )
+             {
+                 CComObjPtr<IVSSCheckout> checkout;
+                 VARIANT index;
+                 index.vt = VT_INT;
+                 index.intVal = 1;
+                 COMTHROW( checkouts->get_Item(index, &(checkout.p)));
+ 
+                 CComBSTR userName;
+                 COMTHROW( checkout->get_Username( &userName ));
+ 
+                 string name, type;
+                 getContainerName( *it, name, type );
+ 
+                 //sprintf( buf, "%S\t%s", userName, fullPath.c_str() );
+                 sprintf( buf, "%S\t%s (%s)", userName, name.c_str(), type.c_str() );
+ 
+                 dlg.m_fileList.push_back( buf );
+             }
+         }
+ 
+         dlg.DoModal();
+ 
+     }
+     else 
+     {
+         AfxMessageBox( "No detailed information available." );
+     }
+ }
+ 
  
  // egyeb:
***************
*** 2701,2704 ****
--- 2953,2978 ----
    Kerdesek: 
    1. a lockot minek undozni?
+ 
+ 
+ 
+ ClearCase kerdesek:
+ - a directory-k mergelese: 
+ - dynamic view eseten nincs szukseg get latestre
+ - a parent konyvtarat egyszeruen kicsekkelve kell tartani az ownernek es kesz
+   igy mindeki hozza tud adni fileokat (tesztek szerint igy mukodik)
+ 
+ 
+ Hibak:
+ -------
+ 1. Ha hozzadunk egy uj modelt akkor lehet hogy olyan helyre kerul ahol vannak mas modellek
+    amik ki vannak csekkelve masok altal amit az autoaranelment miatt majd megprobal kicsekkelni
+ 
+ 
+ TODO: kell hogy mutassuk a browserbe hogy mit lehet editalni
+  1-es megodlas: bevezetunk egy virtualis attributumot, regnodot
+   - le tudjuk-e ezt kerdezni felulrol???
+ 
+ 
+ 
   
  

Index: CoreXmlFile.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/XmlBackEnd/CoreXmlFile.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CoreXmlFile.h	13 Oct 2004 15:17:55 -0000	1.2
--- CoreXmlFile.h	21 Oct 2004 20:51:40 -0000	1.3
***************
*** 211,215 ****
                 ~XmlObject           ();
  
!     bool        isContainer         ();
          
  protected:
--- 211,215 ----
                 ~XmlObject           ();
  
!     bool        isContainer         ();    
          
  protected:
***************
*** 272,275 ****
--- 272,282 ----
      };
  
+     enum CheckOutSate
+     {
+         CS_NOT_CHECKEDOUT,
+         CS_CURRENT_USER,
+         CS_OTHER_USER
+     };
+ 
  public:
  	CCoreXmlFile();
***************
*** 330,333 ****
--- 337,342 ----
  
      void         getContainerFileName   (XmlObject * obj, std::string& str, bool fullpath=true);
+ 
+     void         getContainerName       (XmlObject * obj, std::string& name, std::string& type);
      
      // graph operatrions
***************
*** 426,429 ****
--- 435,440 ----
      bool         isFileCheckedOutCC     ( const char * path );
  
+     int          getCheckOutState       ( const char * path );
+ 
      void         checkOutFileCC         ( const char * path );
  
***************
*** 436,439 ****
--- 447,452 ----
      void         getLatestVerCC         ( const char * path );
  
+     void         showUsedFiles          ( XmlObjSet& containers );
+ 
  protected:
      // meta project
***************
*** 454,463 ****
      bool                            m_opened;
      bool                            m_modified;
!     std::string                          m_parentFolderPath;   // absolute path of the folder contains the project folder
!     std::string                          m_folderPath;   // absolute path of the folder contains the project files
!     std::string                          m_cacheFileName;
!     std::string                          m_projectFileName;
!     std::string                          m_projectName;
      bool                            m_inTransaction;
  
      // source control info
--- 467,477 ----
      bool                            m_opened;
      bool                            m_modified;
!     std::string                     m_parentFolderPath;   // absolute path of the folder contains the project folder
!     std::string                     m_folderPath;   // absolute path of the folder contains the project files
!     std::string                     m_cacheFileName;
!     std::string                     m_projectFileName;
!     std::string                     m_projectName;
      bool                            m_inTransaction;
+     bool                            m_savedOnce;
  
      // source control info
***************
*** 465,477 ****
  
      // sourcesafe
!     std::string                          m_vssDatabaseStr;
!     std::string                          m_vssParentPath;
!     std::string                          m_vssPath;
      CComObjPtr<IVSSDatabase>        m_vssDatabase;
!     std::string                          m_vssUser;
!     std::string                          m_vssPassword;
  
      // clearcase
!     std::string                          m_clearCaseString;
      CComObjPtr<IClearCase>          m_clearCase;
      CComObjPtr<IClearTool>          m_clearTool;
--- 479,491 ----
  
      // sourcesafe
!     std::string                     m_vssDatabaseStr;
!     std::string                     m_vssParentPath;
!     std::string                     m_vssPath;
      CComObjPtr<IVSSDatabase>        m_vssDatabase;
!     std::string                     m_vssUser;
!     std::string                     m_vssPassword;
  
      // clearcase
!     std::string                     m_clearCaseString;
      CComObjPtr<IClearCase>          m_clearCase;
      CComObjPtr<IClearTool>          m_clearTool;



More information about the GME-commit mailing list