[GME-commit] GMESRC/GME/XmlBackEnd SvnExec.h, NONE, 1.1 SvnTester.rgs, NONE, 1.1 StdAfx.h, 1.2, 1.3 CoreXmlFile.cpp, 1.23, 1.24 CoreXmlFile.h, 1.8, 1.9

Log messages of CVS commits gme-commit at list.isis.vanderbilt.edu
Thu Feb 7 13:57:08 CST 2008


Update of /project/gme-repository/GMESRC/GME/XmlBackEnd
In directory escher:/tmp/cvs-serv27004

Modified Files:
	StdAfx.h CoreXmlFile.cpp CoreXmlFile.h 
Added Files:
	SvnExec.h SvnTester.rgs 
Log Message:
Let them be checked out.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: CoreXmlFile.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CoreXmlFile.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** CoreXmlFile.cpp	27 Sep 2007 13:23:32 -0000	1.23
--- CoreXmlFile.cpp	7 Feb 2008 19:57:06 -0000	1.24
***************
*** 13,20 ****
--- 13,26 ----
  #include "FilesInUseDetailsDlg.h"
  #include <xercesc/framework/LocalFileFormatTarget.hpp> 
+ #include "SvnExec.h"
+ #include "FileHelp.h"
+ #include "DirSupplier.h"
  
  using namespace XERCES_CPP_NAMESPACE;
  using std::string;
  
[...6719 lines suppressed...]
- 			}
- 
- 			if( !mod_hasports)
- 			{
- 				if( mod_longref != 0)
- 					m_portless[ mod_longref] = true;
- 			}
- 		}
- 
- 		delete parser;
- 	}
- 	catch(...)
- 	{
- 		if( parser) delete parser;
- 		return false;
- 	}
- 
- 	return true;
- }
--- 6801,6805 ----

Index: CoreXmlFile.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CoreXmlFile.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** CoreXmlFile.h	26 Sep 2007 20:30:31 -0000	1.8
--- CoreXmlFile.h	7 Feb 2008 19:57:06 -0000	1.9
***************
*** 1,5 ****
  #ifndef MGA_COREXMLFILE_H
  #define MGA_COREXMLFILE_H
- 
  #include "resource.h"
  #include <fstream>//fstream.h
--- 1,4 ----
***************
*** 12,15 ****
--- 11,18 ----
  #include "Ssauto.h"
  #include "ccauto.h"
+ #include "svauto.h"
+ #include "CmdClient.h"
+ #include "OperOptions.h"
+ #include "MsgConsole.h"
  
  const metaobjidpair_type ROOT_ID_PAIR = {METAID_ROOT, OBJID_ROOT};
***************
*** 321,392 ****
  typedef UndoMap::iterator            UndoMapIter;
  
- class CCoreXmlFile;
- 
- class ParadigmInformation
- {
- public:
- 	ParadigmInformation();
- 
- 	// operations
- 	void                 clear                ();
- 	void                 load                 ( const std::string&     p_folder, const std::string&   p_parXmlFileName, CCoreXmlFile * const p_parent);
- 	bool                 isLoaded             () const;
- 
- 	bool                 portless             ( long                   p_metaref);
- 	bool                 portless             ( const std::string&     p_metaref);
- 	bool                 isPort               ( long                   p_metaref);
- 	bool                 isPort               ( const std::string&     p_metaref);
- 
- protected:
- 	bool                 parseXmp             ( const std::string& p_filename);
- 	bool                 createDtd            ( const std::string& p_filename);
- 
- 	// members
- 	const std::string    m_parXmlFileName;
- 	const std::string    m_parCnfFileName;
- 	bool                 m_loaded;
- 
- 	typedef std::map<long, bool>              METAREF_MAP;
- 	typedef METAREF_MAP::const_iterator       METAREF_MAP_CITER;
- 
- 	METAREF_MAP          m_isPort;            // is a metaref a port?
- 	METAREF_MAP          m_portless;          // has a model any ports
- };
- 
- class OperatingOptions
- {
- 	bool parseBool( const std::string& p_line, const std::string& p_optStr);
- 	void loadFrom( const std::string& p_folder, const std::string& p_name);
- public:
- 	OperatingOptions();
- 	void reset();
- 	void load( const std::string& p_folder);
- 	void display( CCoreXmlFile * const p_parent);
- 
- 	// members
- 	static const std::string    m_usrConfName;
- 	static const std::string    m_sysConfName;
- 	bool                 m_defCheckInOnSave;
- 	bool                 m_defCheckOutOnAction;
- 	bool                 m_alwaysFullLock;
- 	bool                 m_onDeleteAlwaysFullLock;
- 	bool                 m_onLoadShowStatus;
- 	bool                 m_useParadigmFile;
- 	bool                 m_measureTime;
- 	bool                 m_createLog;
- 	bool                 m_doRefTargetLock;
- 	bool                 m_doConnEndPointLock;
- 	bool                 m_doConnSegmentLock;
- 	bool                 m_doModelParentLock;
- 	bool                 m_doBaseTypeLock;
- 	bool                 m_partialLoad;
- 	bool                 m_useAccountInfo;
- 	bool                 m_automaticLogin;
- 	double               m_purgeDelayFactor;
- 	std::string          m_nameParadigmFile;
- 	std::string          m_defUserName;
- 	std::string          m_defPassword;
- 	ParadigmInformation  m_paradigmInfo;
- };
  
  class  SignFileEntry
