[GME-commit] GMESRC/GME/XmlBackEnd SvnBench.cpp, NONE, 1.1 SvnBench.h, NONE, 1.1 SvnHelper.cpp, NONE, 1.1 SvnHelper.h, NONE, 1.1 SvnLoginDlg.cpp, NONE, 1.1 SvnLoginDlg.h, NONE, 1.1 SvnTestDlg.cpp, NONE, 1.1 SvnTestDlg.h, NONE, 1.1 SvnWorkBench.cpp, NONE, 1.1 SvnWorkBench.h, NONE, 1.1 SvnWorkBench.rgs, NONE, 1.1 CertificateDlg.cpp, 1.1, 1.2 CertificateDlg.h, 1.1, 1.2 CoreXmlFile.cpp, 1.25, 1.26 CoreXmlFile.h, 1.9, 1.10 CredentialDlg.cpp, 1.1, 1.2 CredentialDlg.h, 1.1, 1.2 OperOptions.cpp, 1.1, 1.2 OperOptions.h, 1.1, 1.2 SvnConfig.h, 1.2, 1.3 SvnExec.cpp, 1.2, 1.3 SvnExec.h, 1.1, 1.2 SvnTester.cpp, 1.2, 1.3 SvnTester.h, 1.1, 1.2 VSSLoginDlg.cpp, 1.3, 1.4 VSSLoginDlg.h, 1.3, 1.4 XmlBackEnd.idl, 1.2, 1.3 XmlBackEnd.rc, 1.6, 1.7 XmlBackEnd.vcproj, 1.5, 1.6 resource.h, 1.4, 1.5 svauto.idl, 1.1, 1.2
Log messages of CVS commits
gme-commit at list.isis.vanderbilt.edu
Wed Feb 13 12:54:59 CST 2008
- Previous message: [GME-commit] GMESRC/GME/Lib libapr.dll, NONE, 1.1 libapr.lib, NONE, 1.1 libapr.pdb, NONE, 1.1 libaprD.dll, NONE, 1.1 libaprD.lib, NONE, 1.1 libapriconv.dll, NONE, 1.1 libapriconv.lib, NONE, 1.1 libapriconv.pdb, NONE, 1.1 libapriconvD.dll, NONE, 1.1 libapriconvD.lib, NONE, 1.1 libaprutil.dll, NONE, 1.1 libaprutil.lib, NONE, 1.1 libaprutil.pdb, NONE, 1.1 libaprutilD.dll, NONE, 1.1 libaprutilD.lib, NONE, 1.1 libeay32.dll, NONE, 1.1 libeay32.lib, NONE, 1.1 libeay32D.dll, NONE, 1.1 libeay32D.lib, NONE, 1.1 libneon.lib, NONE, 1.1 libneonD.lib, NONE, 1.1 libsvn_client-1.lib, NONE, 1.1 libsvn_client-1D.lib, NONE, 1.1 libsvn_delta-1.lib, NONE, 1.1 libsvn_delta-1D.lib, NONE, 1.1 libsvn_diff-1.lib, NONE, 1.1 libsvn_diff-1D.lib, NONE, 1.1 libsvn_fs-1.lib, NONE, 1.1 libsvn_fs-1D.lib, NONE, 1.1 libsvn_fs_fs-1.lib, NONE, 1.1 libsvn_fs_fs-1D.lib, NONE, 1.1 libsvn_ra-1.lib, NONE, 1.1 libsvn_ra-1D.lib, NONE, 1.1 libsvn_ra_dav-1.lib, NONE, 1.1 libsvn_ra_dav-1D.lib, NONE, 1.1 libsvn_ra_local-1.lib, NONE, 1.1 libsvn_ra_local-1D.lib, NONE, 1.1 libsvn_ra_svn-1.lib, NONE, 1.1 l ibsvn_ra_svn-1D.lib, NONE, 1.1 libsvn_repos-1.lib, NONE, 1.1 libsvn_repos-1D.lib, NONE, 1.1 libsvn_subr-1.lib, NONE, 1.1 libsvn_subr-1D.lib, NONE, 1.1 libsvn_wc-1.lib, NONE, 1.1 libsvn_wc-1D.lib, NONE, 1.1 serf.lib, NONE, 1.1 serfD.lib, NONE, 1.1 ssleay32.dll, NONE, 1.1 ssleay32.lib, NONE, 1.1 ssleay32D.dll, NONE, 1.1 ssleay32D.lib, NONE, 1.1 xml.lib, NONE, 1.1 xmlD.lib, NONE, 1.1 zlibstat.lib, NONE, 1.1 zlibstatD.lib, NONE, 1.1
- Next message: [GME-commit] GMESRC/GME/XmlBackEnd/SVNCode CallLogger.cpp, NONE, 1.1 CallLogger.h, NONE, 1.1 Client.cpp, 1.1, 1.2 Client.h, 1.1, 1.2 ClientUtil.h, 1.1, 1.2 CmdClient.cpp, 1.1, 1.2 CmdClient.h, 1.1, 1.2 HiClient.cpp, 1.1, 1.2 HiClient.h, 1.1, 1.2 Path.cpp, 1.1, 1.2 Path.h, 1.1, 1.2 Pool.cpp, 1.1, 1.2 Pool.h, 1.1, 1.2 Prompter.cpp, 1.1, 1.2 Prompter.h, 1.1, 1.2 Revision.cpp, 1.1, 1.2 Revision.h, 1.1, 1.2 Targets.cpp, 1.1, 1.2 Targets.h, 1.1, 1.2 ThreadData.cpp, 1.1, 1.2 ThreadData.h, 1.1, 1.2 Util.cpp, 1.1, 1.2 Util.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /project/gme-repository/GMESRC/GME/XmlBackEnd
In directory escher:/tmp/cvs-serv7178
Modified Files:
CertificateDlg.cpp CertificateDlg.h CoreXmlFile.cpp
CoreXmlFile.h CredentialDlg.cpp CredentialDlg.h
OperOptions.cpp OperOptions.h SvnConfig.h SvnExec.cpp
SvnExec.h SvnTester.cpp SvnTester.h VSSLoginDlg.cpp
VSSLoginDlg.h XmlBackEnd.idl XmlBackEnd.rc XmlBackEnd.vcproj
resource.h svauto.idl
Added Files:
SvnBench.cpp SvnBench.h SvnHelper.cpp SvnHelper.h
SvnLoginDlg.cpp SvnLoginDlg.h SvnTestDlg.cpp SvnTestDlg.h
SvnWorkBench.cpp SvnWorkBench.h SvnWorkBench.rgs
Log Message:
Improvements/Changes.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: XmlBackEnd.rc
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/XmlBackEnd.rc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** XmlBackEnd.rc 7 Feb 2008 19:46:43 -0000 1.6
--- XmlBackEnd.rc 13 Feb 2008 18:54:57 -0000 1.7
***************
*** 91,96 ****
//
! IDD_DIALOG_VSSLOGIN DIALOGEX 0, 0, 258, 151
! STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Login to VSS Database"
FONT 8, "MS Sans Serif", 0, 0, 0x0
--- 91,96 ----
//
! IDD_DIALOG_VSSLOGIN DIALOGEX 0, 0, 258, 150
! STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Login to VSS Database"
FONT 8, "MS Sans Serif", 0, 0, 0x0
***************
*** 98,105 ****
LTEXT "This project is connected to a SourceSafe database. You have to login to the database to work with this project.",
IDC_STATIC_WELCOME,7,7,244,26
! LTEXT "Project",IDC_STATIC,9,33,22,8
! LTEXT "c:\\temp\\alma1.mgx",IDC_STATIC_PROJECT,47,33,204,20
! LTEXT "Database",IDC_STATIC,9,53,31,8
! LTEXT "c:\\temp\\almafa\\kortefa\\dinnye\\somminden\\sourcesafe.ini",
IDC_STATIC_DATABASE,47,53,204,23
LTEXT "User:",IDC_STATIC,9,81,17,8
--- 98,106 ----
LTEXT "This project is connected to a SourceSafe database. You have to login to the database to work with this project.",
IDC_STATIC_WELCOME,7,7,244,26
! LTEXT "Project:",IDC_STATIC,9,33,26,8
! LTEXT "C:\\temp\\myprojects\\project1\\project1.mgx ",
! IDC_STATIC_PROJECT,47,33,204,20
! LTEXT "Database:",IDC_STATIC,9,53,35,8
! LTEXT "\\\\Atlantis\\project\\GME\\multiusertest\\AVSS\\srcsafe.ini",
IDC_STATIC_DATABASE,47,53,204,23
LTEXT "User:",IDC_STATIC,9,81,17,8
***************
*** 107,112 ****
LTEXT "Password:",IDC_STATIC,9,101,33,8
EDITTEXT IDC_EDIT_PWD,47,99,186,14,ES_PASSWORD | ES_AUTOHSCROLL
! DEFPUSHBUTTON "OK",IDOK,65,120,50,14
! PUSHBUTTON "Cancel",IDCANCEL,152,120,50,14
END
--- 108,114 ----
LTEXT "Password:",IDC_STATIC,9,101,33,8
EDITTEXT IDC_EDIT_PWD,47,99,186,14,ES_PASSWORD | ES_AUTOHSCROLL
! DEFPUSHBUTTON "OK",IDOK,47,122,50,14
! PUSHBUTTON "Cancel",IDCANCEL,110,122,50,14
! PUSHBUTTON "Abort",IDC_ABORT,172,122,50,14
END
***************
*** 134,157 ****
END
! IDD_DIALOG1 DIALOGEX 0, 0, 259, 93
! STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
! WS_SYSMENU
! CAPTION "Credentials"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
! DEFPUSHBUTTON "OK",IDOK,202,7,50,14
! PUSHBUTTON "Cancel",IDCANCEL,202,29,50,14
CONTROL "May save?",IDC_MAYBESAVED,"Button",BS_AUTOCHECKBOX |
! WS_TABSTOP,201,70,50,10
! LTEXT "Please authenticate yourself:",IDC_STATIC1,7,7,187,19
! EDITTEXT IDC_EDITNAME,7,37,186,13,ES_AUTOHSCROLL
! EDITTEXT IDC_EDITWORD,7,68,186,13,ES_PASSWORD | ES_AUTOHSCROLL
! LTEXT "Password",IDC_STATIC,7,57,32,8
! LTEXT "Username",IDC_STATIC,7,25,33,8
END
! IDD_DIALOG2 DIALOGEX 0, 0, 443, 127
! STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
! WS_SYSMENU
CAPTION "Accept Certificate?"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
--- 136,161 ----
END
! IDD_DIALOG1 DIALOGEX 0, 0, 266, 97
! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU |
! WS_THICKFRAME
! CAPTION "Authentication Challenge"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
! DEFPUSHBUTTON "OK",IDOK,209,7,50,14
! PUSHBUTTON "Cancel",IDCANCEL,209,29,50,14
CONTROL "May save?",IDC_MAYBESAVED,"Button",BS_AUTOCHECKBOX |
! WS_TABSTOP,207,77,50,10
! LTEXT "Please authenticate yourself:",IDC_STATIC1,7,7,187,9
! EDITTEXT IDC_EDIT_REALM,7,17,186,14,ES_AUTOHSCROLL | ES_READONLY |
! NOT WS_VISIBLE
! LTEXT "Username",IDC_STATIC,7,33,33,8
! EDITTEXT IDC_EDITNAME,7,44,186,13,ES_AUTOHSCROLL
! LTEXT "Password",IDC_STATIC,7,65,32,8
! EDITTEXT IDC_EDITWORD,7,75,186,13,ES_PASSWORD | ES_AUTOHSCROLL
END
! IDD_DIALOG2 DIALOGEX 0, 0, 350, 126
! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU |
! WS_THICKFRAME
CAPTION "Accept Certificate?"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
***************
*** 159,172 ****
CONTROL "Accept &Permanently",IDC_RADIO1,"Button",
BS_AUTORADIOBUTTON | BS_PUSHLIKE | WS_GROUP | WS_TABSTOP,
! 257,97,114,14
! DEFPUSHBUTTON "OK",IDOK,386,7,50,14
! PUSHBUTTON "Cancel",IDCANCEL,386,24,50,14
CONTROL "&Reject",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON |
BS_PUSHLIKE | WS_TABSTOP,16,97,37,14
CONTROL "Accept &Temporarily",IDC_RADIO2,"Button",
! BS_AUTORADIOBUTTON | BS_PUSHLIKE | WS_TABSTOP,152,97,93,
14
! EDITTEXT IDC_EDITTEXT,7,7,366,85,ES_MULTILINE | ES_AUTOHSCROLL |
! ES_READONLY
END
--- 163,243 ----
CONTROL "Accept &Permanently",IDC_RADIO1,"Button",
BS_AUTORADIOBUTTON | BS_PUSHLIKE | WS_GROUP | WS_TABSTOP,
! 170,97,114,14
! DEFPUSHBUTTON "OK",IDOK,293,7,50,14
! PUSHBUTTON "Cancel",IDCANCEL,293,24,50,14
CONTROL "&Reject",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON |
BS_PUSHLIKE | WS_TABSTOP,16,97,37,14
CONTROL "Accept &Temporarily",IDC_RADIO2,"Button",
! BS_AUTORADIOBUTTON | BS_PUSHLIKE | WS_TABSTOP,65,97,93,
14
! EDITTEXT IDC_EDITTEXT,7,7,278,85,ES_MULTILINE | ES_AUTOHSCROLL |
! ES_READONLY | WS_VSCROLL | WS_HSCROLL
! END
!
! IDD_TESTRESULTDIALOG DIALOGEX 0, 0, 352, 137
! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU |
! WS_THICKFRAME
! CAPTION "Results"
! FONT 8, "MS Shell Dlg", 400, 0, 0x1
! BEGIN
! DEFPUSHBUTTON "Close",IDOK,295,116,50,14
! EDITTEXT IDC_EDIT1,7,7,338,105,ES_MULTILINE | ES_AUTOHSCROLL |
! ES_READONLY | WS_VSCROLL | WS_HSCROLL
! END
!
! IDD_SVN_BENCH_DIALOG DIALOGEX 0, 0, 246, 108
! STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU |
! WS_THICKFRAME
! CAPTION "Svn Testbench"
! FONT 8, "MS Shell Dlg", 400, 0, 0x1
! BEGIN
! PUSHBUTTON "Close",IDC_CLOSE_BUTTON,178,84,50,14
! COMBOBOX IDC_COMBO_URL_AND_PATH,7,26,232,55,CBS_DROPDOWN |
! CBS_SORT | WS_VSCROLL | WS_TABSTOP
! CONTROL "Recursive",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
! WS_TABSTOP,23,45,47,10
! CONTROL "API",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP |
! WS_TABSTOP,142,45,27,10
! CONTROL "Cmd.exe",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,173,45,
! 45,10
! PUSHBUTTON "&Info",IDC_INFO_BUTTON,13,62,50,14
! PUSHBUTTON "&Status",IDC_STATUS_BUTTON,68,62,50,14
! PUSHBUTTON "&Commit",IDC_COMMIT_BUTTON,123,62,50,14
! PUSHBUTTON "Clean&Up",IDC_CLEANUP_BUTTON,178,62,50,14
! PUSHBUTTON "&Resolve",IDC_RESOLVE_BUTTON,13,84,50,14
! PUSHBUTTON "Cmd.e&xe",IDC_CMDEXE_BUTTON,68,84,50,14
! PUSHBUTTON "Check&Out",IDC_CHECKOUT_BUTTON,123,84,50,14
! LTEXT "Url or Path",IDC_STATIC,11,14,35,8
! END
!
! IDD_DIALOG_SVNLOGIN DIALOGEX 0, 0, 316, 150
! STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
! CAPTION "Subversion Default Credentials"
! FONT 8, "MS Sans Serif", 0, 0, 0x0
! BEGIN
! LTEXT "Note: The information you provide will be set in SVN as the default username and/or password.\nIf these turn out not to be sufficient, SVN will show a dialog where further details are asked.",
! IDC_STATIC_WELCOME,7,97,302,16
! LTEXT "Project:",IDC_STATIC,9,10,26,8
! LTEXT "C:\\temp\\myprojects\\project1\\project1.mgx ",
! IDC_STATIC_PROJECT,40,10,263,8
! LTEXT "URL:",IDC_STATIC,9,23,21,8
! LTEXT "https://svn.isis.vanderbilt.edu/testrepo/gme/myproj1",
! IDC_STATIC_DATABASE,40,23,264,8
! LTEXT "User:",IDC_STATIC,152,55,17,8
! EDITTEXT IDC_EDIT_USER,193,52,86,14,ES_AUTOHSCROLL
! LTEXT "Password:",IDC_STATIC,152,73,33,8
! EDITTEXT IDC_EDIT_PWD,193,72,86,14,ES_PASSWORD | ES_AUTOHSCROLL
! DEFPUSHBUTTON "OK",IDOK,140,129,50,14
! PUSHBUTTON "Cancel",IDCANCEL,199,129,50,14
! PUSHBUTTON "Abort",IDC_ABORT,257,129,50,14
! CONTROL "Cached Credentials",IDC_RADIO_CACHED,"Button",
! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,30,51,77,10
! CONTROL "Username && Password",IDC_RADIO_USPW,"Button",
! BS_AUTORADIOBUTTON,30,64,89,10
! CONTROL "Public-Private Key Pair",IDC_RADIO_PPK,"Button",
! BS_AUTORADIOBUTTON,30,77,92,10
! GROUPBOX "Authentication",IDC_STATIC,7,39,300,55
! LTEXT "This happens typically during an 'Authentication Challenge' initiated by SVN.",
! IDC_STATIC_WELCOME2,7,113,302,10
END
***************
*** 185,189 ****
RIGHTMARGIN, 251
TOPMARGIN, 7
! BOTTOMMARGIN, 144
END
--- 256,260 ----
RIGHTMARGIN, 251
TOPMARGIN, 7
! BOTTOMMARGIN, 143
END
***************
*** 208,214 ****
BEGIN
LEFTMARGIN, 7
! RIGHTMARGIN, 252
TOPMARGIN, 7
! BOTTOMMARGIN, 86
END
--- 279,285 ----
BEGIN
LEFTMARGIN, 7
! RIGHTMARGIN, 259
TOPMARGIN, 7
! BOTTOMMARGIN, 90
END
***************
*** 216,222 ****
BEGIN
LEFTMARGIN, 7
! RIGHTMARGIN, 436
TOPMARGIN, 7
! BOTTOMMARGIN, 120
END
END
--- 287,317 ----
BEGIN
LEFTMARGIN, 7
! RIGHTMARGIN, 343
TOPMARGIN, 7
! BOTTOMMARGIN, 119
! END
!
! IDD_TESTRESULTDIALOG, DIALOG
! BEGIN
! LEFTMARGIN, 7
! RIGHTMARGIN, 345
! TOPMARGIN, 7
! BOTTOMMARGIN, 130
! END
!
! IDD_SVN_BENCH_DIALOG, DIALOG
! BEGIN
! LEFTMARGIN, 7
! RIGHTMARGIN, 239
! TOPMARGIN, 7
! BOTTOMMARGIN, 101
! END
!
! IDD_DIALOG_SVNLOGIN, DIALOG
! BEGIN
! LEFTMARGIN, 7
! RIGHTMARGIN, 309
! TOPMARGIN, 7
! BOTTOMMARGIN, 143
END
END
***************
*** 232,235 ****
--- 327,331 ----
IDR_SVNTESTER REGISTRY "SvnTester.rgs"
IDR_SVNEXEC REGISTRY "SvnExec.rgs"
+ IDR_SVNWORKBENCH REGISTRY "SvnWorkBench.rgs"
/////////////////////////////////////////////////////////////////////////////
Index: svauto.idl
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/svauto.idl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** svauto.idl 7 Feb 2008 19:36:06 -0000 1.1
--- svauto.idl 13 Feb 2008 18:54:57 -0000 1.2
***************
*** 28,32 ****
[id(14), helpstring("method IsLocked")] HRESULT IsLocked(BSTR path, [out] VARIANT_BOOL* isLocked, [out] BSTR* lockHolder);
[id(15), helpstring("method Init")] HRESULT Init(BSTR username, BSTR password);
! [id(16), helpstring("method Logging")] HRESULT Logging(VARIANT_BOOL onoff);
};
--- 28,33 ----
[id(14), helpstring("method IsLocked")] HRESULT IsLocked(BSTR path, [out] VARIANT_BOOL* isLocked, [out] BSTR* lockHolder);
[id(15), helpstring("method Init")] HRESULT Init(BSTR username, BSTR password);
! [id(16), helpstring("method Logging")] HRESULT Logging(VARIANT_BOOL onoff, BSTR logfile);
! [id(17), helpstring("method ReplaceUserName")] HRESULT ReplaceUserName(BSTR userName);
};
***************
*** 52,54 ****
--- 53,70 ----
[id(9), helpstring("method lock")] HRESULT lock ([in] BSTR path, [in] VARIANT_BOOL force, [in] VARIANT_BOOL byAPI);
[id(10), helpstring("method unlock")] HRESULT unlock ([in] BSTR path, [in] VARIANT_BOOL force, [in] VARIANT_BOOL byAPI);
+ };
+
+
+ [
+ object,
+ uuid(0A7E51CB-9118-4BD5-BBB6-084254944260),
+ dual,
+ nonextensible,
+ helpstring("ISvnWorkBench Interface"),
+ pointer_default(unique)
+ ]
+ interface ISvnWorkBench : IDispatch{
+ [id(1), helpstring("method ShowDlg")] HRESULT ShowWorkBenchDlg(void);
+ [id(2), helpstring("method SetClues")] HRESULT SetClues(BSTR connString);
+ [id(3), helpstring("method ShowResultDlg")] HRESULT ShowResultDlg(BSTR result);
};
Index: CertificateDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CertificateDlg.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CertificateDlg.cpp 7 Feb 2008 19:36:06 -0000 1.1
--- CertificateDlg.cpp 13 Feb 2008 18:54:57 -0000 1.2
***************
*** 3,7 ****
#include "stdafx.h"
! #include "CertificateDlg.h"
--- 3,7 ----
#include "stdafx.h"
! #include ".\CertificateDlg.h"
***************
*** 11,16 ****
CCertificateDlg::CCertificateDlg( const std::string& p_cert, bool p_permAcceptEnabled, CWnd* pParent /*=NULL*/)
: CDialog(CCertificateDlg::IDD, pParent)
! , m_text( p_cert)
, m_permAcceptEnabled( p_permAcceptEnabled)
{
--- 11,18 ----
CCertificateDlg::CCertificateDlg( const std::string& p_cert, bool p_permAcceptEnabled, CWnd* pParent /*=NULL*/)
: CDialog(CCertificateDlg::IDD, pParent)
! , m_certDetails( p_cert)
, m_permAcceptEnabled( p_permAcceptEnabled)
+ , m_leftPad( 20)
+ , m_rightPad( 20)
{
***************
*** 24,27 ****
--- 26,30 ----
{
CDialog::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_EDITTEXT, m_textBox);
}
***************
*** 29,32 ****
--- 32,36 ----
BEGIN_MESSAGE_MAP(CCertificateDlg, CDialog)
ON_BN_CLICKED(IDOK, OnBnClickedOk)
+ ON_WM_SIZE()
END_MESSAGE_MAP()
***************
*** 38,45 ****
CDialog::OnInitDialog();
! CWnd * txt = GetDlgItem(IDC_EDITTEXT);
! if( txt) txt->SetWindowText( m_text.c_str());
! // TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
--- 42,61 ----
CDialog::OnInitDialog();
! m_textBox.SetWindowText( m_certDetails.c_str());
!
! CRect box_rect;
! if( m_textBox.GetSafeHwnd()) {
! m_textBox.GetWindowRect( &box_rect);
! ScreenToClient( &box_rect);
+ CRect win_rect;
+ GetWindowRect( &win_rect);
+ ScreenToClient( &win_rect);
+
+ // initing m_leftPad, m_rightPad with the initial lf and rt margins
+ m_leftPad = box_rect.left - win_rect.left;
+ m_rightPad = win_rect.right - box_rect.right;
+ }
+
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
***************
*** 55,68 ****
m_response = Response::PermanentAccept;
! if( rdo1->GetCheck() == BST_CHECKED)
m_response = Response::PermanentAccept;
! else if( rdo2->GetCheck() == BST_CHECKED)
m_response = Response::TemoraryAccept;
! else if( rdo2->GetCheck() == BST_CHECKED)
m_response = Response::Reject;
if( !m_permAcceptEnabled && m_response == Response::PermanentAccept)
{
! AfxMessageBox( "Permanent accept is not a valid option");
return;
}
--- 71,92 ----
m_response = Response::PermanentAccept;
! if( rdo1 && rdo1->GetCheck() == BST_CHECKED)
m_response = Response::PermanentAccept;
! else if( rdo2 && rdo2->GetCheck() == BST_CHECKED)
m_response = Response::TemoraryAccept;
! else if( rdo3 && rdo3->GetCheck() == BST_CHECKED)
m_response = Response::Reject;
+ else
+ {
+ AfxMessageBox( "Before closing the dialog please select one option from Reject, Temporary Accept and Permanent Accept!");
+ return;
+ }
+ //"Would you like to reject the certificate? It will not allow connections to the server.",
+ if( m_response == Response::Reject && IDNO == AfxMessageBox( "Warning: Rejecting the certificate will cause connections to this server to fail. Continue?", MB_YESNO))
+ return;
if( !m_permAcceptEnabled && m_response == Response::PermanentAccept)
{
! AfxMessageBox( "Permanent accept is not a valid option!");
return;
}
***************
*** 74,76 ****
--- 98,127 ----
{
return m_response;
+ }
+
+ void CCertificateDlg::OnSize(UINT nType, int cx, int cy)
+ {
+ CDialog::OnSize(nType, cx, cy);
+
+ CButton* ok_btn = (CButton*) GetDlgItem( IDOK);
+ CButton* ca_btn = (CButton*) GetDlgItem( IDCANCEL);
+
+ CRect box_rect, ok_rect, ca_rect;
+ if ( m_textBox.GetSafeHwnd()
+ && ok_btn && ok_btn->GetSafeHwnd()
+ && ca_btn && ca_btn->GetSafeHwnd())
+ {
+ m_textBox.GetWindowRect( &box_rect);
+ ScreenToClient( &box_rect);
+
+ ok_btn->GetWindowRect( &ok_rect);
+ ScreenToClient( &ok_rect);
+
+ ca_btn->GetWindowRect( &ca_rect);
+ ScreenToClient( &ca_rect);
+
+ m_textBox.SetWindowPos( NULL, m_leftPad, box_rect.top, cx - m_leftPad - m_rightPad, box_rect.Height(), SWP_NOZORDER);
+ ok_btn->SetWindowPos( NULL, cx - ok_rect.Width() - m_leftPad, ok_rect.top, ok_rect.Width(), ok_rect.Height(), SWP_NOZORDER);
+ ca_btn->SetWindowPos( NULL, cx - ca_rect.Width() - m_leftPad, ca_rect.top, ca_rect.Width(), ca_rect.Height(), SWP_NOZORDER);
+ }
}
Index: OperOptions.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/OperOptions.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** OperOptions.h 7 Feb 2008 19:36:06 -0000 1.1
--- OperOptions.h 13 Feb 2008 18:54:57 -0000 1.2
***************
*** 26,29 ****
--- 26,30 ----
bool m_measureTime;
bool m_createLog;
+ bool m_createSvnLog;
bool m_doRefTargetLock;
bool m_doConnEndPointLock;
***************
*** 38,41 ****
--- 39,43 ----
int m_dirNamesHashVal;
double m_purgeDelayFactor;
+ std::string m_svnLogFileName;
std::string m_nameParadigmFile;
std::string m_defUserName;
Index: CoreXmlFile.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CoreXmlFile.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CoreXmlFile.h 7 Feb 2008 19:57:06 -0000 1.9
--- CoreXmlFile.h 13 Feb 2008 18:54:57 -0000 1.10
***************
*** 12,15 ****
--- 12,16 ----
#include "ccauto.h"
#include "svauto.h"
+ #include "XmlBackEnd.h" // for EXTERN_C const CLSID CLSID_CoreXmlFile;
#include "CmdClient.h"
#include "OperOptions.h"
***************
*** 446,450 ****
public IDispatchImpl<ICoreStorage, &IID_ICoreStorage, &LIBID_CORELib>,
public ISupportErrorInfoImpl<&IID_ICoreStorage>,
! public CComCoClass<CCoreXmlFile, &CLSID_CoreBinFile>
{
public:
--- 447,451 ----
public IDispatchImpl<ICoreStorage, &IID_ICoreStorage, &LIBID_CORELib>,
public ISupportErrorInfoImpl<&IID_ICoreStorage>,
! public CComCoClass<CCoreXmlFile, &CLSID_CoreXmlFile>
{
public:
***************
*** 531,534 ****
--- 532,537 ----
void svnSshHandling ();
std::string svnSshMangling ( const std::string& p_url);
+ std::string userNameFromSvnSshUrl ();
+ bool isUrlSvnSsh ();
void svnOptions ();
***************
*** 634,638 ****
// source control
! bool getSourceSafeUserInfo ( int p_svnText = 0);
CComObjPtr<IVSSItem> createFolderSS( CComObjPtr<IVSSItem> p_parentItem, CComBSTR p_subProjName, CComBSTR p_localSpec);
--- 637,641 ----
// source control
! bool getUserCredentialInfo ( int p_svnText, bool p_requireLogin);
CComObjPtr<IVSSItem> createFolderSS( CComObjPtr<IVSSItem> p_parentItem, CComBSTR p_subProjName, CComBSTR p_localSpec);
***************
*** 727,731 ****
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();
--- 730,734 ----
bool commitSVN ( const std::string& p_dirOrFile, bool p_initialCommit = false, bool p_noUnlock = false);
bool updateSVN ( const std::string& p_dirOrFile);
! void svnSetup ( bool createOrOpen);
void testSubversion ();
void createSubversionClientImpl();
***************
*** 752,755 ****
--- 755,759 ----
bool refreshSignFile ();
+ void replaceUserName ( const std::string& p_username);
std::string userName ();
inline bool isSS ();
--- NEW FILE: SvnWorkBench.h ---
// SvnWorkBench.h : Declaration of the CSvnWorkBench
#pragma once
#include "XmlBackEnd.h"
#include "resource.h" // main symbols
#include <comsvcs.h>
// CSvnWorkBench
class ATL_NO_VTABLE CSvnWorkBench :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CSvnWorkBench, &CLSID_SvnWorkBench>,
public IDispatchImpl<ISvnWorkBench, &IID_ISvnWorkBench, &LIBID_XMLBACKENDLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
CSvnWorkBench()
{
}
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_SVNWORKBENCH)
DECLARE_NOT_AGGREGATABLE(CSvnWorkBench)
BEGIN_COM_MAP(CSvnWorkBench)
COM_INTERFACE_ENTRY(ISvnWorkBench)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
protected:
CComBSTR m_clue;
// ISvnWorkBench
public:
STDMETHOD(ShowWorkBenchDlg)(void);
STDMETHOD(SetClues)(BSTR connString);
STDMETHOD(ShowResultDlg)(BSTR result);
};
OBJECT_ENTRY_AUTO(__uuidof(SvnWorkBench), CSvnWorkBench)
--- NEW FILE: SvnHelper.cpp ---
#include "stdafx.h"
#include "SvnHelper.h"
#include "SvnTestDlg.h"
#include "svauto.h"
#include "..\Common\CommonMfc.h"
CSvnHelper::CSvnHelper(void)
{
}
CSvnHelper::~CSvnHelper(void)
{
}
//static
void CSvnHelper::invokeInfo( const std::string& p_url, bool p_apiAccess, bool p_recursive )
{
CComPtr<ISvnTester> p;
p.CoCreateInstance( L"Mga.XmlbackEnd.SvnTester");
if( !p) {
AfxMessageBox( "Info test-command failed because could not create test object.");
return;
}
CComBSTR url = p_url.c_str();
CComBSTR res;
VARIANT_BOOL byapi = p_apiAccess?VARIANT_TRUE : VARIANT_FALSE;
VARIANT_BOOL recur = p_recursive?VARIANT_TRUE : VARIANT_FALSE;
if( SUCCEEDED( p->info( url, byapi, recur, &res)))
{
CString r; CopyTo( res, r);
r.Replace( "\n", "\r\n");
CSvnTestDlg d;
d.setContent( r);
d.DoModal();
//AfxMessageBox( r);
}
else
AfxMessageBox( ("Info test-command failed with " + p_url).c_str());
}
//static
void CSvnHelper::invokeStatus( const std::string& p_localPath, bool p_apiAccess)
{
CComPtr<ISvnTester> p;
p.CoCreateInstance( L"Mga.XmlbackEnd.SvnTester");
if( !p) {
AfxMessageBox( "Status test-command failed because could not create test object.");
return;
}
CComBSTR path = p_localPath.c_str();
CComBSTR res;
VARIANT_BOOL byapi = p_apiAccess?VARIANT_TRUE : VARIANT_FALSE;
if( SUCCEEDED( p->status( path, byapi, &res)))
{
CString r; CopyTo( res, r);
r.Replace( "\n", "\r\n");
CSvnTestDlg d;
d.setContent( r);
d.DoModal();
//AfxMessageBox( r);
}
else
AfxMessageBox( ("Status test-command failed with " + p_localPath).c_str());
}
//static
void CSvnHelper::invokeCleanUp( const std::string& p_localPath, bool p_apiAccess)
{
CComPtr<ISvnTester> p;
p.CoCreateInstance( L"Mga.XmlbackEnd.SvnTester");
if( !p) {
AfxMessageBox( "CleanUp command failed because could not create invoker object.");
return;
}
CComBSTR path = p_localPath.c_str();
CComBSTR res;
VARIANT_BOOL byapi = p_apiAccess?VARIANT_TRUE : VARIANT_FALSE;
if( SUCCEEDED( p->cleanup( path, byapi, &res)))
{
CString r; CopyTo( res, r);
r.Replace( "\n", "\r\n");
CSvnTestDlg d;
d.setContent( r);
d.DoModal();
//AfxMessageBox( r);
}
else
AfxMessageBox( ("CleanUp command failed with " + p_localPath).c_str());
}
//static
void CSvnHelper::invokeResolve( const std::string& p_localPath, bool p_apiAccess, bool p_recursive)
{
CComPtr<ISvnTester> p;
p.CoCreateInstance( L"Mga.XmlbackEnd.SvnTester");
if( !p) {
AfxMessageBox( "Resolve command failed because could not create invoker object.");
return;
}
CComBSTR path = p_localPath.c_str();
VARIANT_BOOL byapi = p_apiAccess?VARIANT_TRUE : VARIANT_FALSE;
VARIANT_BOOL recur = p_recursive?VARIANT_TRUE : VARIANT_FALSE;
if( SUCCEEDED( p->resolve( path, byapi, recur)))
AfxMessageBox( ("Resolve command executed with " + p_localPath).c_str(), MB_ICONINFORMATION);
else
AfxMessageBox( ("Resolve command failed with " + p_localPath).c_str());
}
//static
void CSvnHelper::invokeCheckout( const std::string& p_url, const std::string& p_localPath, bool p_apiAccess)
{
CComPtr<ISvnTester> p;
p.CoCreateInstance( L"Mga.XmlbackEnd.SvnTester");
if( !p) {
AfxMessageBox( "Checkout command failed because could not create invoker object.");
return;
}
CComBSTR url = p_url.c_str();
CComBSTR path = p_localPath.c_str();
VARIANT_BOOL byapi = p_apiAccess?VARIANT_TRUE : VARIANT_FALSE;
if( SUCCEEDED( p->checkout( url, path, byapi, VARIANT_TRUE)))
AfxMessageBox( ("Checkout command executed with " + p_localPath).c_str(), MB_ICONINFORMATION);
else
AfxMessageBox( ("Checkout command failed with " + p_localPath).c_str());
}
//static
void CSvnHelper::invokeCommit( const std::string& p_localPath, bool p_apiAccess)
{
CComPtr<ISvnTester> p;
p.CoCreateInstance( L"Mga.XmlbackEnd.SvnTester");
if( !p) {
AfxMessageBox( "Commit command failed because could not create invoker object.");
return;
}
CComBSTR path = p_localPath.c_str();
VARIANT_BOOL byapi = p_apiAccess?VARIANT_TRUE : VARIANT_FALSE;
if( SUCCEEDED( p->commit( path, byapi, VARIANT_TRUE)))
AfxMessageBox( ("Commit command executed with " + p_localPath).c_str(), MB_ICONINFORMATION);
else
AfxMessageBox( ("Commit command failed with " + p_localPath).c_str());
}
Index: VSSLoginDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/VSSLoginDlg.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** VSSLoginDlg.cpp 7 Feb 2008 19:46:43 -0000 1.3
--- VSSLoginDlg.cpp 13 Feb 2008 18:54:57 -0000 1.4
***************
*** 4,9 ****
#include "stdafx.h"
#include "resource.h"
! #include "VSSLoginDlg.h"
! #include ".\vsslogindlg.h"
#ifdef _DEBUG
--- 4,8 ----
#include "stdafx.h"
#include "resource.h"
! #include ".\VSSLoginDlg.h"
#ifdef _DEBUG
***************
*** 19,22 ****
--- 18,24 ----
CVSSLoginDlg::CVSSLoginDlg(CWnd* pParent /*=NULL*/)
: CDialog(CVSSLoginDlg::IDD, pParent)
+ , m_aborted( false)
+ , m_leftPad( 20)
+ , m_rightPad( 20)
{
//{{AFX_DATA_INIT(CVSSLoginDlg)
***************
*** 44,49 ****
BEGIN_MESSAGE_MAP(CVSSLoginDlg, CDialog)
//{{AFX_MSG_MAP(CVSSLoginDlg)
! // NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
--- 46,52 ----
BEGIN_MESSAGE_MAP(CVSSLoginDlg, CDialog)
//{{AFX_MSG_MAP(CVSSLoginDlg)
! ON_BN_CLICKED(IDC_ABORT, OnBnClickedAbort)
//}}AFX_MSG_MAP
+ ON_WM_SIZE()
END_MESSAGE_MAP()
***************
*** 57,63 ****
SetWindowText("Default credentials to be used");
! // TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
--- 60,111 ----
SetWindowText("Default credentials to be used");
! m_aborted = false;
!
! CWnd * db = GetDlgItem( IDC_STATIC_DATABASE);
! CRect db_rect;
! if( db && db->GetSafeHwnd()) {
! db->GetWindowRect( &db_rect);
! ScreenToClient( &db_rect);
!
! CRect win_rect;
! GetWindowRect( &win_rect);
! ScreenToClient( &win_rect);
!
! m_leftPad = db_rect.left - win_rect.left;
! m_rightPad = win_rect.right - db_rect.right;
! }
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
+ }
+
+ void CVSSLoginDlg::OnBnClickedAbort()
+ {
+ m_aborted = true;
+ EndDialog( IDCANCEL);
+ //throw hresult_exception( E_FAIL);
+ }
+
+ bool CVSSLoginDlg::wasAborted()
+ {
+ return m_aborted;
+ }
+
+ void CVSSLoginDlg::OnSize(UINT nType, int cx, int cy)
+ {
+ CDialog::OnSize(nType, cx, cy);
+
+ CWnd * db = GetDlgItem( IDC_STATIC_DATABASE);
+ CWnd * pj = GetDlgItem( IDC_STATIC_PROJECT);
+ CRect db_rect, pj_rect;
+ if( db && pj && db->GetSafeHwnd() && pj->GetSafeHwnd()) {
+ db->GetWindowRect( &db_rect);
+ pj->GetWindowRect( &pj_rect);
+ ScreenToClient( &db_rect);
+ ScreenToClient( &pj_rect);
+ int width = cx - m_leftPad - m_rightPad;
+
+ db->SetWindowPos( NULL, m_leftPad, db_rect.top, width > 20? width: 20, db_rect.Height(), SWP_NOZORDER);
+ pj->SetWindowPos( NULL, m_leftPad, pj_rect.top, width > 20? width: 20, pj_rect.Height(), SWP_NOZORDER);
+ }
}
Index: VSSLoginDlg.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/VSSLoginDlg.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** VSSLoginDlg.h 7 Feb 2008 19:46:43 -0000 1.3
--- VSSLoginDlg.h 13 Feb 2008 18:54:57 -0000 1.4
***************
*** 27,31 ****
--- 27,37 ----
//}}AFX_DATA
+ public:
+ bool wasAborted();
+ protected:
+ bool m_aborted;
+ int m_leftPad;
+ int m_rightPad;
// Overrides
// ClassWizard generated virtual function overrides
***************
*** 33,48 ****
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
-
// Generated message map functions
//{{AFX_MSG(CVSSLoginDlg)
! // NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
- public:
- virtual BOOL OnInitDialog();
};
--- 39,53 ----
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ virtual BOOL OnInitDialog();
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CVSSLoginDlg)
! afx_msg void OnBnClickedAbort();
! afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
--- NEW FILE: SvnBench.cpp ---
// SvnBench.cpp : implementation file
//
#include "stdafx.h"
#include "SvnBench.h"
#include "SvnHelper.h"
#include <process.h>
// CSvnBench dialog
IMPLEMENT_DYNAMIC(CSvnBench, CDialog)
CSvnBench::CSvnBench(CWnd* pParent /*=NULL*/)
: CDialog(CSvnBench::IDD, pParent)
, m_bRecursive(FALSE)
, m_bCmdExeOrAPI(FALSE) // API
, m_lstStringVal(_T(""))
, m_leftPad( 20)
, m_rightPad( 20)
{
}
CSvnBench::~CSvnBench()
{
}
void CSvnBench::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Check(pDX, IDC_CHECK1, m_bRecursive);
DDX_Radio(pDX, IDC_RADIO1, m_bCmdExeOrAPI);
DDX_Control(pDX, IDC_COMBO_URL_AND_PATH, m_lst);
DDX_CBString(pDX, IDC_COMBO_URL_AND_PATH, m_lstStringVal);
}
void CSvnBench::init( CString p_connString)
{
m_connStr = p_connString;
}
void CSvnBench::exec( CString p_cmd, CString p_startupDir)
{
STARTUPINFO startup_info;
PROCESS_INFORMATION process_info;
char *env_CMD = NULL;
char *default_CMD = "CMD.EXE";
char args[4096];
memset(&startup_info, 0, sizeof(startup_info)); // clear all members
startup_info.cb = sizeof(STARTUPINFO);
startup_info.dwFlags = STARTF_USESHOWWINDOW;
startup_info.wShowWindow = SW_SHOW;
args[0] = 0;
env_CMD = getenv("COMSPEC");
if(env_CMD) strcpy( args, env_CMD);
else strcpy( args, default_CMD);
strcat( args, " ");
strcat( args, (LPCTSTR) p_cmd); // p_cmd could be a subcommand of cmd.exe
// if startup dir exists
WIN32_FILE_ATTRIBUTE_DATA attr;
BOOL sc;
BOOL fexists = GetFileAttributesEx( (LPCTSTR) p_startupDir, GetFileExInfoStandard, &attr );
if( fexists)
{
if( FILE_ATTRIBUTE_DIRECTORY == ( attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{} // nop, everything all right
else // if( FILE_ATTRIBUTE_DIRECTORY != ( attr.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
p_startupDir = p_startupDir.Mid( 0, p_startupDir.ReverseFind( '\\'));
}
else
{
AfxMessageBox( "Specified startup directory not found! Defaulting to current directory.");
p_startupDir = "";
}
sc = CreateProcess( NULL, args, NULL, NULL, FALSE,
CREATE_NEW_CONSOLE, NULL, fexists? (LPCTSTR) p_startupDir : NULL,
&startup_info, &process_info
);
if( !sc)
{
long err = GetLastError();
AfxMessageBox( "Could not launch cmd.exe!");
}
}
BEGIN_MESSAGE_MAP(CSvnBench, CDialog)
ON_BN_CLICKED(IDC_INFO_BUTTON, OnBnClickedInfoButton)
ON_BN_CLICKED(IDC_STATUS_BUTTON, OnBnClickedStatusButton)
ON_BN_CLICKED(IDC_CLEANUP_BUTTON, OnBnClickedCleanupButton)
ON_BN_CLICKED(IDC_RESOLVE_BUTTON, OnBnClickedResolveButton)
ON_BN_CLICKED(IDC_COMMIT_BUTTON, OnBnClickedCommitButton)
ON_BN_CLICKED(IDC_CHECKOUT_BUTTON, OnBnClickedCheckoutButton)
ON_BN_CLICKED(IDC_CMDEXE_BUTTON, OnBnClickedCmdexeButton)
ON_BN_CLICKED(IDC_CLOSE_BUTTON, OnBnClickedCloseButton)
ON_WM_SIZE()
ON_WM_CREATE()
END_MESSAGE_MAP()
BOOL CSvnBench::OnInitDialog()
{
CDialog::OnInitDialog();
CRect lst_rect;
if( m_lst.GetSafeHwnd()) {
m_lst.GetWindowRect( &lst_rect);
ScreenToClient( &lst_rect);
CRect win_rect;
GetWindowRect( &win_rect);
ScreenToClient( &win_rect);
m_leftPad = lst_rect.left - win_rect.left;
m_rightPad = win_rect.right - lst_rect.right;
}
int p1 = m_connStr.Find( '"'); // MGX = "c:\t\myprojects\" svn="https://svn.isis.vanderbilt.edu/testrepo/gme/zoli" otherkey2="..."
int p2 = m_connStr.Find( '"', p1 + 1);
int p3 = m_connStr.Find( "svn=\"", p2 + 1);
int p4 = m_connStr.Find( '"', p3 + 6);
CString local_folder;
CString server_path;
if( p1 != -1 && p2 != -1)
local_folder = m_connStr.Mid( p1 + 1, p2 - p1 - 1);
if( p3 != -1 && p4 != -1)
server_path = m_connStr.Mid( p3 + 5, p4 - p3 - 5);
m_lst.InsertString( 0, server_path);
m_lst.InsertString( 1, local_folder);
//m_lst.SetCurSel( 0);
//m_lst.InsertString( 0, "<<select from path below>>");
m_lst.SetWindowText( "<<select from paths below>>");
return TRUE;
}
int CSvnBench::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
return 0;
}
void CSvnBench::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
CRect lst_rect;
if (m_lst.GetSafeHwnd()) {
m_lst.GetWindowRect( &lst_rect);
ScreenToClient( &lst_rect);
int width = cx - m_leftPad - m_rightPad;
m_lst.SetWindowPos( NULL, m_leftPad, lst_rect.top, width > 20? width: 20, lst_rect.Height(), SWP_NOZORDER);
}
}
// CSvnBench message handlers
void CSvnBench::OnOK()
{
// when Enter is pressed, it should not end the Dialog
//CDialog::OnOK();
}
void CSvnBench::OnBnClickedInfoButton()
{
UpdateData( TRUE);
BeginWaitCursor();
try
{
CSvnHelper::invokeInfo( (LPCTSTR) m_lstStringVal, !m_bCmdExeOrAPI, m_bRecursive != 0);
}
catch(...) { ASSERT(0); }
EndWaitCursor();
}
void CSvnBench::OnBnClickedStatusButton()
{
UpdateData( TRUE);
BeginWaitCursor();
try
{
CSvnHelper::invokeStatus( (LPCTSTR) m_lstStringVal, !m_bCmdExeOrAPI);
}
catch(...) { ASSERT(0); }
EndWaitCursor();
}
void CSvnBench::OnBnClickedCleanupButton()
{
UpdateData( TRUE);
BeginWaitCursor();
try
{
CSvnHelper::invokeCleanUp( (LPCTSTR) m_lstStringVal, !m_bCmdExeOrAPI);
}
catch(...) { ASSERT(0); }
EndWaitCursor();
}
void CSvnBench::OnBnClickedResolveButton()
{
UpdateData( TRUE);
BeginWaitCursor();
try
{
CSvnHelper::invokeResolve( (LPCTSTR) m_lstStringVal, !m_bCmdExeOrAPI, m_bRecursive != 0);
}
catch(...) { ASSERT(0); }
EndWaitCursor();
}
void CSvnBench::OnBnClickedCommitButton()
{
UpdateData( TRUE);
BeginWaitCursor();
try
{
CSvnHelper::invokeCommit( (LPCTSTR) m_lstStringVal, !m_bCmdExeOrAPI);
}
catch(...) { ASSERT(0); }
EndWaitCursor();
}
void CSvnBench::OnBnClickedCheckoutButton()
{
UpdateData( TRUE);
BeginWaitCursor();
try
{
CString url_and_loc = m_lstStringVal.Trim();
int pos = url_and_loc.Find(" ");
if( -1 == pos)
{
AfxMessageBox( "Please give two parameters for checkout, separated by space!");
EndWaitCursor();
return;
}
else
CSvnHelper::invokeCheckout( (LPCTSTR) url_and_loc.Left( pos), (LPCTSTR) url_and_loc.Mid( pos + 1), !m_bCmdExeOrAPI);
}
catch(...) { ASSERT(0); }
EndWaitCursor();
}
void CSvnBench::OnBnClickedCmdexeButton()
{
UpdateData( TRUE);
//CString cmd = "cd /d ";
//cmd += m_lstStringVal;
//CString cmd2 = "cmd.exe";
//system( (std::string( "cmd.exe /k cd /d ") + (LPCTSTR) m_lstStringVal).c_str());
//_spawnl( _P_NOWAIT, (LPCTSTR) cmd2, (LPCTSTR) cmd2, NULL );
//_spawnl( _P_NOWAIT, m_lstStringVal, m_lstStringVal);
exec( "", m_lstStringVal);
}
void CSvnBench::OnBnClickedCloseButton()
{
CDialog::EndDialog(IDOK);
}
Index: SvnTester.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/SvnTester.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SvnTester.h 7 Feb 2008 19:46:43 -0000 1.1
--- SvnTester.h 13 Feb 2008 18:54:57 -0000 1.2
***************
*** 3,7 ****
#pragma once
#include "XmlBackEnd.h"
- #include "svauto.h"
#include "HiClient.h"
#include "CmdClient.h"
--- 3,6 ----
Index: OperOptions.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/OperOptions.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** OperOptions.cpp 7 Feb 2008 19:36:06 -0000 1.1
--- OperOptions.cpp 13 Feb 2008 18:54:57 -0000 1.2
***************
*** 13,16 ****
--- 13,17 ----
, m_measureTime( false)
, m_createLog( false)
+ , m_createSvnLog( false)
, m_doRefTargetLock( true)
, m_doConnEndPointLock( true)
***************
*** 25,28 ****
--- 26,30 ----
, m_dirNamesHashVal( 0)
, m_purgeDelayFactor( 1.)
+ , m_svnLogFileName()
, m_nameParadigmFile()
, m_defUserName()
***************
*** 42,45 ****
--- 44,48 ----
m_measureTime = false;
m_createLog = false;
+ m_createSvnLog = false;
m_doRefTargetLock = true;
m_doConnEndPointLock = true;
***************
*** 54,57 ****
--- 57,61 ----
m_dirNamesHashVal = 0;
m_purgeDelayFactor = 1.;
+ m_svnLogFileName = "";
m_nameParadigmFile = "";
m_defUserName = "";
***************
*** 70,75 ****
bool OperatingOptions::parseBool( const std::string& p_line, const std::string& p_optStr)
{
! bool truef = p_line.substr( p_optStr.length()).find( "true") != std::string::npos;
! bool falsef = p_line.substr( p_optStr.length()).find( "false") != std::string::npos;
bool rv = true;
--- 74,79 ----
bool OperatingOptions::parseBool( const std::string& p_line, const std::string& p_optStr)
{
! bool truef = p_line.find( "true" , p_optStr.length()) != std::string::npos; // look for 'true' after p_optStr.length() offset
! bool falsef = p_line.find( "false", p_optStr.length()) != std::string::npos;
bool rv = true;
***************
*** 110,114 ****
{
std::string line( buff);
! if( line.empty() || line[0] == '#')
continue;
else if( 0 == line.find( "DefCheckInOnSave"))//=true"))
--- 114,122 ----
{
std::string line( buff);
! size_t valid_cont = line.find( '#');
! if( valid_cont != std::string::npos) // line = line.substr( 0, valid_cont); // cut part behind #
! line.erase( valid_cont, std::string::npos); // cut part behind #
!
! if( line.empty())
continue;
else if( 0 == line.find( "DefCheckInOnSave"))//=true"))
***************
*** 170,173 ****
--- 178,189 ----
m_createLog = parseBool( line, "Log"); //m_createLog = true;
}
+ else if( 0 == line.find( "DoSvnLog"))
+ {
+ m_createSvnLog = parseBool( line, "DoSvnLog");
+ }
+ else if( 0 == line.find( "SvnLogFile"))
+ {
+ m_svnLogFileName = parseStr( line, "SvnLogFile");
+ }
else if( 0 == line.find( "UseApiForSvn"))
{
***************
*** 242,245 ****
--- 258,264 ----
if( !m_prefUrl.empty())
parent->sendMsg( std::string( "PreferredUrl: ") + m_prefUrl, MSG_INFO);
+
+ // some conf settings are protected
+ // thus not publicized too much: "DoSvnLog", "SvnLogFile"
}
Index: XmlBackEnd.idl
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/XmlBackEnd.idl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** XmlBackEnd.idl 7 Feb 2008 19:46:43 -0000 1.2
--- XmlBackEnd.idl 13 Feb 2008 18:54:57 -0000 1.3
***************
*** 52,54 ****
--- 52,64 ----
};
+
+ [
+ uuid(3176E8E1-80FA-43DB-9974-70C514A04718),
+ helpstring("SvnWorkBench Class")
+ ]
+ coclass SvnWorkBench
+ {
+ [default] interface ISvnWorkBench;
+ };
+
};
--- NEW FILE: SvnLoginDlg.h ---
#pragma once
#include "afxwin.h"
// CSvnLoginDlg dialog
class CSvnLoginDlg : public CDialog
{
DECLARE_DYNAMIC(CSvnLoginDlg)
public:
CSvnLoginDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CSvnLoginDlg();
// Dialog Data
enum { IDD = IDD_DIALOG_SVNLOGIN };
public:
bool wasAborted();
void setSshOptionInitially();
protected:
bool m_aborted;
bool m_sshInitially;
int m_leftPad;
int m_rightPad;
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnBnClickedAbort();
afx_msg void OnBnClickedRadioUspw();
afx_msg void OnBnClickedRadioCached();
afx_msg void OnBnClickedRadioPpk();
CString m_password;
CString m_user;
CString m_database;
CString m_project;
CButton m_loginMethod;
CEdit m_passwordCtrl;
int m_credRadioBtn;
};
--- NEW FILE: SvnWorkBench.rgs ---
HKCR
{
Mga.XmlBackEnd.SvnWorkBench.1 = s 'SvnWorkBench Class'
{
CLSID = s '{3176E8E1-80FA-43DB-9974-70C514A04718}'
}
Mga.XmlBackEnd.SvnWorkBench = s 'SvnWorkBench Class'
{
CLSID = s '{3176E8E1-80FA-43DB-9974-70C514A04718}'
CurVer = s 'Mga.XmlBackEnd.SvnWorkBench.1'
}
NoRemove CLSID
{
ForceRemove {3176E8E1-80FA-43DB-9974-70C514A04718} = s 'SvnWorkBench Class'
{
ProgID = s 'Mga.XmlBackEnd.SvnWorkBench.1'
VersionIndependentProgID = s 'Mga.XmlBackEnd.SvnWorkBench'
ForceRemove 'Programmable'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Both'
}
'TypeLib' = s '{B22C7EFA-5A5E-11D3-B1CD-00C04F8ECE2F}'
}
}
}
Index: CredentialDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CredentialDlg.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CredentialDlg.cpp 7 Feb 2008 19:36:06 -0000 1.1
--- CredentialDlg.cpp 13 Feb 2008 18:54:57 -0000 1.2
***************
*** 3,7 ****
#include "stdafx.h"
! #include "CredentialDlg.h"
--- 3,7 ----
#include "stdafx.h"
! #include ".\CredentialDlg.h"
***************
*** 9,16 ****
IMPLEMENT_DYNAMIC(CCredentialDlg, CDialog)
! CCredentialDlg::CCredentialDlg( bool p_maySave, const std::string& p_uName, CWnd* pParent /*=NULL*/)
: CDialog(CCredentialDlg::IDD, pParent)
, m_maySave( p_maySave)
, m_suggestedName( p_uName)
{
}
--- 9,21 ----
IMPLEMENT_DYNAMIC(CCredentialDlg, CDialog)
! CCredentialDlg::CCredentialDlg( bool p_userNameOnly, bool p_visibleMaySave, bool p_maySave, const std::string& p_uName, const char* p_realmStr, CWnd* pParent /*=NULL*/)
: CDialog(CCredentialDlg::IDD, pParent)
+ , m_userNameOnly( p_userNameOnly)
+ , m_visibleMaySave( p_visibleMaySave)
, m_maySave( p_maySave)
, m_suggestedName( p_uName)
+ , m_realmStrPtr( p_realmStr)
+ , m_leftPad( 20)
+ , m_rightPad( 20)
{
}
***************
*** 30,34 ****
}
! bool CCredentialDlg::maySave()
{
return m_resMaySave;
--- 35,39 ----
}
! bool CCredentialDlg::maySave()
{
return m_resMaySave;
***************
*** 38,41 ****
--- 43,51 ----
{
CDialog::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_MAYBESAVED, m_btnMaySave);
+ DDX_Control(pDX, IDC_EDITNAME, m_edtName);
+ DDX_Control(pDX, IDC_EDITWORD, m_edtWord);
+ DDX_Control(pDX, IDC_EDIT_REALM, m_edtRealm);
+ DDX_Control(pDX, IDC_STATIC1, m_msgAtTheTop);
}
***************
*** 43,46 ****
--- 53,57 ----
BEGIN_MESSAGE_MAP(CCredentialDlg, CDialog)
ON_BN_CLICKED(IDOK, OnBnClickedOk)
+ ON_WM_SIZE()
END_MESSAGE_MAP()
***************
*** 52,59 ****
CDialog::OnInitDialog();
! GetDlgItem( IDC_STATIC1)->SetWindowText( "Hello");
! ((CEdit *) GetDlgItem( IDC_EDITNAME))->SetWindowText( m_suggestedName.c_str());
! GetDlgItem( IDC_MAYBESAVED)->EnableWindow( m_maySave);
return TRUE; // return TRUE unless you set the focus to a control
--- 63,96 ----
CDialog::OnInitDialog();
! m_edtName.SetWindowText( m_suggestedName.c_str());
! m_edtWord.EnableWindow( !m_userNameOnly);
! if( m_userNameOnly)
! m_msgAtTheTop.SetWindowText( "Please specify your username:");
! else if( m_realmStrPtr)
! {
! m_edtRealm.ShowWindow( SW_SHOW);
! m_edtRealm.SetWindowText( CString( "Realm: ") + m_realmStrPtr);//m_msgAtTheTop.SetWindowText( CString( "Please authenticate yourself for realm: \n") + m_realmStrPtr);
! }
!
! m_btnMaySave.ShowWindow( m_visibleMaySave? SW_SHOW: SW_HIDE);
! m_btnMaySave.EnableWindow( m_maySave);
! // maySave checked initially (if allowed)
! m_btnMaySave.SetCheck( m_maySave? BST_CHECKED: BST_UNCHECKED);
!
! // size related calc
! CRect rm_rect;
! if( m_edtRealm.GetSafeHwnd()) {
! m_edtRealm.GetWindowRect( &rm_rect);
! ScreenToClient( &rm_rect);
!
! CRect win_rect;
! GetWindowRect( &win_rect);
! ScreenToClient( &win_rect);
!
! // initing m_leftPad, m_rightPad with the initial lf and rt margins
! m_leftPad = rm_rect.left - win_rect.left;
! m_rightPad = win_rect.right - rm_rect.right;
! }
return TRUE; // return TRUE unless you set the focus to a control
***************
*** 64,81 ****
{
CString res;
- CEdit * edt = 0;
! edt = (CEdit *) GetDlgItem( IDC_EDITNAME);
! edt->GetWindowText( res);
m_resName = (LPCTSTR) res;
! edt = (CEdit *) GetDlgItem( IDC_EDITWORD);
! edt->GetWindowText( res);
m_resWord = (LPCTSTR) res;
! CButton * btn = 0;
! btn = (CButton *) GetDlgItem( IDC_MAYBESAVED);
! m_resMaySave = btn->GetCheck() == BST_CHECKED;
OnOK();
}
--- 101,141 ----
{
CString res;
! m_edtName.GetWindowText( res);
m_resName = (LPCTSTR) res;
! m_edtWord.GetWindowText( res);
m_resWord = (LPCTSTR) res;
! m_resMaySave = m_btnMaySave.GetCheck() == BST_CHECKED;
OnOK();
+ }
+
+ void CCredentialDlg::OnSize(UINT nType, int cx, int cy)
+ {
+ CDialog::OnSize(nType, cx, cy);
+
+ CButton* ok_btn = (CButton*) GetDlgItem( IDOK);
+ CButton* ca_btn = (CButton*) GetDlgItem( IDCANCEL);
+
+ CRect rm_rect, ok_rect, ca_rect;
+ if ( m_edtRealm.GetSafeHwnd()
+ && ok_btn && ok_btn->GetSafeHwnd()
+ && ca_btn && ca_btn->GetSafeHwnd())
+ {
+ m_edtRealm.GetWindowRect( &rm_rect);
+ ScreenToClient( &rm_rect);
+
+ ok_btn->GetWindowRect( &ok_rect);
+ ScreenToClient( &ok_rect);
+
+ ca_btn->GetWindowRect( &ca_rect);
+ ScreenToClient( &ca_rect);
+
+ m_edtRealm.SetWindowPos( NULL, rm_rect.left, rm_rect.top, cx - m_leftPad - m_rightPad, rm_rect.Height(), SWP_NOZORDER);
+ ok_btn->SetWindowPos( NULL, cx - ok_rect.Width() - m_leftPad, ok_rect.top, ok_rect.Width(), ok_rect.Height(), SWP_NOZORDER);
+ ca_btn->SetWindowPos( NULL, cx - ca_rect.Width() - m_leftPad, ca_rect.top, ca_rect.Width(), ca_rect.Height(), SWP_NOZORDER);
+ }
+
}
--- NEW FILE: SvnTestDlg.cpp ---
// SvnTestDlg.cpp : implementation file
//
#include "stdafx.h"
#include "GME.h"
#include "SvnTestDlg.h"
// CSvnTestDlg dialog
IMPLEMENT_DYNAMIC(CSvnTestDlg, CDialog)
CSvnTestDlg::CSvnTestDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSvnTestDlg::IDD, pParent)
{
}
CSvnTestDlg::~CSvnTestDlg()
{
}
void CSvnTestDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EDIT1, m_field);
DDX_Control(pDX, IDOK, m_btn);
}
BEGIN_MESSAGE_MAP(CSvnTestDlg, CDialog)
ON_WM_SIZE()
END_MESSAGE_MAP()
// CSvnTestDlg message handlers
void CSvnTestDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
CRect field_rect, btn_rect;
if (m_field.GetSafeHwnd() && m_btn.GetSafeHwnd()) {
m_field.GetWindowRect( &field_rect);
ScreenToClient( &field_rect);
m_btn.GetWindowRect( &btn_rect);
ScreenToClient( &btn_rect);
int pad = field_rect.left;
int spc = btn_rect.top - field_rect.bottom;
//m_field.SetWindowPos( NULL, 0, 0, cx, cy - btn_rect.Height(), SWP_NOZORDER);
m_field.SetWindowPos( NULL, pad, field_rect.top, cx - 2*pad, cy - field_rect.top - pad - spc - btn_rect.Height(), SWP_NOZORDER);
m_btn.SetWindowPos( NULL, cx - btn_rect.Width() - pad, cy - btn_rect.Height() - pad, btn_rect.Width(), btn_rect.Height(), SWP_NOZORDER);
}
}
void CSvnTestDlg::setContent( const CString& p_cont)
{
m_defContent = p_cont;
}
BOOL CSvnTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_field.SetWindowText( m_defContent);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
--- NEW FILE: SvnLoginDlg.cpp ---
// SvnLoginDlg.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "XmlBackEnd.h"
#include ".\SvnLoginDlg.h"
// SvnLoginDlg dialog
IMPLEMENT_DYNAMIC(CSvnLoginDlg, CDialog)
CSvnLoginDlg::CSvnLoginDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSvnLoginDlg::IDD, pParent)
, m_aborted( false)
, m_sshInitially( false)
, m_leftPad( 20)
, m_rightPad( 20)
, m_user(_T(""))
, m_password(_T(""))
, m_database(_T(""))
, m_project(_T(""))
, m_credRadioBtn(0)
{
}
CSvnLoginDlg::~CSvnLoginDlg()
{
}
void CSvnLoginDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT_USER, m_user);
DDX_Text(pDX, IDC_EDIT_PWD, m_password);
DDX_Text(pDX, IDC_STATIC_DATABASE, m_database);
DDX_Text(pDX, IDC_STATIC_PROJECT, m_project);
DDX_Control(pDX, IDC_RADIO_CACHED, m_loginMethod);
DDX_Control(pDX, IDC_EDIT_PWD, m_passwordCtrl);
DDX_Radio(pDX, IDC_RADIO_CACHED, m_credRadioBtn);
}
BEGIN_MESSAGE_MAP(CSvnLoginDlg, CDialog)
ON_WM_SIZE()
ON_BN_CLICKED(IDC_ABORT, OnBnClickedAbort)
ON_BN_CLICKED(IDC_RADIO_USPW, OnBnClickedRadioUspw)
ON_BN_CLICKED(IDC_RADIO_CACHED, OnBnClickedRadioCached)
ON_BN_CLICKED(IDC_RADIO_PPK, OnBnClickedRadioPpk)
END_MESSAGE_MAP()
// CSvnLoginDlg message handlers
void CSvnLoginDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
CWnd * db = GetDlgItem( IDC_STATIC_DATABASE);
CWnd * pj = GetDlgItem( IDC_STATIC_PROJECT);
CRect db_rect, pj_rect;
if( db && pj && db->GetSafeHwnd() && pj->GetSafeHwnd()) {
db->GetWindowRect( &db_rect);
pj->GetWindowRect( &pj_rect);
ScreenToClient( &db_rect);
ScreenToClient( &pj_rect);
int width = cx - m_leftPad - m_rightPad;
db->SetWindowPos( NULL, m_leftPad, db_rect.top, width > 20? width: 20, db_rect.Height(), SWP_NOZORDER);
pj->SetWindowPos( NULL, m_leftPad, pj_rect.top, width > 20? width: 20, pj_rect.Height(), SWP_NOZORDER);
}
}
BOOL CSvnLoginDlg::OnInitDialog()
{
CDialog::OnInitDialog();
if( m_sshInitially) m_credRadioBtn = 2;
else {
m_credRadioBtn = 0;//m_loginMethod.SetCheck( BST_CHECKED);
//m_passwordCtrl.EnableWindow( FALSE);
}
m_passwordCtrl.EnableWindow( FALSE);//either 0 or 2, m_loginMethod.GetCheck() != BST_CHECKED);
CWnd * db = GetDlgItem( IDC_STATIC_DATABASE);
CRect db_rect;
if( db && db->GetSafeHwnd()) {
db->GetWindowRect( &db_rect);
ScreenToClient( &db_rect);
CRect win_rect;
GetWindowRect( &win_rect);
ScreenToClient( &win_rect);
m_leftPad = db_rect.left - win_rect.left;
m_rightPad = win_rect.right - db_rect.right;
}
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSvnLoginDlg::OnBnClickedRadioUspw()
{
m_passwordCtrl.EnableWindow( TRUE);
}
void CSvnLoginDlg::OnBnClickedRadioCached()
{
m_passwordCtrl.EnableWindow( FALSE);
}
void CSvnLoginDlg::OnBnClickedRadioPpk()
{
m_passwordCtrl.EnableWindow( FALSE);
if( m_database.Left(10) != "svn+ssh://")
{
AfxMessageBox( "This is a valid option only for repositories accessed through svn+ssh:// protocol!");
}
}
void CSvnLoginDlg::OnBnClickedAbort()
{
m_aborted = true;
EndDialog( IDCANCEL);
//throw hresult_exception( E_FAIL);
}
bool CSvnLoginDlg::wasAborted()
{
return m_aborted;
}
void CSvnLoginDlg::setSshOptionInitially()
{
m_sshInitially = true;
}
Index: SvnConfig.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/SvnConfig.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SvnConfig.h 7 Feb 2008 20:43:33 -0000 1.2
--- SvnConfig.h 13 Feb 2008 18:54:57 -0000 1.3
***************
*** 15,36 ****
#pragma comment(lib, "shfolder.lib")
#pragma comment(lib, "ws2_32.lib")
! #pragma comment(lib, "libapr.lib")
! #pragma comment(lib, "libaprutil.lib")
! #pragma comment(lib, "libapriconv.lib")
! #pragma comment(lib, "xml.lib")
! #pragma comment(lib, "libsvn_client-1.lib")
! #pragma comment(lib, "libsvn_delta-1.lib")
! #pragma comment(lib, "libsvn_diff-1.lib")
! #pragma comment(lib, "libsvn_fs-1.lib")
! #pragma comment(lib, "libsvn_fs_fs-1.lib")
! #pragma comment(lib, "libsvn_ra-1.lib")
! #pragma comment(lib, "libsvn_ra_dav-1.lib")
! #pragma comment(lib, "libsvn_ra_local-1.lib")
! #pragma comment(lib, "libsvn_ra_svn-1.lib")
! #pragma comment(lib, "libsvn_repos-1.lib")
! #pragma comment(lib, "libsvn_subr-1.lib")
! #pragma comment(lib, "libsvn_wc-1.lib")
! #pragma comment(lib, "libeay32.lib")
! #pragma comment(lib, "ssleay32.lib")
#else
--- 15,36 ----
#pragma comment(lib, "shfolder.lib")
#pragma comment(lib, "ws2_32.lib")
! #pragma comment(lib, "libaprD.lib")
! #pragma comment(lib, "libaprutilD.lib")
! #pragma comment(lib, "libapriconvD.lib")
! #pragma comment(lib, "xmlD.lib")
! #pragma comment(lib, "libsvn_client-1D.lib")
! #pragma comment(lib, "libsvn_delta-1D.lib")
! #pragma comment(lib, "libsvn_diff-1D.lib")
! #pragma comment(lib, "libsvn_fs-1D.lib")
! #pragma comment(lib, "libsvn_fs_fs-1D.lib")
! #pragma comment(lib, "libsvn_ra-1D.lib")
! #pragma comment(lib, "libsvn_ra_dav-1D.lib")
! #pragma comment(lib, "libsvn_ra_local-1D.lib")
! #pragma comment(lib, "libsvn_ra_svn-1D.lib")
! #pragma comment(lib, "libsvn_repos-1D.lib")
! #pragma comment(lib, "libsvn_subr-1D.lib")
! #pragma comment(lib, "libsvn_wc-1D.lib")
! #pragma comment(lib, "libeay32D.lib")
! #pragma comment(lib, "ssleay32D.lib")
#else
Index: XmlBackEnd.vcproj
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/XmlBackEnd.vcproj,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** XmlBackEnd.vcproj 7 Feb 2008 20:43:33 -0000 1.5
--- XmlBackEnd.vcproj 13 Feb 2008 18:54:57 -0000 1.6
***************
*** 25,29 ****
Name="VCCLCompilerTool"
Optimization="0"
! AdditionalIncludeDirectories="./,../Include,../Include/ODBC,../Include/repository,../Interfaces,../Include/STLport,../Common,../Gme,../Core,..\subversion-1.4.5\subversion\include;..\subversion-1.4.5\apr\include;..\subversion-1.4.5\apr-util\include;..\subversion-1.4.5\subversion,svncode,../Common"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
BasicRuntimeChecks="3"
--- 25,29 ----
Name="VCCLCompilerTool"
Optimization="0"
! AdditionalIncludeDirectories="./;../Include;../Include/ODBC;../Include/repository;../Interfaces;../Include/STLport;../Common;../Gme;../Core;../Include/subversion;../Include/apr;"../Include/apr-util";"../Include/apr-iconv";svncode"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
BasicRuntimeChecks="3"
***************
*** 42,51 ****
Name="VCCustomBuildTool"
Description="Performing registration"
! CommandLine="copy ..\subversion-1.4.5\apr\Debug\libapr.dll "$(OutDir)"
! copy ..\subversion-1.4.5\apr-util\Debug\libaprutil.dll "$(OutDir)"
! copy ..\subversion-1.4.5\apr-iconv\Debug\libapriconv.dll "$(OutDir)"
! copy ..\subversion-1.4.5\openssl-0.9.7g\out32dll\libeay32.dll "$(OutDir)"
! copy ..\subversion-1.4.5\openssl-0.9.7g\out32dll\ssleay32.dll "$(OutDir)"
! regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
--- 42,46 ----
Name="VCCustomBuildTool"
Description="Performing registration"
! CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
***************
*** 57,61 ****
LinkIncremental="2"
SuppressStartupBanner="TRUE"
! AdditionalLibraryDirectories="../lib;"..\subversion-1.4.5\apr\Debug";"..\subversion-1.4.5\apr-util\Debug";"..\subversion-1.4.5\apr-iconv\Debug";"..\subversion-1.4.5\apr-util\xml\expat\lib\LibD";"..\subversion-1.4.5\zlib\";"..\subversion-1.4.5\neon\";"..\subversion-1.4.5\debug\subversion\libsvn_client";"..\subversion-1.4.5\debug\subversion\libsvn_delta";"..\subversion-1.4.5\debug\subversion\libsvn_diff";"..\subversion-1.4.5\debug\subversion\libsvn_fs";"..\subversion-1.4.5\debug\subversion\libsvn_fs_fs";"..\subversion-1.4.5\debug\subversion\libsvn_ra";"..\subversion-1.4.5\debug\subversion\libsvn_ra_dav";"..\subversion-1.4.5\debug\subversion\libsvn_ra_local";"..\subversion-1.4.5\debug\subversion\libsvn_ra_serf";"..\subversion-1.4.5\debug\subversion\libsvn_ra_svn";"..\subversion-1.4.5\debug\subversion\libsvn_rep
os";"..\subversion-1.4.5\debug\subversion\libsvn_subr";"..\subversion-1.4.5\debug\subversion\libsvn_wc";"..\subversion-1.4.5\openssl-0.9.7g\out32dll";"..\subversion-1.4.5\serf-0.1.2\$(ConfigurationName)\""
ModuleDefinitionFile=".\XmlBackEnd.def"
GenerateDebugInformation="TRUE"
--- 52,56 ----
LinkIncremental="2"
SuppressStartupBanner="TRUE"
! AdditionalLibraryDirectories="../lib"
ModuleDefinitionFile=".\XmlBackEnd.def"
GenerateDebugInformation="TRUE"
***************
*** 103,107 ****
Optimization="1"
InlineFunctionExpansion="1"
! AdditionalIncludeDirectories="./,../Include,../Include/ODBC,../Include/repository,../Interfaces,../Include/STLport,../Common,../Gme,../Core,..\subversion-1.4.5\subversion\include;..\subversion-1.4.5\apr\include;..\subversion-1.4.5\apr-util\include;..\subversion-1.4.5\subversion,svncode,../Common"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
StringPooling="TRUE"
--- 98,102 ----
Optimization="1"
InlineFunctionExpansion="1"
! AdditionalIncludeDirectories="./;../Include;../Include/ODBC;../Include/repository;../Interfaces;../Include/STLport;../Common;../Gme;../Core;../Include/subversion;../Include/apr;"../Include/apr-util";svncode"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
StringPooling="TRUE"
***************
*** 121,130 ****
Name="VCCustomBuildTool"
Description="Performing registration"
! CommandLine="copy ..\subversion-1.4.5\apr\Debug\libapr.dll "$(OutDir)"
! copy ..\subversion-1.4.5\apr-util\Debug\libaprutil.dll "$(OutDir)"
! copy ..\subversion-1.4.5\apr-iconv\Debug\libapriconv.dll "$(OutDir)"
! copy ..\subversion-1.4.5\openssl-0.9.7g\out32dll\libeay32.dll "$(OutDir)"
! copy ..\subversion-1.4.5\openssl-0.9.7g\out32dll\ssleay32.dll "$(OutDir)"
! regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
--- 116,120 ----
Name="VCCustomBuildTool"
Description="Performing registration"
! CommandLine="regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
"
***************
*** 136,140 ****
LinkIncremental="1"
SuppressStartupBanner="TRUE"
! AdditionalLibraryDirectories="../lib;"..\subversion-1.4.5\apr\Debug";"..\subversion-1.4.5\apr-util\Debug";"..\subversion-1.4.5\apr-iconv\Debug";"..\subversion-1.4.5\apr-util\xml\expat\lib\LibD";"..\subversion-1.4.5\zlib\";"..\subversion-1.4.5\neon\";"..\subversion-1.4.5\debug\subversion\libsvn_client";"..\subversion-1.4.5\debug\subversion\libsvn_delta";"..\subversion-1.4.5\debug\subversion\libsvn_diff";"..\subversion-1.4.5\debug\subversion\libsvn_fs";"..\subversion-1.4.5\debug\subversion\libsvn_fs_fs";"..\subversion-1.4.5\debug\subversion\libsvn_ra";"..\subversion-1.4.5\debug\subversion\libsvn_ra_dav";"..\subversion-1.4.5\debug\subversion\libsvn_ra_local";"..\subversion-1.4.5\debug\subversion\libsvn_ra_serf";"..\subversion-1.4.5\debug\subversion\libsvn_ra_svn";"..\subversion-1.4.5\debug\subversion\libsvn_rep
os";"..\subversion-1.4.5\debug\subversion\libsvn_subr";"..\subversion-1.4.5\debug\subversion\libsvn_wc";"..\subversion-1.4.5\openssl-0.9.7g\out32dll";"
ModuleDefinitionFile=".\XmlBackEnd.def"
GenerateDebugInformation="TRUE"
--- 126,130 ----
LinkIncremental="1"
SuppressStartupBanner="TRUE"
! AdditionalLibraryDirectories="../lib"
ModuleDefinitionFile=".\XmlBackEnd.def"
GenerateDebugInformation="TRUE"
***************
*** 317,321 ****
<Tool
Name="VCMIDLTool"
! GenerateStublessProxies="TRUE"/>
</FileConfiguration>
<FileConfiguration
--- 307,313 ----
<Tool
Name="VCMIDLTool"
! GenerateStublessProxies="TRUE"
! TypeLibraryName=".\XmlBackEnd.tlb"
! InterfaceIdentifierFileName="SvAuto_i.c"/>
</FileConfiguration>
<FileConfiguration
***************
*** 323,336 ****
<Tool
Name="VCMIDLTool"
! GenerateStublessProxies="TRUE"/>
</FileConfiguration>
</File>
<File
RelativePath=".\SvnExec.cpp">
</File>
<File
RelativePath=".\SvnTester.cpp">
</File>
<File
RelativePath="VSSLoginDlg.cpp">
<FileConfiguration
--- 315,345 ----
<Tool
Name="VCMIDLTool"
! GenerateStublessProxies="TRUE"
! TypeLibraryName=".\XmlBackEnd.tlb"
! InterfaceIdentifierFileName="SvAuto_i.c"/>
</FileConfiguration>
</File>
<File
+ RelativePath=".\SvnBench.cpp">
+ </File>
+ <File
RelativePath=".\SvnExec.cpp">
</File>
<File
+ RelativePath=".\SvnHelper.cpp">
+ </File>
+ <File
+ RelativePath=".\SvnLoginDlg.cpp">
+ </File>
+ <File
+ RelativePath=".\SvnTestDlg.cpp">
+ </File>
+ <File
RelativePath=".\SvnTester.cpp">
</File>
<File
+ RelativePath=".\SvnWorkBench.cpp">
+ </File>
+ <File
RelativePath="VSSLoginDlg.cpp">
<FileConfiguration
***************
*** 423,426 ****
--- 432,438 ----
Filter="">
<File
+ RelativePath=".\SVNCode\CallLogger.cpp">
+ </File>
+ <File
RelativePath=".\SVNCode\Client.cpp">
</File>
***************
*** 497,500 ****
--- 509,515 ----
</File>
<File
+ RelativePath=".\SvnBench.h">
+ </File>
+ <File
RelativePath=".\SvnConfig.h">
</File>
***************
*** 503,509 ****
--- 518,536 ----
</File>
<File
+ RelativePath=".\SvnHelper.h">
+ </File>
+ <File
+ RelativePath=".\SvnLoginDlg.h">
+ </File>
+ <File
+ RelativePath=".\SvnTestDlg.h">
+ </File>
+ <File
RelativePath=".\SvnTester.h">
</File>
<File
+ RelativePath=".\SvnWorkBench.h">
+ </File>
+ <File
RelativePath="VSSLoginDlg.h">
</File>
***************
*** 512,519 ****
Filter="">
<File
! RelativePath=".\SVNCode\Client.h">
</File>
<File
! RelativePath=".\SVNCode\ClientIntf.h">
</File>
<File
--- 539,546 ----
Filter="">
<File
! RelativePath=".\SVNCode\CallLogger.h">
</File>
<File
! RelativePath=".\SVNCode\Client.h">
</File>
<File
***************
*** 560,563 ****
--- 587,593 ----
<File
RelativePath=".\SvnTester.rgs">
+ </File>
+ <File
+ RelativePath=".\SvnWorkBench.rgs">
</File>
</Filter>
Index: SvnExec.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/SvnExec.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SvnExec.h 7 Feb 2008 19:57:06 -0000 1.1
--- SvnExec.h 13 Feb 2008 18:54:57 -0000 1.2
***************
*** 59,63 ****
STDMETHOD(IsLocked)(BSTR path, VARIANT_BOOL* isLocked, BSTR* lockHolder);
STDMETHOD(Init)(BSTR username, BSTR password);
! STDMETHOD(Logging)(VARIANT_BOOL onoff);
protected:
--- 59,64 ----
STDMETHOD(IsLocked)(BSTR path, VARIANT_BOOL* isLocked, BSTR* lockHolder);
STDMETHOD(Init)(BSTR username, BSTR password);
! STDMETHOD(ReplaceUserName)(BSTR userName);
! STDMETHOD(Logging)(VARIANT_BOOL onoff, BSTR logfile);
protected:
***************
*** 65,70 ****
bool vb2b( VARIANT_BOOL val);
-
HiClient *m_impl;
};
--- 66,71 ----
bool vb2b( VARIANT_BOOL val);
HiClient *m_impl;
+
};
Index: CoreXmlFile.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CoreXmlFile.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** CoreXmlFile.cpp 7 Feb 2008 20:43:33 -0000 1.25
--- CoreXmlFile.cpp 13 Feb 2008 18:54:57 -0000 1.26
***************
*** 10,17 ****
--- 10,19 ----
#include "CommonCollection.h"
#include "VSSLoginDlg.h"
+ #include "SvnLoginDlg.h"
#include "FilesInUseDlg.h"
#include "FilesInUseDetailsDlg.h"
#include <xercesc/framework/LocalFileFormatTarget.hpp>
#include "SvnExec.h"
+ #include "SvnTestDlg.h"
#include "FileHelp.h"
#include "DirSupplier.h"
***************
*** 916,928 ****
else if( b3)
{
! std::string res( "The following users worked on the project since your log-in\n");
std::vector< LoggedIn> lus = allusers();
for( std::vector< LoggedIn>::iterator it = lus.begin(), en = lus.end(); it != en; ++it)
{
! res += std::string(1, '\t') + std::string(1, it->m_fl) + "\t\"" + it->m_nm + "\"\n";
}
if( lus.size() > 0)
! AfxMessageBox( res.c_str(), MB_ICONINFORMATION);
else
AfxMessageBox( "No user login info found!");
--- 918,936 ----
else if( b3)
{
! std::string res( "The following users worked on the project since your log-in:\r\n");
std::vector< LoggedIn> lus = allusers();
for( std::vector< LoggedIn>::iterator it = lus.begin(), en = lus.end(); it != en; ++it)
{
! res += std::string(1, '\t') + std::string(1, it->m_fl) + "\t\"" + it->m_nm + "\"\r\n";
}
if( lus.size() > 0)
! {
! //AfxMessageBox( res.c_str(), MB_ICONINFORMATION);
! CSvnTestDlg d;
! res.append( "Note: 'I' means Inactive, 'A' means Active users.");
! d.setContent( res.c_str());
! d.DoModal();
! }
else
AfxMessageBox( "No user login info found!");
***************
*** 935,938 ****
--- 943,948 ----
STDMETHODIMP CCoreXmlFile::put_AttributeValue(VARIANT p)
{
+ AFX_MANAGE_STATE(AfxGetStaticModuleState());
+
if( m_openedObject == NULL || !m_inTransaction )
COMRETURN(E_INVALID_USAGE);
***************
*** 1549,1559 ****
}
! // m_sourceControl has to be filled for these methods below:
! m_protectList.setParent( this);
m_signer.setParent( this);
!
! // sign on
! m_signer.in();
!
// purge my protect list
--- 1559,1566 ----
}
! // m_sourceControl has to be filled for these methods below (setParent)
m_signer.setParent( this);
! m_signer.in(); // signing on does username verification also
! m_protectList.setParent( this);
// purge my protect list
***************
*** 1609,1617 ****
createProjectFile();
! // m_sourceControl has to be filled for these methods below:
! m_protectList.setParent( this);
m_signer.setParent( this);
!
! m_signer.in();
m_opened = true;
--- 1616,1623 ----
createProjectFile();
! // m_sourceControl has to be filled for these methods below (setParent)
m_signer.setParent( this);
! m_signer.in(); // signing on does username verification also
! m_protectList.setParent( this);
m_opened = true;
***************
*** 1623,1626 ****
--- 1629,1634 ----
STDMETHODIMP CCoreXmlFile::SaveProject(BSTR connection, VARIANT_BOOL keepoldname = VARIANT_TRUE)
{
+ AFX_MANAGE_STATE(AfxGetStaticModuleState());
+
// reload options in order to allow 'change-of-mind' for users
m_userOpts.reset();
***************
*** 1648,1651 ****
--- 1656,1661 ----
STDMETHODIMP CCoreXmlFile::CloseProject( VARIANT_BOOL abort)
{
+ AFX_MANAGE_STATE(AfxGetStaticModuleState());
+
if( !m_opened || m_metaProject == NULL )
COMRETURN(E_INVALID_USAGE);
***************
*** 1678,1681 ****
--- 1688,1693 ----
STDMETHODIMP CCoreXmlFile::BeginTransaction()
{
+ AFX_MANAGE_STATE(AfxGetStaticModuleState());
+
if( !m_opened || m_inTransaction )
COMRETURN(E_INVALID_USAGE);
***************
*** 1688,1691 ****
--- 1700,1705 ----
STDMETHODIMP CCoreXmlFile::CommitTransaction()
{
+ AFX_MANAGE_STATE(AfxGetStaticModuleState());
+
if( !m_inTransaction )
COMRETURN(E_INVALID_USAGE);
***************
*** 1764,1767 ****
--- 1778,1783 ----
STDMETHODIMP CCoreXmlFile::AbortTransaction()
{
+ AFX_MANAGE_STATE(AfxGetStaticModuleState());
+
if( !m_inTransaction )
COMRETURN(E_INVALID_USAGE);
***************
*** 2005,2008 ****
--- 2021,2039 ----
}
+ bool CCoreXmlFile::isUrlSvnSsh()
+ {
+ return m_svnUrl.substr( 0, 10) == "svn+ssh://";
+ }
+
+ std::string CCoreXmlFile::userNameFromSvnSshUrl()
+ {
+ size_t at_pos = m_svnUrl.find( '@');
+ if( m_svnUrl.substr( 0, 10) == "svn+ssh://" && at_pos > 10 && at_pos != std::string::npos) // uname found
+ {
+ return m_svnUrl.substr( 10, at_pos - 10);
+ }
+ return "";
+ }
+
void CCoreXmlFile::svnSshHandling()
{
***************
*** 2011,2016 ****
if( m_vssUser.empty())
{
! AfxMessageBox( "Could not go forward with svn+ssh scheme without a username.");
! HR_THROW( E_FILEOPEN);
}
else
--- 2042,2048 ----
if( m_vssUser.empty())
{
! AfxMessageBox( "Could not process further with \"svn+ssh://\" scheme if username is not provided\n\
! either in the Credential Dialog or embedded in the url as \"svn+ssh://username@host.example.com\".");
! HR_THROW( E_UNKNOWN_STORAGE);
}
else
***************
*** 3246,3259 ****
}
! m_vssUser = m_userOpts.m_useAccountInfo? m_userOpts.m_defUserName.c_str(): ""; // TODO
m_vssPassword = m_userOpts.m_useAccountInfo? m_userOpts.m_defPassword.c_str(): ""; // TODO
m_sourceControl = SC_SUBVERSION;
! // svnSetup() ?
! getSourceSafeUserInfo(-1); // fills m_vssUser, m_vssPassword
! svnSshHandling();
! svnOptions();
! createSubversionClientImpl();
//testSubversion();
--- 3278,3291 ----
}
! m_vssUser = m_userOpts.m_useAccountInfo? m_userOpts.m_defUserName.c_str(): userNameFromSvnSshUrl(); // TODO
m_vssPassword = m_userOpts.m_useAccountInfo? m_userOpts.m_defPassword.c_str(): ""; // TODO
m_sourceControl = SC_SUBVERSION;
! svnSetup( false);
! //getUserCredentialInfo(-1); // fills m_vssUser, m_vssPassword
! //svnSshHandling();
! //svnOptions();
! //createSubversionClientImpl();
//testSubversion();
***************
*** 4008,4030 ****
}
! bool CCoreXmlFile::getSourceSafeUserInfo( int p_svnText /*= 0*/)
{
! CVSSLoginDlg dlg;
! dlg.m_project = m_projectFileName.c_str();
! dlg.m_database = m_vssDatabaseStr.c_str();
! dlg.m_user = m_userOpts.m_useAccountInfo? m_userOpts.m_defUserName.c_str(): "";
! dlg.m_password = m_userOpts.m_useAccountInfo? m_userOpts.m_defPassword.c_str(): "";
! if( p_svnText) dlg.m_text = "Please provide at least your SVN username. Password can be later provided when it is asked by the server.";//You may provide default username/password in case the svn client will face an authentication challenge from the server. In case these are not provided you might be later prompted for the credentials required by the server.";
! else dlg.m_text = "This project is connected to a SourceSafe database. You have to login to the database to work with this project.";
! if( p_svnText) dlg.m_database = m_svnUrl.c_str();
! // execute DoModal only if one of the booleans below is false
! if( m_userOpts.m_useAccountInfo && m_userOpts.m_automaticLogin || dlg.DoModal() == IDOK )
{
! m_vssUser = dlg.m_user;
! m_vssPassword = dlg.m_password;
! return true;
}
return false;
}
--- 4040,4093 ----
}
! bool CCoreXmlFile::getUserCredentialInfo( int p_svnText, bool p_requireLogin)
{
! bool aborted = false;
! if( p_svnText != 0)
! {
! bool is_ssh_hinted = isUrlSvnSsh();
! CSvnLoginDlg dlg;
! dlg.m_project = m_projectFileName.c_str();
! dlg.m_database = m_svnUrl.c_str();
! dlg.m_user = m_userOpts.m_useAccountInfo? m_userOpts.m_defUserName.c_str(): userNameFromSvnSshUrl().c_str();
! dlg.m_password = m_userOpts.m_useAccountInfo? m_userOpts.m_defPassword.c_str(): "";
! if( is_ssh_hinted)
! dlg.setSshOptionInitially();
! if( m_userOpts.m_useAccountInfo && m_userOpts.m_automaticLogin || dlg.DoModal() == IDOK )
! {
! m_vssUser = dlg.m_user;
! m_vssPassword = dlg.m_password;
! return true;
! }
! aborted = dlg.wasAborted();
! }
! else
{
! CVSSLoginDlg dlg;
! dlg.m_project = m_projectFileName.c_str();
! dlg.m_database = m_vssDatabaseStr.c_str();
! dlg.m_user = m_userOpts.m_useAccountInfo? m_userOpts.m_defUserName.c_str(): "";
! dlg.m_password = m_userOpts.m_useAccountInfo? m_userOpts.m_defPassword.c_str(): "";
! //if( p_svnText) dlg.m_text = "Please provide at least your SVN username. Password can be later provided when it is asked by the server.";//You may provide default username/password in case the svn client will face an authentication challenge from the server. In case these are not provided you might be later prompted for the credentials required by the server.";
! //else dlg.m_text = "This project is connected to a SourceSafe database. You have to login to the database to work with this project.";
! //if( p_svnText) dlg.m_database = m_svnUrl.c_str();
!
! // execute DoModal only if one of the booleans below is false
! if( m_userOpts.m_useAccountInfo && m_userOpts.m_automaticLogin || dlg.DoModal() == IDOK )
! {
! m_vssUser = dlg.m_user;
! m_vssPassword = dlg.m_password;
! return true;
! }
! aborted = dlg.wasAborted();
}
+ // we are sure that not IDOK was pressed
+ if( p_requireLogin)
+ AfxMessageBox( "Could not process further without login information.", MB_ICONEXCLAMATION);
+
+ if( aborted || p_requireLogin)
+ HR_THROW( E_UNKNOWN_STORAGE); // this will imply a relatively silent abort, with no further assertions
+
return false;
}
***************
*** 4051,4055 ****
if( m_vssDatabaseStr.size() > 0 )
{
! if( m_vssUser.size() > 0 || getSourceSafeUserInfo() )
{
// try to open the sorusafe database
--- 4114,4118 ----
if( m_vssDatabaseStr.size() > 0 )
{
! if( m_vssUser.size() > 0 || getUserCredentialInfo( 0, true) )
{
// try to open the sorusafe database
***************
*** 4165,4169 ****
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
! if( m_vssUser.size() > 0 || getSourceSafeUserInfo() )
{
// try to open the sorusafe database
--- 4228,4232 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
! if( m_vssUser.size() > 0 || getUserCredentialInfo( 0, false) )
{
// try to open the sorusafe database
***************
*** 4190,4194 ****
{
char buf[200];
! sprintf( buf, "Could not connect to SourceSafe database. Error code: %x (%d). You may lose synchronization with source control. You won't be able to modify read only files.", hr, hr );
AfxMessageBox( buf, MB_ICONEXCLAMATION );
m_sourceControl = SC_NONE;
--- 4253,4257 ----
{
char buf[200];
! sprintf( buf, "Could not connect to SourceSafe database. Error code: %x (%d). You may lose synchronization with the version controlled project. You won't be able to modify read-only files.", hr, hr );
AfxMessageBox( buf, MB_ICONEXCLAMATION );
m_sourceControl = SC_NONE;
***************
*** 4197,4201 ****
else
{
! AfxMessageBox( "You did not log in the SourceSafe database. You may lose synchronization with source control. You won't be able to modify read only files.", MB_ICONEXCLAMATION );
m_sourceControl = SC_NONE;
}
--- 4260,4264 ----
else
{
! AfxMessageBox( "You did not log in the SourceSafe database. You may lose synchronization with the version controlled project. You won't be able to modify read-only files.", MB_ICONEXCLAMATION );
m_sourceControl = SC_NONE;
}
***************
*** 4683,4686 ****
--- 4746,4758 ----
{
acquireFile();
+ if( isSV()) {
+ std::string owner;
+ m_parent->infoSVN( this->m_ccsItem, false, std::string(), std::string(), owner);
+ if( owner != userName()) {
+ if( IDYES == AfxMessageBox( CString( "Username mismatch found. The signature file recently locked by you, reports to be locked by user: '") + owner.c_str() + "' while you have identified initially yourself as '" + userName().c_str() + "'.\nWould you like to continue with '" + owner.c_str() + "' username?", MB_YESNO)) {
+ m_parent->replaceUserName( owner);
+ }
+ }
+ }
update( in, SignFileEntry( userName(), CTime::GetCurrentTime()));
***************
*** 5231,5234 ****
--- 5303,5312 ----
}
+ void CCoreXmlFile::replaceUserName( const std::string& p_userName)
+ {
+ m_vssUser = p_userName;
+ m_comSvn->ReplaceUserName( CComBSTR( m_vssUser.c_str()));
+ }
+
std::string CCoreXmlFile::userName()
{
***************
*** 5504,5529 ****
void CCoreXmlFile::getLatestVersion()
{
! if( isSS())
! {
! CComObjPtr<IVSSItem> projectItem;
! CComBSTR path = m_vssPath.c_str();
! COMTHROW( m_vssDatabase->get_VSSItem( path, false, &(projectItem.p)) );
! //COMTHROW( projectItem->Get( NULL, VSSFLAG_TIMEMOD ) ); // previously was 0 // VSSFLAG_TIMEMOD, VSSFLAG_TIMENOW (default), or VSSFLAG_TIMEUPD
! CComBSTR loca = m_folderPath.c_str();
! COMTHROW( projectItem->Get( &loca, VSSFLAG_TIMEMOD ) ); // previously was 0 // VSSFLAG_TIMEMOD, VSSFLAG_TIMENOW (default), or VSSFLAG_TIMEUPD
! }
! else if( isCC())
{
! // if we use dynamic views we do not need it
! //getLatestVerCC( m_folderPath.c_str() );
}
! else if( isSV())
{
! // //getLatestSVN( m_folderPath);
! if( m_svnByAPI) {
! //m_svn->getLatest( m_folderPath);
! COMTHROW( m_comSvn->GetLatest( CComBSTR( m_folderPath.c_str())));
! }
! else m_cmdSvn->getLatest( m_folderPath);
}
}
--- 5582,5615 ----
void CCoreXmlFile::getLatestVersion()
{
! try
{
! if( isSS())
! {
! CComObjPtr<IVSSItem> projectItem;
! CComBSTR path = m_vssPath.c_str();
! COMTHROW( m_vssDatabase->get_VSSItem( path, false, &(projectItem.p)) );
! //COMTHROW( projectItem->Get( NULL, VSSFLAG_TIMEMOD ) ); // previously was 0 // VSSFLAG_TIMEMOD, VSSFLAG_TIMENOW (default), or VSSFLAG_TIMEUPD
! CComBSTR loca = m_folderPath.c_str();
! COMTHROW( projectItem->Get( &loca, VSSFLAG_TIMEMOD ) ); // previously was 0 // VSSFLAG_TIMEMOD, VSSFLAG_TIMENOW (default), or VSSFLAG_TIMEUPD
! }
! else if( isCC())
! {
! // if we use dynamic views we do not need it
! //getLatestVerCC( m_folderPath.c_str() );
! }
! else if( isSV())
! {
! // //getLatestSVN( m_folderPath);
! if( m_svnByAPI) {
! //m_svn->getLatest( m_folderPath);
! COMTHROW( m_comSvn->GetLatest( CComBSTR( m_folderPath.c_str())));
! }
! else m_cmdSvn->getLatest( m_folderPath);
! }
}
! catch( hresult_exception& )
{
! AfxMessageBox( "Could not get latest version from server!");
! HR_THROW( E_UNKNOWN_STORAGE); // furthermore will be silently handled
}
}
***************
*** 5633,5642 ****
}
else if( isSV())
! {
// if keepCheckedOut => use --no-unlock: won't unlock the targets
! bool sc_com = commitSVN( m_folderPath, true, keepCheckedOut);
! if( !sc_com)
{
! sendMsg( "Could not commit all in directory " + m_folderPath, MSG_ERROR);
}
}
--- 5719,5728 ----
}
else if( isSV())
! {// sometimes there is nothing to commit here, let's try for a while to not execute this
// if keepCheckedOut => use --no-unlock: won't unlock the targets
! //bool sc_com = commitSVN( m_folderPath, true, keepCheckedOut);
! //if( !sc_com)
{
! //sendMsg( "Nothing committed or could not commit all in directory " + m_folderPath, MSG_WARNING);
}
}
***************
*** 6036,6042 ****
hr = m_comSvn->Init( CComBSTR( m_vssUser.c_str()), CComBSTR( m_vssPassword.c_str()));
if( FAILED( hr) || !m_comSvn) {
! AfxMessageBox( "SVN implementation client object could not be created!");
throw -1;
}
}
else
--- 6122,6131 ----
hr = m_comSvn->Init( CComBSTR( m_vssUser.c_str()), CComBSTR( m_vssPassword.c_str()));
if( FAILED( hr) || !m_comSvn) {
! if( hr == E_NOTIMPL) AfxMessageBox( "SVN client library is not implemented!"); // look for the #if(USESVN) macro
! else AfxMessageBox( "SVN implementation client object could not be created!");
throw -1;
}
+
+ hr = m_comSvn->Logging( m_userOpts.m_createSvnLog? VARIANT_TRUE: VARIANT_FALSE, CComBSTR( m_userOpts.m_svnLogFileName.c_str()));
}
else
***************
*** 6046,6054 ****
}
! void CCoreXmlFile::svnSetup()
{
! //getSourceSafeUserInfo(-1); // fills m_vssUser, m_vssPassword
! //svnOptions();
! //createSubversionClientImpl();
//testSubversion();
}
--- 6135,6151 ----
}
! void CCoreXmlFile::svnSetup( bool p_createOrOpen)
{
! if( getUserCredentialInfo( 1, p_createOrOpen)) // fills m_vssUser, m_vssPassword, p_createOrOpen == requireLogin
! {
! svnSshHandling();
! svnOptions();
! createSubversionClientImpl();
! }
! else
! {
! AfxMessageBox( "You did not provide login data. You may work locally but might lose synchronization with the version controlled project. You won't be able to modify read-only files.", MB_ICONEXCLAMATION );
! m_sourceControl = SC_NONE;
! }
//testSubversion();
}
***************
*** 6059,6067 ****
//m_hashInfoFound = false;
! // svnSetup()?
! getSourceSafeUserInfo(-1); // fills m_vssUser, m_vssPassword
! svnSshHandling();
! svnOptions();
! createSubversionClientImpl();
//testSubversion();
--- 6156,6164 ----
//m_hashInfoFound = false;
! svnSetup( true); // true => strictly requires login data, throws if dlg is canceled
! //getUserCredentialInfo(-1); // fills m_vssUser, m_vssPassword
! //svnSshHandling();
! //svnOptions();
! //createSubversionClientImpl();
//testSubversion();
***************
*** 6150,6155 ****
COMTHROW( m_comSvn->IsLocked( CComBSTR( fname.c_str()), &vb_locked, &bs_holder));
CopyTo( bs_holder, holder);
}
! else ret = m_cmdSvn->isLockedByUser( fname, holder);
if( ret)
--- 6247,6254 ----
COMTHROW( m_comSvn->IsLocked( CComBSTR( fname.c_str()), &vb_locked, &bs_holder));
CopyTo( bs_holder, holder);
+ ret = vb_locked == VARIANT_TRUE;
}
! else
! ret = m_cmdSvn->isLockedByUser( fname, holder);
if( ret)
***************
*** 6196,6200 ****
CComBSTR bs_holder;
COMTHROW( m_comSvn->IsLocked( CComBSTR( p_file.c_str()), &vb_locked, &bs_holder));
! if( vb_locked)
{
std::string holder;
--- 6295,6299 ----
CComBSTR bs_holder;
COMTHROW( m_comSvn->IsLocked( CComBSTR( p_file.c_str()), &vb_locked, &bs_holder));
! if( vb_locked == VARIANT_TRUE)
{
std::string holder;
Index: resource.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/resource.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** resource.h 7 Feb 2008 19:46:43 -0000 1.4
--- resource.h 13 Feb 2008 18:54:57 -0000 1.5
***************
*** 3,6 ****
--- 3,7 ----
// Used by XmlBackEnd.rc
//
+ #define IDC_ABORT 3
#define IDS_PROJNAME 100
#define IDS_COREXMLFILE_DESC 102
***************
*** 8,11 ****
--- 9,13 ----
#define IDR_SVNTESTER 104
#define IDR_SVNEXEC 105
+ #define IDR_SVNWORKBENCH 106
#define IDC_EDIT_USER 201
#define IDC_EDIT_PWD 202
***************
*** 18,21 ****
--- 20,24 ----
#define IDC_STATIC_WELCOME 208
#define IDC_MAYBESAVED 209
+ #define IDC_STATIC_WELCOME2 209
#define IDC_STATIC1 210
#define IDD_DIALOG2 211
***************
*** 27,30 ****
--- 30,51 ----
#define IDC_RADIO3 217
#define IDD_DIALOG_VSSLOGIN 218
+ #define IDD_TESTRESULTDIALOG 219
+ #define IDD_SVN_BENCH_DIALOG 220
+ #define IDC_STATUS_BUTTON 221
+ #define IDD_DIALOG_SVNLOGIN 221
+ #define IDC_INFO_BUTTON 222
+ #define IDC_CLEANUP_BUTTON 223
+ #define IDC_CLOSE_BUTTON 224
+ #define IDC_CMDEXE_BUTTON 225
+ #define IDC_RESOLVE_BUTTON 226
+ #define IDC_COMMIT_BUTTON 227
+ #define IDC_CHECKOUT_BUTTON 228
+ #define IDC_EDIT1 229
+ #define IDC_COMBO_URL_AND_PATH 230
+ #define IDC_CHECK1 231
+ #define IDC_RADIO_CACHED 232
+ #define IDC_RADIO_USPW 233
+ #define IDC_RADIO_PPK 234
+ #define IDC_EDIT_REALM 235
// Next default values for new objects
***************
*** 32,39 ****
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
! #define _APS_NEXT_RESOURCE_VALUE 219
#define _APS_NEXT_COMMAND_VALUE 32768
! #define _APS_NEXT_CONTROL_VALUE 209
! #define _APS_NEXT_SYMED_VALUE 106
#endif
#endif
--- 53,60 ----
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
! #define _APS_NEXT_RESOURCE_VALUE 232
#define _APS_NEXT_COMMAND_VALUE 32768
! #define _APS_NEXT_CONTROL_VALUE 236
! #define _APS_NEXT_SYMED_VALUE 107
#endif
#endif
Index: SvnTester.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/SvnTester.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SvnTester.cpp 7 Feb 2008 20:43:33 -0000 1.2
--- SvnTester.cpp 13 Feb 2008 18:54:57 -0000 1.3
***************
*** 19,22 ****
--- 19,23 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 37,40 ****
--- 38,45 ----
CopyTo( info_msg, p_ptrResultMsg);
}
+ else CopyTo( std::string( "Canceled."), p_ptrResultMsg);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 77,80 ****
--- 82,86 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 94,97 ****
--- 100,107 ----
CopyTo( stat_msg, p_ptrResultMsg);
}
+ else CopyTo( std::string( "Canceled."), p_ptrResultMsg);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 127,130 ****
--- 137,141 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 142,145 ****
--- 153,160 ----
m_apiSvn->cleanup( path);
}
+ else CopyTo( std::string( "Canceled."), p_ptrResultMsg);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 175,178 ****
--- 190,194 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 188,191 ****
--- 204,211 ----
m_apiSvn->resolve( path, p_recursive == VARIANT_TRUE);
}
+ else throw hresult_exception(E_FAIL);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 218,221 ****
--- 238,242 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 231,234 ****
--- 252,259 ----
m_apiSvn->commitAll( path, false);
}
+ else throw hresult_exception(E_FAIL);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 261,264 ****
--- 286,290 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 276,279 ****
--- 302,309 ----
m_apiSvn->lightCheckOut( url, ldir);
}
+ else throw hresult_exception(E_FAIL);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 309,312 ****
--- 339,343 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 322,325 ****
--- 353,360 ----
m_apiSvn->add( path, p_recursive == VARIANT_TRUE);
}
+ else throw hresult_exception(E_FAIL);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 352,355 ****
--- 387,391 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 365,368 ****
--- 401,408 ----
m_apiSvn->lockableProp( path);
}
+ else throw hresult_exception(E_FAIL);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 395,398 ****
--- 435,439 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 408,411 ****
--- 449,456 ----
m_apiSvn->tryLock( path);
}
+ else throw hresult_exception(E_FAIL);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 438,441 ****
--- 483,487 ----
if( p_byAPI == VARIANT_TRUE)
{
+ #if(USESVN)
if( getLoginData())
{
***************
*** 451,454 ****
--- 497,504 ----
m_apiSvn->unLock( path);
}
+ else throw hresult_exception(E_FAIL);
+ #else
+ return E_NOTIMPL;
+ #endif
}
else
***************
*** 490,493 ****
--- 540,545 ----
return true;
}
+ if( dlg.wasAborted())
+ throw hresult_exception(E_FAIL);
return false;
Index: CredentialDlg.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CredentialDlg.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CredentialDlg.h 7 Feb 2008 19:36:06 -0000 1.1
--- CredentialDlg.h 13 Feb 2008 18:54:57 -0000 1.2
***************
*** 1,4 ****
--- 1,5 ----
#pragma once
#include "resource.h"
+ #include "afxwin.h"
// CCredentialDlg dialog
***************
*** 9,13 ****
public:
! CCredentialDlg( bool p_maySave, const std::string& p_uName, CWnd* pParent = NULL); // standard constructor
virtual ~CCredentialDlg();
--- 10,14 ----
public:
! CCredentialDlg( bool p_userNameOnly, bool p_visibleMaySave, bool p_maySave, const std::string& p_uName, const char* p_realmStr, CWnd* pParent = NULL); // standard constructor
virtual ~CCredentialDlg();
***************
*** 20,25 ****
--- 21,32 ----
protected:
+ bool m_userNameOnly;
+ bool m_visibleMaySave;
bool m_maySave;
std::string m_suggestedName;
+ const char* m_realmStrPtr;
+
+ int m_leftPad;
+ int m_rightPad;
bool m_resMaySave;
***************
*** 28,35 ****
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
public:
- virtual BOOL OnInitDialog();
afx_msg void OnBnClickedOk();
};
--- 35,49 ----
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedOk();
+ afx_msg void OnSize(UINT nType, int cx, int cy);
+
+ CButton m_btnMaySave;
+ CEdit m_edtName;
+ CEdit m_edtWord;
+ CEdit m_edtRealm;
+ CStatic m_msgAtTheTop;
};
--- NEW FILE: SvnBench.h ---
#pragma once
#include "resource.h"
#include "afxwin.h"
// CSvnBench dialog
class CSvnBench : public CDialog
{
DECLARE_DYNAMIC(CSvnBench)
int m_rightPad;
int m_leftPad;
CString m_connStr;
public:
CSvnBench(CWnd* pParent = NULL); // standard constructor
virtual ~CSvnBench();
void init( CString p_path);
void exec( CString p_cmd, CString p_startupDir);
// Dialog Data
enum { IDD = IDD_SVN_BENCH_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnOK();
virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
public:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnBnClickedInfoButton();
afx_msg void OnBnClickedStatusButton();
afx_msg void OnBnClickedCleanupButton();
afx_msg void OnBnClickedCloseButton();
afx_msg void OnBnClickedCmdexeButton();
afx_msg void OnBnClickedResolveButton();
afx_msg void OnBnClickedCommitButton();
afx_msg void OnBnClickedCheckoutButton();
BOOL m_bRecursive;
BOOL m_bCmdExeOrAPI;
CComboBox m_lst;
CString m_lstStringVal;
};
--- NEW FILE: SvnHelper.h ---
#pragma once
#include <string>
class CSvnHelper
{
public:
CSvnHelper(void);
~CSvnHelper(void);
static void invokeInfo ( const std::string& p_url, bool p_apiAccess, bool p_recursive);
static void invokeStatus( const std::string& p_localPath, bool p_apiAccess);
static void invokeCleanUp( const std::string& p_localPath, bool p_apiAccess);
static void invokeResolve( const std::string& p_localPath, bool p_apiAccess, bool p_recursive);
static void invokeCheckout( const std::string& p_url, const std::string& p_localPath, bool p_apiAccess);
static void invokeCommit( const std::string& p_localPath, bool p_apiAccess);
};
--- NEW FILE: SvnWorkBench.cpp ---
// SvnWorkBench.cpp : Implementation of CSvnWorkBench
#include "stdafx.h"
#include ".\SvnWorkBench.h"
#include "..\Common\CommonMFC.h"
#include "SvnBench.h"
#include "SvnTestDlg.h"
// CSvnWorkBench
STDMETHODIMP CSvnWorkBench::ShowWorkBenchDlg(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CSvnBench d;
CString a_clue;
CopyTo( m_clue, a_clue);
d.init( a_clue);
d.DoModal();
return S_OK;
}
STDMETHODIMP CSvnWorkBench::SetClues(BSTR p_connString)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
m_clue = p_connString;
return S_OK;
}
STDMETHODIMP CSvnWorkBench::ShowResultDlg(BSTR p_result)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CSvnTestDlg d;
CString res;
CopyTo( p_result, res);
d.setContent( res);
d.DoModal();
return S_OK;
}
--- NEW FILE: SvnTestDlg.h ---
#pragma once
#include "resource.h"
// CSvnTestDlg dialog
class CSvnTestDlg : public CDialog
{
DECLARE_DYNAMIC(CSvnTestDlg)
public:
CSvnTestDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CSvnTestDlg();
// Dialog Data
enum { IDD = IDD_TESTRESULTDIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnSize(UINT nType, int cx, int cy);
CEdit m_field;
CButton m_btn;
public:
void setContent( const CString& p_cont);
protected:
CString m_defContent;
public:
virtual BOOL OnInitDialog();
};
Index: CertificateDlg.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CertificateDlg.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CertificateDlg.h 7 Feb 2008 19:36:06 -0000 1.1
--- CertificateDlg.h 13 Feb 2008 18:54:57 -0000 1.2
***************
*** 1,4 ****
--- 1,5 ----
#pragma once
#include "resource.h"
+ #include "afxwin.h"
// CCertificateDlg dialog
***************
*** 25,36 ****
protected:
! std::string m_text;
! bool m_permAcceptEnabled;
Response m_response;
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
public:
- virtual BOOL OnInitDialog();
afx_msg void OnBnClickedOk();
};
--- 26,44 ----
protected:
! int m_leftPad;
! int m_rightPad;
!
Response m_response;
+ std::string m_certDetails;
+ bool m_permAcceptEnabled;
+
+ CEdit m_textBox;
+
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedOk();
+ afx_msg void OnSize(UINT nType, int cx, int cy);
};
Index: SvnExec.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/SvnExec.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SvnExec.cpp 7 Feb 2008 20:43:33 -0000 1.2
--- SvnExec.cpp 13 Feb 2008 18:54:57 -0000 1.3
***************
*** 3,8 ****
#include "stdafx.h"
#include "SvnExec.h"
! #include "svauto_i.c" // this includes the IID_ISvnExec, IID_ISvnTester
!
// CSvnExec
--- 3,8 ----
#include "stdafx.h"
#include "SvnExec.h"
! #include "svauto_i.c" // this includes the IID_ISvnExec, IID_ISvnTester, IID_ISvnWorkBench
! #include ".\svnexec.h"
// CSvnExec
***************
*** 21,24 ****
--- 21,25 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 29,32 ****
--- 30,36 ----
return S_OK;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 35,38 ****
--- 39,43 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 43,46 ****
--- 48,54 ----
return S_OK;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 49,52 ****
--- 57,61 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 55,58 ****
--- 64,70 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 61,64 ****
--- 73,77 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 67,70 ****
--- 80,86 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 73,76 ****
--- 89,93 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
std::string ldir;
***************
*** 81,84 ****
--- 98,104 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 87,90 ****
--- 107,111 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 93,96 ****
--- 114,120 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 99,102 ****
--- 123,127 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 105,108 ****
--- 130,136 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 111,114 ****
--- 139,143 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 117,120 ****
--- 146,152 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 123,126 ****
--- 155,159 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 129,132 ****
--- 162,168 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 135,138 ****
--- 171,175 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 141,144 ****
--- 178,184 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 147,150 ****
--- 187,191 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 155,158 ****
--- 196,202 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 161,164 ****
--- 205,209 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string url;
CopyTo( p_url, url);
***************
*** 171,174 ****
--- 216,222 ----
return res? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 177,180 ****
--- 225,229 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph;
CopyTo( p_path, ph);
***************
*** 184,187 ****
--- 233,239 ----
return S_OK;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 190,193 ****
--- 242,246 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string ph, holder;
CopyTo( p_path, ph);
***************
*** 201,204 ****
--- 254,260 ----
return S_OK;
+ #else
+ return E_NOTIMPL;
+ #endif
}
***************
*** 207,210 ****
--- 263,267 ----
AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ #if(USESVN)
std::string un, pw;
CopyTo( p_username, un);
***************
*** 212,224 ****
m_impl = new HiClient( un, pw);
return S_OK;
}
! STDMETHODIMP CSvnExec::Logging(VARIANT_BOOL p_onoff)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
! m_impl->setLog( vb2b( p_onoff));
return S_OK;
}
--- 269,306 ----
m_impl = new HiClient( un, pw);
+ return m_impl? S_OK: E_FAIL;
+ #else
+ return E_NOTIMPL;
+ #endif
+ }
+
+ STDMETHODIMP CSvnExec::ReplaceUserName(BSTR p_userName)
+ {
+ AFX_MANAGE_STATE(AfxGetStaticModuleState());
+
+ #if(USESVN)
+ std::string un;
+ CopyTo( p_userName, un);
+ m_impl->replaceUserName( un);
+
return S_OK;
+ #else
+ return E_NOTIMPL;
+ #endif
}
! STDMETHODIMP CSvnExec::Logging(VARIANT_BOOL p_onoff, BSTR p_logFile)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
! #if(USESVN)
! std::string logfile;
! CopyTo( p_logFile, logfile);
! m_impl->setLog( vb2b( p_onoff), logfile);
return S_OK;
+ #else
+ return E_NOTIMPL;
+ #endif
}
+
- Previous message: [GME-commit] GMESRC/GME/Lib libapr.dll, NONE, 1.1 libapr.lib, NONE, 1.1 libapr.pdb, NONE, 1.1 libaprD.dll, NONE, 1.1 libaprD.lib, NONE, 1.1 libapriconv.dll, NONE, 1.1 libapriconv.lib, NONE, 1.1 libapriconv.pdb, NONE, 1.1 libapriconvD.dll, NONE, 1.1 libapriconvD.lib, NONE, 1.1 libaprutil.dll, NONE, 1.1 libaprutil.lib, NONE, 1.1 libaprutil.pdb, NONE, 1.1 libaprutilD.dll, NONE, 1.1 libaprutilD.lib, NONE, 1.1 libeay32.dll, NONE, 1.1 libeay32.lib, NONE, 1.1 libeay32D.dll, NONE, 1.1 libeay32D.lib, NONE, 1.1 libneon.lib, NONE, 1.1 libneonD.lib, NONE, 1.1 libsvn_client-1.lib, NONE, 1.1 libsvn_client-1D.lib, NONE, 1.1 libsvn_delta-1.lib, NONE, 1.1 libsvn_delta-1D.lib, NONE, 1.1 libsvn_diff-1.lib, NONE, 1.1 libsvn_diff-1D.lib, NONE, 1.1 libsvn_fs-1.lib, NONE, 1.1 libsvn_fs-1D.lib, NONE, 1.1 libsvn_fs_fs-1.lib, NONE, 1.1 libsvn_fs_fs-1D.lib, NONE, 1.1 libsvn_ra-1.lib, NONE, 1.1 libsvn_ra-1D.lib, NONE, 1.1 libsvn_ra_dav-1.lib, NONE, 1.1 libsvn_ra_dav-1D.lib, NONE, 1.1 libsvn_ra_local-1.lib, NONE, 1.1 libsvn_ra_local-1D.lib, NONE, 1.1 libsvn_ra_svn-1.lib, NONE, 1.1 l ibsvn_ra_svn-1D.lib, NONE, 1.1 libsvn_repos-1.lib, NONE, 1.1 libsvn_repos-1D.lib, NONE, 1.1 libsvn_subr-1.lib, NONE, 1.1 libsvn_subr-1D.lib, NONE, 1.1 libsvn_wc-1.lib, NONE, 1.1 libsvn_wc-1D.lib, NONE, 1.1 serf.lib, NONE, 1.1 serfD.lib, NONE, 1.1 ssleay32.dll, NONE, 1.1 ssleay32.lib, NONE, 1.1 ssleay32D.dll, NONE, 1.1 ssleay32D.lib, NONE, 1.1 xml.lib, NONE, 1.1 xmlD.lib, NONE, 1.1 zlibstat.lib, NONE, 1.1 zlibstatD.lib, NONE, 1.1
- Next message: [GME-commit] GMESRC/GME/XmlBackEnd/SVNCode CallLogger.cpp, NONE, 1.1 CallLogger.h, NONE, 1.1 Client.cpp, 1.1, 1.2 Client.h, 1.1, 1.2 ClientUtil.h, 1.1, 1.2 CmdClient.cpp, 1.1, 1.2 CmdClient.h, 1.1, 1.2 HiClient.cpp, 1.1, 1.2 HiClient.h, 1.1, 1.2 Path.cpp, 1.1, 1.2 Path.h, 1.1, 1.2 Pool.cpp, 1.1, 1.2 Pool.h, 1.1, 1.2 Prompter.cpp, 1.1, 1.2 Prompter.h, 1.1, 1.2 Revision.cpp, 1.1, 1.2 Revision.h, 1.1, 1.2 Targets.cpp, 1.1, 1.2 Targets.h, 1.1, 1.2 ThreadData.cpp, 1.1, 1.2 ThreadData.h, 1.1, 1.2 Util.cpp, 1.1, 1.2 Util.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list