[GME-commit] GMESRC/GME/Gme GME.rc, 1.162, 1.163 resource.h, 1.74, 1.75 GMEApp.h, 1.39, 1.40 GMEView.cpp, 1.196, 1.197 MainFrm.cpp, 1.39, 1.40 MainFrm.h, 1.29, 1.30 NewXmlbackendProjDlg.cpp, 1.3, 1.4 NewXmlbackendProjDlg.h, 1.1, 1.2
Log messages of CVS commits
gme-commit at list.isis.vanderbilt.edu
Thu Feb 7 16:54:50 CST 2008
- Previous message: [GME-commit] GMESRC/GME/XmlBackEnd CoreXmlFile.cpp, 1.24, 1.25 SvnConfig.h, 1.1, 1.2 SvnExec.cpp, 1.1, 1.2 SvnExec.rgs, 1.1, 1.2 SvnTester.cpp, 1.1, 1.2 XmlBackEnd.vcproj, 1.4, 1.5
- Next message: [GME-commit] GMESRC/GME/PartBrowser - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv27684
Modified Files:
GME.rc resource.h GMEApp.h GMEView.cpp MainFrm.cpp MainFrm.h
NewXmlbackendProjDlg.cpp NewXmlbackendProjDlg.h
Log Message:
When dblclicked on a reference which points to a folder-child will display a message, and select the element in the treebrowser.
Subversion menuitem in View menu.
NewXmlBackEndProj of kind SVN.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: GMEApp.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEApp.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** GMEApp.h 27 Sep 2007 12:29:02 -0000 1.39
--- GMEApp.h 7 Feb 2008 22:54:48 -0000 1.40
***************
*** 66,69 ****
--- 66,71 ----
bool bNoProtect; // do not catch application errors
inline bool isMultiUserProj() const { return proj_type_is_xmlbackend; }
+ inline bool isMgaProj() const { return proj_type_is_mga; }
+ inline CString connString() const { return currentConnection; }
private:
Index: MainFrm.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/MainFrm.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** MainFrm.cpp 27 Sep 2007 12:22:46 -0000 1.39
--- MainFrm.cpp 7 Feb 2008 22:54:48 -0000 1.40
***************
*** 10,13 ****
--- 10,14 ----
#include "Splash.h"
#include "GMEEventLogger.h"
+ #include "..\XmlBackEnd\svauto.h"
#include ".\mainfrm.h"
#include <sys/types.h>
***************
*** 83,87 ****
--- 84,90 ----
ON_UPDATE_COMMAND_UI(ID_VIEW_REFRESH_SOURCECONTROL, OnUpdateViewMultiUserRefreshSourceControl)
ON_COMMAND(ID_MULTIUSER_ACTIVEUSERS, OnViewMultiUserActiveUsers)
+ ON_COMMAND(ID_MULTIUSER_SUBVERSION, OnViewMultiUserSubversion)
ON_UPDATE_COMMAND_UI(ID_MULTIUSER_ACTIVEUSERS, OnUpdateViewMultiUserActiveUsers)
+ ON_UPDATE_COMMAND_UI(ID_MULTIUSER_SUBVERSION, OnUpdateViewMultiUserSubversion)
ON_COMMAND(ID_VIEW_CLEARCONSOLE, OnViewClearConsole)
ON_UPDATE_COMMAND_UI(ID_VIEW_CLEARCONSOLE, OnUpdateViewClearConsole)
***************
*** 959,963 ****
void CMainFrame::OnUpdateViewMultiUserActiveUsers(CCmdUI* pCmdUI)
{
! pCmdUI->Enable( theApp.isMultiUserProj() && CGMEDoc::theInstance != 0);
}
--- 962,988 ----
void CMainFrame::OnUpdateViewMultiUserActiveUsers(CCmdUI* pCmdUI)
{
! pCmdUI->Enable( !CGMEDoc::theInstance || !theApp.isMgaProj()); // always TRUE (also when no project is open) except when mga_proj is open
! }
!
! void CMainFrame::OnUpdateViewMultiUserSubversion(CCmdUI* pCmdUI)
! {
! pCmdUI->Enable( !CGMEDoc::theInstance || !theApp.isMgaProj()); // always TRUE (also when no project is open) except when mga_proj is open
! }
!
! void CMainFrame::OnViewMultiUserSubversion()
! {
! try
! {
! CComPtr<ISvnWorkBench> wb;
! HRESULT hr = wb.CoCreateInstance( L"Mga.XmlBackEnd.SvnWorkBench");
! if( FAILED( hr) || !wb) {
! AfxMessageBox( "Could not create Svn Work Bench!");
! return;
! }
!
! wb->SetClues( CComBSTR( (LPCTSTR) theApp.connString()));
! wb->ShowDlg();
! }
! catch(...) { ASSERT(0); }
}
Index: MainFrm.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/MainFrm.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** MainFrm.h 26 Sep 2007 19:08:28 -0000 1.29
--- MainFrm.h 7 Feb 2008 22:54:48 -0000 1.30
***************
*** 131,135 ****
--- 131,137 ----
afx_msg void OnUpdateViewMultiUserRefreshSourceControl(CCmdUI* pCmdUI);
afx_msg void OnViewMultiUserActiveUsers();
+ afx_msg void OnViewMultiUserSubversion();
afx_msg void OnUpdateViewMultiUserActiveUsers(CCmdUI* pCmdUI);
+ afx_msg void OnUpdateViewMultiUserSubversion(CCmdUI* pCmdUI);
afx_msg void OnViewClearConsole();
afx_msg void OnUpdateViewClearConsole( CCmdUI* pCmdUI);
Index: NewXmlbackendProjDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/NewXmlbackendProjDlg.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NewXmlbackendProjDlg.cpp 27 Sep 2007 13:26:59 -0000 1.3
--- NewXmlbackendProjDlg.cpp 7 Feb 2008 22:54:48 -0000 1.4
***************
*** 5,8 ****
--- 5,10 ----
#include "gme.h"
#include "NewXmlbackendProjDlg.h"
+ #include <direct.h>
+ #include "..\XmlBackEnd\svauto.h"
#ifdef _DEBUG
***************
*** 17,21 ****
CNewXmlbackendProjDlg::CNewXmlbackendProjDlg(CWnd* pParent /*=NULL*/)
! : CDialog(CNewXmlbackendProjDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CNewXmlbackendProjDlg)
--- 19,23 ----
CNewXmlbackendProjDlg::CNewXmlbackendProjDlg(CWnd* pParent /*=NULL*/)
! : CDialog(CNewXmlbackendProjDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CNewXmlbackendProjDlg)
***************
*** 24,28 ****
--- 26,33 ----
m_vssDatabase = _T("");
m_vssPath = _T("");
+ m_svnUrl = _T("");
m_sourceControlType = 0;
+ m_hashedFileStorage = 0;
+ m_svnAccessMethod = 0;
//}}AFX_DATA_INIT
}
***************
*** 33,36 ****
--- 38,42 ----
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CNewXmlbackendProjDlg)
+ DDX_Control(pDX, IDC_EDIT_SVNDATABASE, m_svnUrlCtrl);
DDX_Control(pDX, IDC_EDIT_VSSPATH, m_vssPathCtrl);
DDX_Control(pDX, IDC_EDIT_VSSDATABASE, m_vssDatabaseCtrl);
***************
*** 38,47 ****
--- 44,60 ----
DDX_Control(pDX, IDC_STATIC_VSSPROJ, m_vssProjLabel);
DDX_Control(pDX, IDC_STATIC_VSSDB, m_vssDbLabel);
+ DDX_Control(pDX, IDC_STATIC_SUBVERSION_URLLABEL, m_svnUrlLabel);
DDX_Control(pDX, IDC_STATIC_VSS, m_vssBorder);
+ DDX_Control(pDX, IDC_STATIC_SVN, m_svnBorder);
+ DDX_Control(pDX, IDC_BUTTON_SVNTRY, m_svnTryBtn);
DDX_Text(pDX, IDC_EDIT_LOCATION, m_location);
DDX_Text(pDX, IDC_EDIT_PROJNAME, m_projectName);
DDX_Text(pDX, IDC_EDIT_VSSDATABASE, m_vssDatabase);
DDX_Text(pDX, IDC_EDIT_VSSPATH, m_vssPath);
+ DDX_Text(pDX, IDC_EDIT_SVNDATABASE, m_svnUrl);
DDX_Radio(pDX, IDC_RADIO_VSS, m_sourceControlType);
+ DDX_Check(pDX, IDC_CHECK_SPLITTOSUBDIRS, m_hashedFileStorage);
+ DDX_Control(pDX, IDC_COMBO_SPLITALG, m_hashAlgoControl);
+ DDX_Radio(pDX, IDC_RADIO_SVNAPI, m_svnAccessMethod);
//}}AFX_DATA_MAP
}
***************
*** 49,60 ****
void CNewXmlbackendProjDlg::enableSourceSafeControls( bool enable )
{
! m_vssBorder.EnableWindow( enable );
! m_vssBrowseButton.EnableWindow( enable );
! m_vssProjLabel.EnableWindow( enable );
! m_vssDbLabel.EnableWindow( enable );
! m_vssDatabaseCtrl.EnableWindow( enable );
! m_vssPathCtrl.EnableWindow( enable );
}
-
BEGIN_MESSAGE_MAP(CNewXmlbackendProjDlg, CDialog)
--- 62,90 ----
void CNewXmlbackendProjDlg::enableSourceSafeControls( bool enable )
{
! m_vssBorder.EnableWindow( enable );
! m_vssBrowseButton.EnableWindow( enable );
! m_vssProjLabel.EnableWindow( enable );
! m_vssDbLabel.EnableWindow( enable );
! m_vssDatabaseCtrl.EnableWindow( enable );
! m_vssPathCtrl.EnableWindow( enable );
! }
!
! void CNewXmlbackendProjDlg::enableSubversionControls( bool enable )
! {
! if( GetDlgItem(IDC_STATIC_SVN_SECTION1)) GetDlgItem( IDC_STATIC_SVN_SECTION1)->EnableWindow( enable);
! if( GetDlgItem(IDC_RADIO_SVNAPI)) GetDlgItem(IDC_RADIO_SVNAPI)->EnableWindow( enable);
! if( GetDlgItem(IDC_RADIO_SVNCMDL)) GetDlgItem(IDC_RADIO_SVNCMDL)->EnableWindow( enable);
!
! m_svnTryBtn.EnableWindow( enable);
! m_svnBorder.EnableWindow( enable );
! m_svnUrlLabel.EnableWindow( enable );
! m_svnUrlCtrl.EnableWindow( enable );
!
! //if( GetDlgItem(IDC_STATIC_SVN) GetDlgItem( IDC_STATIC_SVN)->EnableWindow( enable);
! //if( GetDlgItem(IDC_STATIC_VSSDB2)) GetDlgItem(IDC_STATIC_VSSDB2)->EnableWindow( enable);
! //if( GetDlgItem(IDC_STATIC_VSSDB3)) GetDlgItem(IDC_STATIC_VSSDB3)->EnableWindow( enable);
! if( GetDlgItem(IDC_STATIC_SUBVERSION)) GetDlgItem(IDC_STATIC_SUBVERSION)->EnableWindow( enable);
! if( GetDlgItem(IDC_STATIC_SUBVERSION2)) GetDlgItem(IDC_STATIC_SUBVERSION2)->EnableWindow( enable);
}
BEGIN_MESSAGE_MAP(CNewXmlbackendProjDlg, CDialog)
***************
*** 62,68 ****
--- 92,101 ----
ON_BN_CLICKED(IDC_BUTTON_BROWSE_LOC, OnButtonBrowseLoc)
ON_BN_CLICKED(IDC_BUTTON_BROWSE_VSSDB, OnButtonBrowseVssdb)
+ ON_BN_CLICKED(IDC_RADIO_SUBVERSION, OnSourceControlChanged)
ON_BN_CLICKED(IDC_RADIO_CLEARCASE, OnSourceControlChanged)
ON_BN_CLICKED(IDC_RADIO_NONE, OnSourceControlChanged)
ON_BN_CLICKED(IDC_RADIO_VSS, OnSourceControlChanged)
+ ON_BN_CLICKED(IDC_CHECK_SPLITTOSUBDIRS, OnBnClickedCheckSplittosubdirs)
+ ON_BN_CLICKED(IDC_BUTTON_SVNTRY, OnBnClickedButtonSvnTry)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
***************
*** 74,81 ****
void CNewXmlbackendProjDlg::OnButtonBrowseLoc()
{
! BROWSEINFO bi;
! char szDisplayName[MAX_PATH];
! char szPath[MAX_PATH];
bi.hwndOwner = m_hWnd;
--- 107,114 ----
void CNewXmlbackendProjDlg::OnButtonBrowseLoc()
{
! BROWSEINFO bi;
! char szDisplayName[MAX_PATH];
! char szPath[MAX_PATH];
bi.hwndOwner = m_hWnd;
***************
*** 87,122 ****
bi.lParam = 0;
! LPITEMIDLIST idlist = SHBrowseForFolder(&bi);
! if( idlist && SHGetPathFromIDList(idlist, szPath) )
! {
! UpdateData();
! m_location = szPath;
! UpdateData(FALSE);
! }
}
void CNewXmlbackendProjDlg::OnButtonBrowseVssdb()
{
! CFileDialog dlg(true, NULL, "srcsafe.ini", OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "SourceSafe Database (srcsafe.ini)|srcsafe.ini||" );
! if( dlg.DoModal() == IDOK )
! {
! UpdateData();
! m_vssDatabase = dlg.GetPathName();
! UpdateData(FALSE);
! }
}
void CNewXmlbackendProjDlg::OnSourceControlChanged()
{
! UpdateData();
! enableSourceSafeControls( m_sourceControlType == 0 );
}
void CNewXmlbackendProjDlg::OnOK()
{
! UpdateData();
if( m_projectName.Trim().IsEmpty() || m_location.Trim().IsEmpty())
{
--- 120,156 ----
bi.lParam = 0;
! LPITEMIDLIST idlist = SHBrowseForFolder(&bi);
! if( idlist && SHGetPathFromIDList(idlist, szPath) )
! {
! UpdateData();
! m_location = szPath;
! UpdateData(FALSE);
! }
}
void CNewXmlbackendProjDlg::OnButtonBrowseVssdb()
{
! CFileDialog dlg(true, NULL, "srcsafe.ini", OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "SourceSafe Database (srcsafe.ini)|srcsafe.ini||" );
! if( dlg.DoModal() == IDOK )
! {
! UpdateData();
! m_vssDatabase = dlg.GetPathName();
! UpdateData(FALSE);
! }
}
void CNewXmlbackendProjDlg::OnSourceControlChanged()
{
! UpdateData();
! enableSourceSafeControls( m_sourceControlType == 0 );
! enableSubversionControls( m_sourceControlType == 1 );
}
void CNewXmlbackendProjDlg::OnOK()
{
! UpdateData();
if( m_projectName.Trim().IsEmpty() || m_location.Trim().IsEmpty())
{
***************
*** 125,154 ****
}
! m_connectionString = "MGX=\"";
! m_connectionString += m_location.Trim();
! // http://escher.isis.vanderbilt.edu/JIRA/browse/GME-148 : JIRA entry created
! // if m_location contains a tailing '\' then no need for this
if( m_location.TrimRight().Right(1) != '\\')
! m_connectionString += "\\";
! m_connectionString += m_projectName.Trim();
! m_connectionString += "\"";
- if( m_sourceControlType == 0 )
- {
- if( !m_vssDatabase.IsEmpty() )
- {
- m_connectionString += " vssDatabase=\"";
- m_connectionString += m_vssDatabase;
- m_connectionString += "\" vssPath=\"";
- m_connectionString += m_vssPath;
- m_connectionString += "\"";
- }
- }
- else if( m_sourceControlType == 1 )
- {
- m_connectionString += " clearCase=\"true\"";
- }
-
CDialog::OnOK();
}
--- 159,360 ----
}
! WIN32_FILE_ATTRIBUTE_DATA attr;
! if( GetFileAttributesEx( m_location, GetFileExInfoStandard, &attr ) )
! {
! if( FILE_ATTRIBUTE_DIRECTORY != ( attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
! if( IDOK != AfxMessageBox( m_location + " does not seem to be a directory. Do you still want to use this location for your project?", MB_YESNO))
! return; // if answered NO, return, which means dialog is not closed
! }
! else
! if( IDOK != AfxMessageBox( m_location + " does not seem to exist, but it might be created during the checkout process. Do you want to continue?", MB_YESNO))
! return; // if answered NO, return, which means dialog is not closed
!
! if( m_sourceControlType == 1 &&
! (m_svnUrl.Left( 6) != "svn://"
! && m_svnUrl.Left(10) != "svn+ssh://"
! && m_svnUrl.Left(8) != "https://"))
! {
! AfxMessageBox( "URL must be provided in one of the svn://host[/dir], svn+ssh://[username@]host[/dir] or https://host[/dir] form");
! return;
! }
!
! if( m_sourceControlType == 1 &&
! m_svnAccessMethod != 0 && m_svnAccessMethod != 1)
! {
! AfxMessageBox( "Subversion can be used either though API or CMD.exe. Please select one of them.");
! return;
! }
!
! m_connectionString = "MGX=\"";
! m_connectionString += m_location.Trim();
! // http://escher.isis.vanderbilt.edu/JIRA/browse/GME-148 : JIRA entry created
! // if m_location contains a tailing '\' then no need for this
if( m_location.TrimRight().Right(1) != '\\')
! m_connectionString += "\\";
! m_connectionString += m_projectName.Trim();
! m_connectionString += "\"";
!
! if( m_svnUrl.Right(1) == '/') // cut off tailing '/'
! m_svnUrl = m_svnUrl.Left( m_svnUrl.GetLength() - 1 );
!
! if( m_sourceControlType == 0 )
! {
! if( !m_vssDatabase.IsEmpty() )
! {
! m_connectionString += " vssDatabase=\"";
! m_connectionString += m_vssDatabase;
! m_connectionString += "\" vssPath=\"";
! m_connectionString += m_vssPath;
! m_connectionString += "\"";
! }
! }
! else if( m_sourceControlType == 1 )
! {
! //if( !m_svnUrl.IsEmpty())
! m_connectionString += " svn=\"";
! m_connectionString += m_svnUrl;
! m_connectionString += "\"";
! m_connectionString += " svnaccess=";
! m_connectionString += m_svnAccessMethod?"\"CMD\"":"\"API\""; // 1 is CMD
! char gmepath[200];
! if(SHGetSpecialFolderPath( NULL, gmepath, CSIDL_APPDATA, true)) //most likely C:\Documents and Settings\<username>\Application Data
! {
! WIN32_FILE_ATTRIBUTE_DATA attr;
! BOOL res;
! CString path;
!
! int nb_errs = 0;
! path = CString( gmepath) + "\\Subversion";
! res = GetFileAttributesEx( path, GetFileExInfoStandard, &attr );
! if( res && ( FILE_ATTRIBUTE_DIRECTORY == (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))) { } else
! nb_errs += _mkdir( (LPCTSTR) path);
!
! path = CString( gmepath) + "\\Subversion\\auth";
! res = GetFileAttributesEx( path, GetFileExInfoStandard, &attr );
! if( res && ( FILE_ATTRIBUTE_DIRECTORY == (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))) { } else
! nb_errs += _mkdir( (LPCTSTR) path);
!
! if( nb_errs == 0)
! {
! path = CString(gmepath) + "\\Subversion\\auth\\svn.simple";
! res = GetFileAttributesEx( path, GetFileExInfoStandard, &attr );
! if( res && ( FILE_ATTRIBUTE_DIRECTORY == (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))) { } else
! {
! nb_errs += _mkdir((LPCTSTR) path); //in case dir is not there, make it, if it was there will fail
! if( !nb_errs)
! AfxMessageBox( path + " directory created that the credentials could be stored later.");
! }
!
! path = CString(gmepath) + "\\Subversion\\auth\\svn.ssl.server";
! res = GetFileAttributesEx( path, GetFileExInfoStandard, &attr );
! if( res && ( FILE_ATTRIBUTE_DIRECTORY == (attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))) { } else
! {
! int l_errs = _mkdir((LPCTSTR) path); //in case dir is not there, make it, if it was there will fail
! if( !l_errs)
! AfxMessageBox( path + " directory created that the certificates could be stored later.");
!
! nb_errs += l_errs;
! }
! }
!
! if( nb_errs)
! AfxMessageBox( CString( "Could not create the local directories where credentials would be stored: \n") +
! CString( gmepath) + "\\Subversion\\auth\\svn.simple\n" +
! CString( gmepath) + "\\Subversion\\auth\\svn.ssl.server");
! }
!
! }
! else if( m_sourceControlType == 2 )
! {
! m_connectionString += " clearCase=\"true\"";
! }
!
! if( m_hashedFileStorage == BST_CHECKED)
! {
! m_connectionString += " hash=\"true\"";
! int csel = m_hashAlgoControl.GetCurSel();
! if( csel < m_hashAlgoControl.GetCount() && csel >= 0)
! {
! CString res;
! m_hashAlgoControl.GetLBText( csel, res);
!
! if( res == "4096")
! m_connectionString += " hval=\"4096\"";
! else if( res == "256")
! m_connectionString += " hval=\"256\"";
! else if( res == "3")
! m_connectionString += " hval=\"3\"";
! else if( res == "4")
! m_connectionString += " hval=\"4\"";
! else
! {
! AfxMessageBox( "Invalid hash method selected");
! return;
! }
! }
! }
CDialog::OnOK();
}
+
+ BOOL CNewXmlbackendProjDlg::OnInitDialog()
+ {
+ m_svnUrl = "svn+ssh://zolmol@svn.isis.vanderbilt.edu/export/svn/testrepo/gme/zoli";
+ m_svnUrl = "https://svn.isis.vanderbilt.edu/testrepo/gme/zoli";
+ CDialog::OnInitDialog();
+
+ enableSourceSafeControls( m_sourceControlType == 0 );
+ enableSubversionControls( m_sourceControlType == 1 );
+ m_hashAlgoControl.SetCurSel( 0);
+ m_hashAlgoControl.EnableWindow( 1 == m_hashedFileStorage);
+
+ return TRUE;
+ }
+
+ void CNewXmlbackendProjDlg::OnBnClickedCheckSplittosubdirs()
+ {
+ UpdateData( TRUE);
+ m_hashAlgoControl.EnableWindow( 1 == m_hashedFileStorage);
+ }
+
+ void CNewXmlbackendProjDlg::OnBnClickedButtonSvnTry()
+ {
+ UpdateData( TRUE);
+ if( m_sourceControlType != 1 || m_svnUrl.IsEmpty()) {
+ AfxMessageBox( "Please select Subversion for the Source Control option and provide a URL for the server");
+ return;
+ }
+ if( m_svnAccessMethod != 0 && m_svnAccessMethod != 1) {
+ AfxMessageBox( "Please select how to invoke Subversion. Through API or Cmd.exe?");
+ return;
+ }
+
+ CComPtr<ISvnTester> p;
+ p.CoCreateInstance( L"Mga.XmlbackEnd.SvnTester");
+ if( !p) {
+ AfxMessageBox( "Test connection failed because could not create test object.");
+ return;
+ }
+
+ CComBSTR url = m_svnUrl;
+ CComBSTR res;
+ VARIANT_BOOL byapi = m_svnAccessMethod == 0?VARIANT_TRUE : VARIANT_FALSE;
+
+ if( SUCCEEDED( p->info( url, byapi, VARIANT_FALSE, &res)))
+ {
+ CString r; CopyTo( res, r);
+ r.Replace( "\n", "\r\n");
+
+ CComPtr<ISvnWorkBench> wb;
+ HRESULT hr = wb.CoCreateInstance( L"Mga.XmlBackEnd.SvnWorkBench");
+ if( FAILED( hr) || !wb) {
+ AfxMessageBox( "Could not create Svn Work Bench to show the result!");
+ return;
+ }
+
+ wb->ShowResultDlg( CComBSTR( (LPCTSTR) r));
+ }
+ else
+ AfxMessageBox( "Test connection failed with " + m_svnUrl);
+ }
Index: GMEView.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEView.cpp,v
retrieving revision 1.196
retrieving revision 1.197
diff -C2 -d -r1.196 -r1.197
*** GMEView.cpp 27 Sep 2007 12:22:46 -0000 1.196
--- GMEView.cpp 7 Feb 2008 22:54:48 -0000 1.197
***************
*** 4219,4222 ****
--- 4219,4223 ----
CComPtr<IMgaReference> ref;
CComPtr<IMgaFCO> referred;
+ CComBSTR referred_id;
if(FAILED(mgaFco.QueryInterface(&model))) { // it is not a model
if(SUCCEEDED(mgaFco.QueryInterface(&ref))) { // it is a reference
***************
*** 4226,4230 ****
--- 4227,4234 ----
COMTHROW(ref->get_Referred(&referred));
if(referred)
+ {
COMTHROW(referred->GetParent(&obj));
+ COMTHROW(referred->get_ID( &referred_id));
+ }
CommitTransaction();
}
***************
*** 4261,4264 ****
--- 4265,4276 ----
}
// AfxMessageBox("Referenced model is a root model. Opening model."); // instead show target selected
+ else // obj is not a model, referred is also not a model
+ {
+ CGMEConsole::theInstance->Message( "Reference target is child of a folder, thus it is shown in the TreeBrowser only.", MSG_INFO);
+ CGMEBrowser::theInstance->FocusItem( referred_id);//CComBSTR( mgaObjectId));//FireLocateMgaObject( (LPCTSTR) (CString) referred_id);
+ //CGMEBrowser::theInstance->FocusItem( CComBSTR( (LPCTSTR) CString( referred_id)));
+ CScrollZoomView::OnLButtonDblClk(nFlags, point);
+ return;
+ }
}
}
***************
*** 7375,7378 ****
--- 7387,7392 ----
CComPtr<IMgaModel> next_mod;
CComPtr<IMgaFCO> next_fco;
+ CComBSTR special_case_id_of_next_fco; // next_fco might sit in a folder, we will
+ // focus on it in the treebrowser in this case
CComQIPtr<IMgaReference> rf( fco);
try {
***************
*** 7394,7398 ****
if( parent)
{
! COMTHROW( parent.QueryInterface( &next_mod));
}
}
--- 7408,7414 ----
if( parent)
{
! HRESULT hr = parent.QueryInterface( &next_mod);
! if( FAILED( hr)) // next_fco is sitting in a folder
! COMTHROW( next_fco->get_ID( &special_case_id_of_next_fco));
}
}
***************
*** 7406,7410 ****
}
! if( next_fco && next_mod) ShowModel( next_mod);
}
}
--- 7422,7431 ----
}
! if( special_case_id_of_next_fco.Length() > 0)
! {
! CGMEConsole::theInstance->Message( "Reference target is child of a folder, thus it is shown in the TreeBrowser only.", MSG_INFO);
! CGMEBrowser::theInstance->FocusItem( special_case_id_of_next_fco);
! }
! else if( next_fco && next_mod) ShowModel( next_mod);
}
}
Index: resource.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/resource.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** resource.h 26 Sep 2007 19:04:46 -0000 1.74
--- resource.h 7 Feb 2008 22:54:48 -0000 1.75
***************
*** 96,99 ****
--- 96,100 ----
#define IDC_CHECK1 1017
#define IDC_PRIORITY_CHECK 1017
+ #define IDC_CHECK_SPLITTOSUBDIRS 1017
#define IDC_MODELETC 1018
#define IDC_PRIORITY_CHECK2 1018
***************
*** 149,152 ****
--- 150,154 ----
#define IDC_PREVIEWBTN 1087
#define IDC_COMBO1 1088
+ #define IDC_COMBO_SPLITALG 1088
#define IDC_EDIT1 1089
#define IDC_EDIT_LOCATION 1089
***************
*** 165,168 ****
--- 167,171 ----
#define IDC_PARADIGM_COMMENT 1097
#define IDC_PARADIGM_GUID 1098
+ #define IDC_EDIT_SVNDATABASE 1098
#define IDC_CONSOLE_CTRL 1100
#define IDC_RADIO_VSS 1101
***************
*** 173,176 ****
--- 176,188 ----
#define IDC_STATIC_VSSPROJ 1106
#define IDC_GMEACTIVEBROWSERCTRL1 1107
+ #define IDC_RADIO_SUBVERSION 1107
+ #define IDC_STATIC_SVN 1108
+ #define IDC_STATIC_SUBVERSION 1109
+ #define IDC_STATIC_SUBVERSION_URLLABEL 1110
+ #define IDC_RADIO_SVNAPI 1111
+ #define IDC_RADIO_SVNCMDL 1112
+ #define IDC_STATIC_SUBVERSION2 1113
+ #define IDC_BUTTON_SVNTRY 1114
+ #define IDC_STATIC_SVN_SECTION1 1115
#define IDD_PRINT_DIALOG 1538
#define IDD_PRINTSETUP_DIALOG 1539
***************
*** 395,398 ****
--- 407,411 ----
#define ID_BUTTON33044 33044
#define ID_VIEW_CLEARCONSOLE 33045
+ #define ID_MULTIUSER_SUBVERSION 33046
#define IDW_TOOLBAR_MAIN 0xE820
#define IDW_TOOLBAR_WINS 0xE821
***************
*** 407,412 ****
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 214
! #define _APS_NEXT_COMMAND_VALUE 33046
! #define _APS_NEXT_CONTROL_VALUE 1111
#define _APS_NEXT_SYMED_VALUE 115
#endif
--- 420,425 ----
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 214
! #define _APS_NEXT_COMMAND_VALUE 33047
! #define _APS_NEXT_CONTROL_VALUE 1124
#define _APS_NEXT_SYMED_VALUE 115
#endif
Index: NewXmlbackendProjDlg.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/NewXmlbackendProjDlg.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NewXmlbackendProjDlg.h 14 Sep 2004 14:12:52 -0000 1.1
--- NewXmlbackendProjDlg.h 7 Feb 2008 22:54:48 -0000 1.2
***************
*** 24,36 ****
CEdit m_vssPathCtrl;
CEdit m_vssDatabaseCtrl;
CButton m_vssBrowseButton;
CStatic m_vssProjLabel;
CStatic m_vssDbLabel;
CButton m_vssBorder;
CString m_location;
CString m_projectName;
CString m_vssDatabase;
CString m_vssPath;
! int m_sourceControlType;
//}}AFX_DATA
--- 24,44 ----
CEdit m_vssPathCtrl;
CEdit m_vssDatabaseCtrl;
+ CEdit m_svnUrlCtrl;
CButton m_vssBrowseButton;
CStatic m_vssProjLabel;
CStatic m_vssDbLabel;
+ CStatic m_svnUrlLabel;
CButton m_vssBorder;
+ CButton m_svnBorder;
+ CButton m_svnTryBtn;
CString m_location;
CString m_projectName;
CString m_vssDatabase;
CString m_vssPath;
! CString m_svnUrl;
! int m_sourceControlType;
! int m_hashedFileStorage;
! int m_svnAccessMethod;
! CComboBox m_hashAlgoControl;
//}}AFX_DATA
***************
*** 47,52 ****
// Implementation
protected:
! void enableSourceSafeControls( bool enable );
// Generated message map functions
--- 55,62 ----
// Implementation
protected:
! void enableSourceSafeControls( bool enable );
! void enableSubversionControls( bool enable );
+ virtual BOOL OnInitDialog();
// Generated message map functions
***************
*** 56,59 ****
--- 66,71 ----
virtual void OnOK();
afx_msg void OnSourceControlChanged();
+ afx_msg void OnBnClickedCheckSplittosubdirs();
+ afx_msg void OnBnClickedButtonSvnTry();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
Index: GME.rc
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GME.rc,v
retrieving revision 1.162
retrieving revision 1.163
diff -C2 -d -r1.162 -r1.163
*** GME.rc 27 Sep 2007 12:22:46 -0000 1.162
--- GME.rc 7 Feb 2008 22:54:48 -0000 1.163
***************
*** 233,236 ****
--- 233,237 ----
MENUITEM "Show &Owner...", ID_MULTIUSER_SHOWOWNER
MENUITEM "&Active Users...", ID_MULTIUSER_ACTIVEUSERS
+ MENUITEM "&Subversion...", ID_MULTIUSER_SUBVERSION
END
END
***************
*** 349,352 ****
--- 350,355 ----
MENUITEM "Show &Owner...", ID_MULTIUSER_SHOWOWNER
MENUITEM "&Active Users...", ID_MULTIUSER_ACTIVEUSERS
+ MENUITEM "&Subversion...", ID_MULTIUSER_SUBVERSION
+
END
END
***************
*** 1002,1032 ****
END
! IDD_NEW_MULTIUSER_PROJ_DLG DIALOGEX 0, 0, 373, 204
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "New Multiuser Project"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
! GROUPBOX "",IDC_STATIC,7,7,359,51
! LTEXT "&Project Location:",IDC_STATIC,13,20,85,8
! EDITTEXT IDC_EDIT_LOCATION,98,17,241,14,ES_AUTOHSCROLL
! PUSHBUTTON "...",IDC_BUTTON_BROWSE_LOC,345,17,15,14
! LTEXT "P&roject Name:",IDC_STATIC,13,40,85,8
! EDITTEXT IDC_EDIT_PROJNAME,98,37,241,14,ES_AUTOHSCROLL
! GROUPBOX "Source control",IDC_STATIC,7,62,359,35
CONTROL "Visual SourceSafe",IDC_RADIO_VSS,"Button",
! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,46,77,80,10
CONTROL "Rational ClearCase",IDC_RADIO_CLEARCASE,"Button",
! BS_AUTORADIOBUTTON,146,77,80,10
! CONTROL "None",IDC_RADIO_NONE,"Button",BS_AUTORADIOBUTTON,246,77,
! 80,10
! GROUPBOX "Visual SourceSafe",IDC_STATIC_VSS,7,101,359,67
! LTEXT "SourceSafe Database:",IDC_STATIC_VSSDB,13,118,70,8
! EDITTEXT IDC_EDIT_VSSDATABASE,98,115,241,14,ES_AUTOHSCROLL
! PUSHBUTTON "...",IDC_BUTTON_BROWSE_VSSDB,345,115,15,14
LTEXT "SourceSafe Project (parent):\nEg.:$/projects",
! IDC_STATIC_VSSPROJ,13,137,78,27
! EDITTEXT IDC_EDIT_VSSPATH,98,138,241,14,ES_AUTOHSCROLL
! DEFPUSHBUTTON "OK",IDOK,129,177,50,14
! PUSHBUTTON "Cancel",IDCANCEL,194,177,50,14
END
--- 1005,1056 ----
END
! IDD_NEW_MULTIUSER_PROJ_DLG DIALOGEX 0, 0, 373, 237
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "New Multiuser Project"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
! GROUPBOX "",IDC_STATIC,4,3,362,51
! LTEXT "&Project Location:",IDC_STATIC,13,17,85,8
! EDITTEXT IDC_EDIT_LOCATION,98,14,241,14,ES_AUTOHSCROLL
! PUSHBUTTON "...",IDC_BUTTON_BROWSE_LOC,342,15,15,14
! LTEXT "P&roject Name:",IDC_STATIC,13,39,85,8
! EDITTEXT IDC_EDIT_PROJNAME,98,36,112,14,ES_AUTOHSCROLL
! CONTROL "Split Project Into Subdirectories",
! IDC_CHECK_SPLITTOSUBDIRS,"Button",BS_AUTOCHECKBOX |
! WS_TABSTOP,214,38,112,10
! COMBOBOX IDC_COMBO_SPLITALG,327,36,31,38,CBS_DROPDOWN | CBS_SORT |
! WS_VSCROLL | WS_TABSTOP
! GROUPBOX "Source Control",IDC_STATIC,4,58,362,26
CONTROL "Visual SourceSafe",IDC_RADIO_VSS,"Button",
! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,68,68,80,10
! CONTROL "Subversion",IDC_RADIO_SUBVERSION,"Button",
! BS_AUTORADIOBUTTON,152,68,58,10
CONTROL "Rational ClearCase",IDC_RADIO_CLEARCASE,"Button",
! BS_AUTORADIOBUTTON,215,68,80,10
! CONTROL "None",IDC_RADIO_NONE,"Button",BS_AUTORADIOBUTTON,308,68,
! 36,10
! GROUPBOX "Visual SourceSafe",IDC_STATIC_VSS,4,85,362,67
! LTEXT "SourceSafe Database:",IDC_STATIC_VSSDB,13,102,70,8
! EDITTEXT IDC_EDIT_VSSDATABASE,98,99,241,14,ES_AUTOHSCROLL
! PUSHBUTTON "...",IDC_BUTTON_BROWSE_VSSDB,342,99,15,14
LTEXT "SourceSafe Project (parent):\nEg.:$/projects",
! IDC_STATIC_VSSPROJ,13,121,78,27
! EDITTEXT IDC_EDIT_VSSPATH,98,122,241,14,ES_AUTOHSCROLL
! GROUPBOX "Subversion",IDC_STATIC_SVN,4,154,362,58
! EDITTEXT IDC_EDIT_SVNDATABASE,37,165,302,14,ES_AUTOHSCROLL
! PUSHBUTTON "Try",IDC_BUTTON_SVNTRY,343,165,16,14
! LTEXT "Examples: svn+ssh://username@svn.example.com/repository/projects",
! IDC_STATIC_SUBVERSION,13,181,224,8
! LTEXT "https://svn.server.example.com/repository/projects",
! IDC_STATIC_SUBVERSION2,46,192,162,8
! GROUPBOX "Use Subversion Through",IDC_STATIC_SVN_SECTION1,245,180,
! 115,25
! CONTROL "API",IDC_RADIO_SVNAPI,"Button",BS_AUTORADIOBUTTON |
! WS_GROUP | WS_TABSTOP,259,191,27,10
! CONTROL "CMD.exe",IDC_RADIO_SVNCMDL,"Button",BS_AUTORADIOBUTTON,
! 302,192,45,10
! DEFPUSHBUTTON "OK",IDOK,129,216,50,14
! PUSHBUTTON "Cancel",IDCANCEL,194,216,50,14
! LTEXT "URL:",IDC_STATIC_SUBVERSION_URLLABEL,13,168,20,8
END
***************
*** 1253,1265 ****
IDD_NEW_MULTIUSER_PROJ_DLG, DIALOG
BEGIN
! LEFTMARGIN, 7
RIGHTMARGIN, 366
- VERTGUIDE, 13
- VERTGUIDE, 98
- VERTGUIDE, 339
- VERTGUIDE, 345
TOPMARGIN, 7
! BOTTOMMARGIN, 197
! HORZGUIDE, 177
END
--- 1277,1284 ----
IDD_NEW_MULTIUSER_PROJ_DLG, DIALOG
BEGIN
! LEFTMARGIN, 4
RIGHTMARGIN, 366
TOPMARGIN, 7
! BOTTOMMARGIN, 230
END
***************
*** 1317,1320 ****
--- 1336,1348 ----
0x0000, 0x0000, 0x0000, 0x0001, 0x3acf, 0x0000, 0x085f, 0x0000, 0x0000,
0x0000,
+ 0
+ END
+
+ IDD_NEW_MULTIUSER_PROJ_DLG DLGINIT
+ BEGIN
+ IDC_COMBO_SPLITALG, 0x403, 5, 0
+ 0x3034, 0x3639, "\000"
+ IDC_COMBO_SPLITALG, 0x403, 4, 0
+ 0x3532, 0x0036,
0
END
- Previous message: [GME-commit] GMESRC/GME/XmlBackEnd CoreXmlFile.cpp, 1.24, 1.25 SvnConfig.h, 1.1, 1.2 SvnExec.cpp, 1.1, 1.2 SvnExec.rgs, 1.1, 1.2 SvnTester.cpp, 1.1, 1.2 XmlBackEnd.vcproj, 1.4, 1.5
- Next message: [GME-commit] GMESRC/GME/PartBrowser - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list