--- 324,327 ----
***************
*** 442,445 ****
--- 377,382 ----
  	void acquireCC               ( const char * obj);
  	void releaseCC               ( const char * obj);
+ 	void acquireSVN              ( const char * obj);
+ 	void releaseSVN              ( const char * obj);
  
  protected:
***************
*** 449,452 ****
--- 386,390 ----
  	inline bool            isSS        ();
  	inline bool            isCC        ();
+ 	inline bool            isSV        ();
  
  public:
***************
*** 511,532 ****
  {
  public:
!     enum SourceControl
!     {
!         SC_NONE,
!         SC_SOURCESAFE,
!         SC_CLEARCASE
!     };
  
!     enum CheckOutSate
!     {
!         CS_NOT_CHECKEDOUT,
!         CS_CURRENT_USER,
!         CS_OTHER_USER
!     };
  
  	enum FileStatusBitList
  	{
  		//  FS_UTD = 0x0
! 		  FS_LOCAL = 0x1
  		, FS_OTHER = 0x2
  		, FS_MODIFIEDBYOTHERS = 0x100
--- 449,471 ----
  {
  public:
! 	enum SourceControl
! 	{
! 		SC_NONE,
! 		SC_SOURCESAFE,
! 		SC_CLEARCASE,
! 		SC_SUBVERSION
! 	};
  
! 	enum CheckOutSate
! 	{
! 		CS_NOT_CHECKEDOUT,
! 		CS_CURRENT_USER,
! 		CS_OTHER_USER
! 	};
  
  	enum FileStatusBitList
  	{
  		//  FS_UTD = 0x0
! 		FS_LOCAL = 0x1
  		, FS_OTHER = 0x2
  		, FS_MODIFIEDBYOTHERS = 0x100
***************
*** 539,549 ****
  	~CCoreXmlFile();
  
! BEGIN_COM_MAP(CCoreXmlFile)
! 	COM_INTERFACE_ENTRY(ICoreStorage)
! 	COM_INTERFACE_ENTRY(IDispatch)
! 	COM_INTERFACE_ENTRY(ISupportErrorInfo)
! END_COM_MAP()
  
! DECLARE_REGISTRY_RESOURCEID(IDR_CoreXmlFile)
  
  public:
--- 478,488 ----
  	~CCoreXmlFile();
  
! 	BEGIN_COM_MAP(CCoreXmlFile)
! 		COM_INTERFACE_ENTRY(ICoreStorage)
! 		COM_INTERFACE_ENTRY(IDispatch)
! 		COM_INTERFACE_ENTRY(ISupportErrorInfo)
! 	END_COM_MAP()
  
! 	DECLARE_REGISTRY_RESOURCEID(IDR_CoreXmlFile)
  
  public:
***************
*** 567,571 ****
  	STDMETHODIMP OpenProject            (BSTR connection, VARIANT_BOOL *ro_mode);
  	STDMETHODIMP CreateProject          (BSTR connection);
!     STDMETHODIMP SaveProject            (BSTR connection, VARIANT_BOOL keepoldname);
  	STDMETHODIMP CloseProject           (VARIANT_BOOL abort = VARIANT_FALSE);
  	STDMETHODIMP DeleteProject          ();
--- 506,510 ----
  	STDMETHODIMP OpenProject            (BSTR connection, VARIANT_BOOL *ro_mode);
  	STDMETHODIMP CreateProject          (BSTR connection);
! 	STDMETHODIMP SaveProject            (BSTR connection, VARIANT_BOOL keepoldname);
  	STDMETHODIMP CloseProject           (VARIANT_BOOL abort = VARIANT_FALSE);
  	STDMETHODIMP DeleteProject          ();
***************
*** 576,643 ****
  
  protected:
!     void         fillParentMap          ();
  
!     void         closeMetaProject       ();
  
!     void         openMetaObject         ();
  
!     void         closeMetaObject        ();
  
!     void         openMetaAttribute      ();
  
!     void         closeMetaAttribute     ();
  
!     void         parseConnectionString  ( BSTR connection );
  
!     void         setFileNames           ();
  
!     void         getContainerFileName   (XmlObject * obj, std::string& str, bool fullpath=true);
  
!     void         getContainerName       (XmlObject * obj, std::string& name, std::string& type);
!     
!     // graph operatrions
!     void         clearAll               ();
  
!     void         addObject              (XmlObject * obj);
  
!     void         deleteObject           (XmlObject * obj);
  
!     void         setPointer             (XmlObject * obj, attrid_type attribId, XmlObject * pointed);
  
!     XmlObject *  setPointer             (VARIANT p);
!     
!     void         updateCollections      ();
  
!     void         resolvePointers        (UnresolvedPointerVec& pointers);
  
!     void         resetSourceControlForAll();
!     void         resetSourceControlInfo (XmlObject * obj);
!     void         resetSourceControlStat (XmlObject * obj, bool freshObj);
  
!     // getting connections
!     void         getPointer             (XmlAttrPointer * attr, VARIANT * p);
  
!     void         getCollection          (XmlAttrCollection * attr, VARIANT * p);
  
!     XmlObject *  getContainer           (XmlObject * obj);
  
!     void         getContainedObjects    (XmlObject * obj, XmlObjVec& vec);
  
!     // check out
!     void         getCheckOutContainers  (XmlObjSet& objects, XmlObjSet& containers, bool thorough = false);
  
!     void         getDependentContainers (XmlObject * obj, XmlObjSet& containers, XmlObjSet& processedObjects, bool thorough = false);
  
!     void         getMyDepObj            ( XmlObject * obj, XmlObjSet& containers, XmlObjSet& processedObjects, bool thorough);
  
!     void         getMyDepObjConts       ( XmlObjSet& objects, XmlObjSet& containers, bool thorough);
  
!     void         getAllTheWayDown       ( XmlObject * obj, XmlObjSet& containers);
  
!     void         getAllUpAndDown        ( XmlObjSet& objects, XmlObjSet& containers);
  
!     void         getBasesOfObj          ( XmlObject * obj, XmlObjSet& containers);
  
!     void         getBasesOf             ( XmlObjSet& objects, XmlObjSet& containers);
  
  	void         getDeriveds            ( XmlObject * obj, XmlObjSet& containers);
--- 515,589 ----
  
  protected:
! 	void         fillParentMap          ();
  
! 	void         closeMetaProject       ();
  
! 	void         openMetaObject         ();
  
! 	void         closeMetaObject        ();
  
! 	void         openMetaAttribute      ();
  
! 	void         closeMetaAttribute     ();
  
! 	void         parseConnectionString  ( BSTR connection );
  
! 	void         svnSshHandling         ();
! 	std::string  svnSshMangling         ( const std::string& p_url);
  
! 	void         svnOptions             ();
  
! 	void         setFileNames           ();
  
! 	void         getContainerFileName   (XmlObject * obj, std::string& str, bool fullpath=true);
  
! 	void         getContainerName       (XmlObject * obj, std::string& name, std::string& type);
  
! 	// graph operatrions
! 	void         clearAll               ();
  
! 	void         addObject              (XmlObject * obj);
  
! 	void         deleteObject           (XmlObject * obj);
  
! 	void         setPointer             (XmlObject * obj, attrid_type attribId, XmlObject * pointed);
  
! 	XmlObject *  setPointer             (VARIANT p);
  
! 	void         updateCollections      ();
  
! 	void         resolvePointers        (UnresolvedPointerVec& pointers);
  
! 	void         resetSourceControlForAll();
! 	void         resetSourceControlInfo (XmlObject * obj);
! 	void         resetSourceControlStat (XmlObject * obj, bool freshObj);
  
! 	void         resetSettings          ();
  
! 	// getting connections
! 	void         getPointer             (XmlAttrPointer * attr, VARIANT * p);
  
! 	void         getCollection          (XmlAttrCollection * attr, VARIANT * p);
  
! 	XmlObject *  getContainer           (XmlObject * obj);
  
! 	void         getContainedObjects    (XmlObject * obj, XmlObjVec& vec);
  
! 	// check out
! 	void         getCheckOutContainers  (XmlObjSet& objects, XmlObjSet& containers, bool thorough = false);
  
! 	void         getDependentContainers (XmlObject * obj, XmlObjSet& containers, XmlObjSet& processedObjects, bool thorough = false);
  
! 	void         getMyDepObj            ( XmlObject * obj, XmlObjSet& containers, XmlObjSet& processedObjects, bool thorough);
! 
! 	void         getMyDepObjConts       ( XmlObjSet& objects, XmlObjSet& containers, bool thorough);
! 
! 	void         getAllTheWayDown       ( XmlObject * obj, XmlObjSet& containers);
! 
! 	void         getAllUpAndDown        ( XmlObjSet& objects, XmlObjSet& containers);
! 
! 	void         getBasesOfObj          ( XmlObject * obj, XmlObjSet& containers);
! 
! 	void         getBasesOf             ( XmlObjSet& objects, XmlObjSet& containers);
  
  	void         getDeriveds            ( XmlObject * obj, XmlObjSet& containers);
***************
*** 645,756 ****
  	void         applySmallChange       ( XmlObjSet& p_conts);
  
!     bool         checkOutFiles          (XmlObjSet& containers);
  
!     // object pointer and id conversion
!     XmlObject *  objectFromObjId        (metaobjidpair_type idpair);
  
!     void         objIdFromObject        (XmlObject * obj, metaobjidpair_type& idpair);
!     
!     // serialization
!     void         writeBinaryCache       ();
  
!     bool         readBinaryCache        ();
  
  	void         timestampOfCache       ( FILETIME* p_fTime);
  
!     void         createProjectFile      ();
  
!     void         readProjectFile        ();
!     
!     void         writeAll               ();
!     
!     void         writeXMLFile           (XmlObject * container);
  
!     void         writeObject            (XmlObject * obj, FILE * file, bool container, const char * prefix, CTime lastWriteTime );
  
!     void         applyLastWrTime        (XmlObject * obj, bool container, CTime lastWriteTime );
  
!     void         timeSync               (const char * fileName, XmlObject * container);
  
!     bool         moveContainerToDisk    (XmlObject * container);
  
!     void         fullReadContainer      (XmlObject * container);
  
!     void         readXMLFile            (const char * fileName, UnresolvedPointerVec& pointers, bool fullLoad );
  
!     void         readObject             (XERCES_CPP_NAMESPACE::DOMElement * e, UnresolvedPointerVec& pointers, 
!                                          XmlObject * parent, bool fullLoad, CTime lastWriteTime );
  
!     void         readAll                ( bool fullLoad );
  
!     void         getLatestAndLoad       ();
  
!     // source control
!     bool         getSourceSafeUserInfo  ();
  
!     void         createSourceSafeDatabase();
  
!     void         openSourceSafeDatabase ();
  
!     void         getSourceSafePath      (XmlObject * obj, std::string& str);
  
!     bool         isContainerReadOnly    (XmlObject * obj);
  
!     bool         isContinerCheckedOut   (XmlObject * obj);
  
!     void         getSSCheckOutUser      (XmlObject * obj, std::string& user, bool& newfile);
  
  	void         getSSLastCommiter      (XmlObject * obj, std::string& user);
  
!     void         checkOutContainer      (XmlObject * obj);
  
!     void         addToSourceControl     (XmlObject * container);
  
!     void         getLatestVersion       ();
  
!     void         checkInAll             ();
  
!     void         checkInAll             ( bool keepCheckedOut );
  
!     bool         createClearCaseApp     ();
!     
!     bool         isPathUnderClearCase   ( const char * path );
  
!     bool         isFileCheckedOutCC     ( const char * path );
  
!     int          getCheckOutStateCC     ( const char * path );
  
!     void         checkOutFileCC         ( const char * path );
  
!     void         checkInFileCC          ( const char * path );
  
!     void         addFileToCC            ( const char * path );
  
!     void         addDirToCC             ( const char * path );
  
!     void         getLatestVerCC         ( const char * path );
  
!     void         showUsedFiles          ( XmlObjSet& containers, bool p_latentMessage = false );
  
  	void         setSourceControlNodes  ( XmlObject * container, long lInfo, long lStat);
  
!     void         updateSourceControlInfo( XmlObject * container );
!     void         updateSourceControlInfo();
  
  	void         whoControlsThis        ( XmlObject * container = 0);
  
!     void         dumpSourceControlInfo  ();
  
!     bool         filesModifiedByOthers  ();
  
  	bool         filesModifiedByOthersV3( XmlObjSet& readOnlyFiles, XmlObjSet& latentFiles );
  
!     bool         fileModifiedByOthers   ( XmlObject * obj );
  
! 	bool         makeSureFileExistsInVerSys( const std::string& p_fname, const std::string& p_initialcontent);
  	// previously was called getStatusFileSS
  	bool         getFileHandleSS        ( const std::string& p_fname, CComObjPtr<IVSSItem>& ptr);
  	//bool         getStatusFileCC        ( const std::string& p_fname, const std::string& p_initialcontent);
  
  	void         protect                ( XmlObject * obj, OpCode oc);
  
--- 591,747 ----
  	void         applySmallChange       ( XmlObjSet& p_conts);
  
! 	bool         checkOutFiles          (XmlObjSet& containers);
  
! 	// object pointer and id conversion
! 	XmlObject *  objectFromObjId        (metaobjidpair_type idpair);
  
! 	void         objIdFromObject        (XmlObject * obj, metaobjidpair_type& idpair);
  
! 	// serialization
! 	void         writeBinaryCache       ();
! 
! 	bool         readBinaryCache        ();
  
  	void         timestampOfCache       ( FILETIME* p_fTime);
  
! 	void         createProjectFile      ();
  
! 	void         readProjectFile        ();
  
! 	void         writeAll               ();
  
! 	void         writeXMLFile           (XmlObject * container);
  
! 	void         writeObject            (XmlObject * obj, FILE * file, bool container, const char * prefix, CTime lastWriteTime );
  
! 	void         applyLastWrTime        (XmlObject * obj, bool container, CTime lastWriteTime );
  
! 	void         timeSync               (const char * fileName, XmlObject * container);
  
! 	bool         moveContainerToDisk    (XmlObject * container);
  
! 	void         fullReadContainer      (XmlObject * container);
  
! 	void         readXMLFile            (const char * fileName, UnresolvedPointerVec& pointers, bool fullLoad );
  
! 	void         readObject             (XERCES_CPP_NAMESPACE::DOMElement * e, UnresolvedPointerVec& pointers, XmlObject * parent, bool fullLoad, CTime lastWriteTime );
  
! 	void         readAll                ( bool fullLoad );
! 	void         loadFrom               ( const std::string& p_dir, UnresolvedPointerVec& p_pointers, bool p_fullLoad);
! 	void         loadDirs               ( const std::string& p_dir, UnresolvedPointerVec& p_pointers, bool p_fullLoad);
  
! 	void         getLatestAndLoad       ();
  
! 	// source control
! 	bool         getSourceSafeUserInfo  ( int p_svnText = 0);
  
! 	CComObjPtr<IVSSItem>  createFolderSS( CComObjPtr<IVSSItem> p_parentItem, CComBSTR p_subProjName, CComBSTR p_localSpec);
! 	void         createProjectFolder    ();
! 	int          createHashedFolders    ();
! 	void         commitHashedFolders    ();
! 	void         socoAdd                ( const std::string& p_path, bool p_recursive);
! 	void         socoCommit             ( const std::string& p_path, bool p_initial);
  
! 	void         createClearCaseProj     ();
! 	void         createNonversioned      ();
  
! 	void         createSourceSafeDatabase();
  
! 	void         openSourceSafeDatabase ();
! 
! 	void         getSourceSafePath      (XmlObject * obj, std::string& str);
! 
! 	bool         isContainerReadOnly    (XmlObject * obj);
! 
! 	bool         isContinerCheckedOut   (XmlObject * obj);
! 
! 	void         getSSCurrentOwner      (XmlObject * obj, std::string& user, bool& newfile);
  
  	void         getSSLastCommiter      (XmlObject * obj, std::string& user);
  
! 	void         checkOutContainer      (XmlObject * obj);
  
! 	void         addToSS                ( const std::string& p_path);
! 	void         addToSourceControl     (XmlObject * container, bool p_fileExisted);
  
! 	void         getLatestVersion       ();
  
! 	void         checkInAll             ();
  
! 	void         checkInAll             ( bool keepCheckedOut );
  
! 	bool         createClearCaseApp     ();
  
! 	bool         isPathUnderClearCase   ( const char * path );
  
! 	bool         isFileCheckedOutCC     ( const char * path );
  
! 	int          getCheckOutStateCC     ( const char * path );
  
! 	void         checkOutFileCC         ( const char * path );
  
! 	void         checkInFileCC          ( const char * path );
  
! 	void         addFileToCC            ( const char * path );
  
! 	void         addDirToCC             ( const char * path );
  
! 	void         getLatestVerCC         ( const char * path );
! 
! 	void         showUsedFiles          ( XmlObjSet& containers, bool p_latentMessage = false );
  
  	void         setSourceControlNodes  ( XmlObject * container, long lInfo, long lStat);
  
! 	void         updateSourceControlInfo( XmlObject * container );
! 	void         updateSourceControlInfo();
  
  	void         whoControlsThis        ( XmlObject * container = 0);
  
! 	void         dumpSourceControlInfo  ();
  
! 	bool         filesModifiedByOthers  ();
  
  	bool         filesModifiedByOthersV3( XmlObjSet& readOnlyFiles, XmlObjSet& latentFiles );
  
! 	bool         fileModifiedByOthers   ( XmlObject * obj );
! 	//bool         fileModifiedByOthers   ( const std::string& p_file, const CTime& p_myTime);
  
! 	bool         makeSureFileExistsInVerSys( const std::string& p_fname, const std::string& p_initialcontent, bool p_needsLock = true);
  	// previously was called getStatusFileSS
  	bool         getFileHandleSS        ( const std::string& p_fname, CComObjPtr<IVSSItem>& ptr);
  	//bool         getStatusFileCC        ( const std::string& p_fname, const std::string& p_initialcontent);
  
+ 	// SVN section:
+ 	void         getSVLastCommiter      ( XmlObject * obj, std::string& user);
+ 	void         getSVCurrentOwner      ( XmlObject * obj, std::string& user, bool& newfile);
+ 	bool         isCheckedOutByElseSVN  ( const std::string& p_file);
+ 	void         checkOutSVN            ( const std::string& p_file);
+ 	bool         isVersionedInSVN       ( const std::string& p_file, bool p_isADir = false, bool p_suppressErrorMsg = false);
+ 	bool         infoSVN                ( const std::string& p_url, bool p_recursive, std::string& p_resultMsg, std::string& p_author, std::string& p_owner);
+ 
+ 	bool         lockablePropertySVN    ( const std::string& p_file);
+ 	bool         applyLockSVN           ( const std::string& p_file);
+ 	bool         removeLockSVN          ( const std::string& p_file);
+ 	bool         mkdirSVN               ( const std::string& p_url, const std::string& p_newDirName, const std::string& p_localPath);
+ 	bool         addSVN                 ( const std::string& p_file, bool p_recursive = false);
+ 	bool         commitSVN              ( const std::string& p_dirOrFile, bool p_initialCommit = false, bool p_noUnlock = false);
+ 	bool         updateSVN              ( const std::string& p_dirOrFile);
+ 	void         svnSetup               ();
+ 	void         testSubversion         ();
+ 	void         createSubversionClientImpl();
+ 	void         createSubversionedFolder();
+ 
+ 	std::string                 m_svnUrl;
+ 	bool                        m_svnByAPI;
+ 	bool                        m_hashFileNames;
+ 	int                         m_hashVal;
+ 	bool                        m_hashInfoFound;
+ 	bool                        m_svnAccessMethodFound;
+ 	bool                        m_svnShowCmdLineWindows;
+ 	bool                        m_svnRedirectOutput;
+ 
+ 	CmdClient                   *m_cmdSvn;
+ 	CComPtr< ISvnExec>          m_comSvn;
+ 
  	void         protect                ( XmlObject * obj, OpCode oc);
  
***************
*** 762,767 ****
  	bool         refreshSignFile        ();
  	std::string  userName               ();
! 	bool         isSS                   ();
! 	bool         isCC                   ();
  
  	bool                        userFilter             ( CTimeSpan& p_elapsed);
--- 753,759 ----
  	bool         refreshSignFile        ();
  	std::string  userName               ();
! 	inline bool  isSS                   ();
! 	inline bool  isCC                   ();
! 	inline bool  isSV                   ();
  
  	bool                        userFilter             ( CTimeSpan& p_elapsed);
***************
*** 774,848 ****
  	bool         specialUserInquiryHandled( VARIANT p);
  public:
!     // this can be used by other classes too
!     void         sendMsg                ( const std::string&, int mtype );
  	std::string  makelink               ( XmlObject * ptr);
  
  protected:
!     // meta project
!     CComObjPtr<ICoreMetaProject>    m_metaProject;
  
!     // meta object
!     CComObjPtr<ICoreMetaObject>     m_metaObject;
!     metaid_type                     m_metaObjectId;
  
!     // meta attribute
!     CComObjPtr<ICoreMetaAttribute>  m_metaAttribute;
  	attrid_type                     m_metaAttributeId;
!     valtype_type                    m_metaAttributeValType;
  
!     ParentMap                       m_parentMap;
!     
!     // project
!     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
!     int                             m_sourceControl;
  
!     // 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;
  
!     // objects
!     XmlObjVec                       m_objects;
!     GUIDToXmlObjectMap              m_objectsByGUID;
!     XmlObject                     * m_openedObject;
!     XmlObject                     * m_root;
!     bool                            m_trivialChanges;
!     bool                            m_fullLockNeeded;
  
  
  #ifdef _DEBUG
!     std::string                     mylog;
  #endif
  
!     // transaction handling
!     UndoMap                         m_undoMap;
!     XmlObjSet                       m_modifiedObjects;
!     XmlObjVec                       m_createdObjects;
!     XmlObjSet                       m_deletedObjects;
!     //XmlObjSet                       m_checkOutContainers;
  
  	// protection list
  	ProtectList                     m_protectList;
  	SignManager                     m_signer;
! 	
!     OperatingOptions                m_userOpts;
  	std::vector< XmlObject*>        m_deldObjs;
  
--- 766,852 ----
  	bool         specialUserInquiryHandled( VARIANT p);
  public:
! 	// these can be used by other classes too
! 	MsgConsole                  m_console;
! 	void         sendMsg                ( const std::string&, int mtype );
  	std::string  makelink               ( XmlObject * ptr);
  
+ /*	inline bool  isFileReadOnly         ( const std::string& p_file);
+ 	inline bool  isFileReadOnly2        ( const std::string& p_file, bool* p_fileExisted);
+ 	inline bool  isFileReadWrite        ( const std::string& p_file);
+ 	inline bool  isFile                 ( const std::string& p_file);
+ 	inline bool  isDir                  ( const std::string& p_file);
+ 	inline bool  fileExist              ( const std::string& p_file);
+ */
+ 
  protected:
! 	// meta project
! 	CComObjPtr<ICoreMetaProject>    m_metaProject;
  
! 	// meta object
! 	CComObjPtr<ICoreMetaObject>     m_metaObject;
! 	metaid_type                     m_metaObjectId;
  
! 	// meta attribute
! 	CComObjPtr<ICoreMetaAttribute>  m_metaAttribute;
  	attrid_type                     m_metaAttributeId;
! 	valtype_type                    m_metaAttributeValType;
  
! 	ParentMap                       m_parentMap;
  
! 	// project
! 	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_contentPath;
! 	static const char *             m_contentConst;
! 	static const char *             m_dtdFileContent;
! 	std::string                     m_cacheFileName;
! 	std::string                     m_projectFileName;
! 	std::string                     m_projectName;
! 	bool                            m_inTransaction;
! 	bool                            m_savedOnce;
  
! 	// source control info
! 	int                             m_sourceControl;
  
! 	// 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;
! 
! 	// objects
! 	XmlObjVec                       m_objects;
! 	GUIDToXmlObjectMap              m_objectsByGUID;
! 	XmlObject                     * m_openedObject;
! 	XmlObject                     * m_root;
! 	bool                            m_trivialChanges;
! 	bool                            m_fullLockNeeded;
  
  
  #ifdef _DEBUG
! 	std::string                     mylog;
  #endif
  
! 	// transaction handling
! 	UndoMap                         m_undoMap;
! 	XmlObjSet                       m_modifiedObjects;
! 	XmlObjVec                       m_createdObjects;
! 	XmlObjSet                       m_deletedObjects;
! 	//XmlObjSet                       m_checkOutContainers;
  
  	// protection list
  	ProtectList                     m_protectList;
  	SignManager                     m_signer;
! 
! 	OperatingOptions                m_userOpts;
  	std::vector< XmlObject*>        m_deldObjs;
  

--- NEW FILE: SvnExec.h ---
// SvnExec.h : Declaration of the CSvnExec

#pragma once
#include "XmlBackEnd.h"
#include "svauto.h"
#include "HiClient.h"
#include "resource.h"       // main symbols
#include <comsvcs.h>


// CSvnExec

class ATL_NO_VTABLE CSvnExec : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CSvnExec, &CLSID_SvnExec>,
	public IDispatchImpl<ISvnExec, &IID_ISvnExec, &LIBID_XMLBACKENDLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
	CSvnExec()
	{
	}

	DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		return S_OK;
	}
	
	void FinalRelease() 
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_SVNEXEC)

DECLARE_NOT_AGGREGATABLE(CSvnExec)

BEGIN_COM_MAP(CSvnExec)
	COM_INTERFACE_ENTRY(ISvnExec)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()


// ISvnExec
public:
	STDMETHOD(TryLock)(BSTR path, VARIANT_BOOL* success);
	STDMETHOD(UnLock)(BSTR path, VARIANT_BOOL* success);
	STDMETHOD(AddLockableProperty)(BSTR path);
	STDMETHOD(GetLatest)(BSTR path);
	STDMETHOD(LightCheckOut)(BSTR path, BSTR localDir);
	STDMETHOD(Commit)(BSTR path, VARIANT_BOOL keepLocked);
	STDMETHOD(Add)(BSTR path, VARIANT_BOOL recursive);
	STDMETHOD(SrvMkDir)(BSTR path);
	STDMETHOD(Resolve)(BSTR path, VARIANT_BOOL recursive);
	STDMETHOD(CleanUp)(BSTR path);
	STDMETHOD(Status)(BSTR path, VARIANT_BOOL provideStatusMessage, BSTR* statusMessage);
	STDMETHOD(Info)(BSTR url, VARIANT_BOOL recursive, VARIANT_BOOL provideInfoMessage, BSTR* infoMsg, BSTR* author, BSTR* lockOwner);
	STDMETHOD(IsVersioned)(BSTR path, VARIANT_BOOL isDir, VARIANT_BOOL suppressErrorMsg, VARIANT_BOOL* isVersioned);
	STDMETHOD(IsLocked)(BSTR path, VARIANT_BOOL* isLocked, BSTR* lockHolder);
	STDMETHOD(Init)(BSTR username, BSTR password);
	STDMETHOD(Logging)(VARIANT_BOOL onoff);

protected:
	VARIANT_BOOL      b2vb( bool val);
	bool              vb2b( VARIANT_BOOL val);


	HiClient    *m_impl;
};

OBJECT_ENTRY_AUTO(__uuidof(SvnExec), CSvnExec)

Index: StdAfx.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/StdAfx.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** StdAfx.h	13 Oct 2004 15:17:55 -0000	1.2
--- StdAfx.h	7 Feb 2008 19:57:06 -0000	1.3
***************
*** 28,32 ****
  
  #include <stl_user_config.h>
! 
  
  #include "CoreLib.h"
--- 28,32 ----
  
  #include <stl_user_config.h>
! #include "SvnConfig.h"
  
  #include "CoreLib.h"

--- NEW FILE: SvnTester.rgs ---
HKCR
{
	Mga.XmlBackEnd.SvnTester.1 = s 'SvnTester Class'
	{
		CLSID = s '{5CDD4F2C-3CFF-419A-A7C7-B1C9E9962ABC}'
	}
	Mga.XmlBackEnd.SvnTester = s 'SvnTester Class'
	{
		CLSID = s '{5CDD4F2C-3CFF-419A-A7C7-B1C9E9962ABC}'
		CurVer = s 'Mga.XmlBackEnd.SvnTester.1'
	}
	NoRemove CLSID
	{
		ForceRemove {5CDD4F2C-3CFF-419A-A7C7-B1C9E9962ABC} = s 'SvnTester Class'
		{
			ProgID = s 'Mga.XmlBackEnd.SvnTester.1'
			VersionIndependentProgID = s 'Mga.XmlBackEnd.SvnTester'
			ForceRemove 'Programmable'
			InprocServer32 = s '%MODULE%'
			{
				val ThreadingModel = s 'Both'
			}
		}
	}
}



More information about the GME-commit mailing list