1 // TortoiseSVN - a Windows shell extension for easy version control
3 // Copyright (C) 2007-2008 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include "ImportCommand.h"
22 #include "ImportDlg.h"
23 #include "SVNProgressDlg.h"
25 bool ImportCommand::Execute()
29 dlg
.m_path
= cmdLinePath
;
30 if (dlg
.DoModal() == IDOK
)
32 TRACE(_T("url = %s\n"), (LPCTSTR
)dlg
.m_url
);
33 CSVNProgressDlg progDlg
;
34 theApp
.m_pMainWnd
= &progDlg
;
35 progDlg
.SetCommand(CSVNProgressDlg::SVNProgress_Import
);
36 if (parser
.HasVal(_T("closeonend")))
37 progDlg
.SetAutoClose(parser
.GetLongVal(_T("closeonend")));
38 progDlg
.SetOptions(dlg
.m_bIncludeIgnored
? ProgOptIncludeIgnored
: ProgOptNone
);
39 progDlg
.SetPathList(pathList
);
40 progDlg
.SetUrl(dlg
.m_url
);
41 progDlg
.SetCommitMessage(dlg
.m_sMessage
);
42 ProjectProperties props
;
43 props
.ReadPropsPathList(pathList
);
44 progDlg
.SetProjectProperties(props
);
46 bRet
= !progDlg
.DidErrorsOccur();