• R/O
  • SSH
  • HTTPS

tortoisesvn: コミット


コミットメタ情報

リビジョン29097 (tree)
日時2021-03-31 01:25:14
作者stefankueng

ログメッセージ

use the advanced setting includeExternals when switching after a branch/tag

変更サマリ

差分

--- trunk/src/TortoiseProc/Commands/CopyCommand.cpp (revision 29096)
+++ trunk/src/TortoiseProc/Commands/CopyCommand.cpp (revision 29097)
@@ -1,6 +1,6 @@
1-// TortoiseSVN - a Windows shell extension for easy version control
1+// TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007-2012, 2014 - TortoiseSVN
3+// Copyright (C) 2007-2012, 2014, 2021 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -25,7 +25,7 @@
2525
2626 bool CopyCommand::Execute()
2727 {
28- bool bRet = false;
28+ bool bRet = false;
2929 CString msg;
3030 if (parser.HasKey(L"logmsg"))
3131 {
@@ -37,31 +37,37 @@
3737 CStringUtils::ReadStringFromTextFile(logmsgfile, msg);
3838 }
3939
40- BOOL repeat = FALSE;
40+ BOOL repeat = FALSE;
4141 CCopyDlg dlg;
4242
43- dlg.m_path = cmdLinePath;
44- CString url = parser.GetVal(L"url");
45- CString logmessage = msg;
46- SVNRev copyRev = SVNRev::REV_HEAD;
47- BOOL doSwitch = parser.HasKey(L"switchaftercopy");
48- BOOL makeParents = parser.HasKey(L"makeparents");
43+ dlg.m_path = cmdLinePath;
44+ CString url = parser.GetVal(L"url");
45+ CString logMessage = msg;
46+ SVNRev copyRev = SVNRev::REV_HEAD;
47+ BOOL doSwitch = parser.HasKey(L"switchaftercopy");
48+ BOOL makeParents = parser.HasKey(L"makeparents");
4949 do
5050 {
51- repeat = FALSE;
52- dlg.m_URL = url;
53- dlg.m_sLogMessage = logmessage;
54- dlg.m_CopyRev = copyRev;
55- dlg.m_bDoSwitch = doSwitch;
51+ repeat = FALSE;
52+ dlg.m_URL = url;
53+ dlg.m_sLogMessage = logMessage;
54+ dlg.m_CopyRev = copyRev;
55+ dlg.m_bDoSwitch = doSwitch;
5656 dlg.m_bMakeParents = makeParents;
5757 if (dlg.DoModal() == IDOK)
5858 {
59- theApp.m_pMainWnd = NULL;
59+ CRegDWORD updateExternals(L"Software\\TortoiseSVN\\IncludeExternals", true);
60+ bool ignoreExternals = false;
61+ if (dlg.m_bDoSwitch)
62+ ignoreExternals = static_cast<DWORD>(updateExternals) == 0;
63+
64+ theApp.m_pMainWnd = nullptr;
6065 CSVNProgressDlg progDlg;
6166 progDlg.SetCommand(CSVNProgressDlg::SVNProgress_Copy);
62- progDlg.SetAutoClose (parser);
67+ progDlg.SetAutoClose(parser);
6368 DWORD options = dlg.m_bDoSwitch ? ProgOptSwitchAfterCopy : ProgOptNone;
6469 options |= dlg.m_bMakeParents ? ProgOptMakeParents : ProgOptNone;
70+ options |= ignoreExternals ? ProgOptIgnoreExternals : ProgOptNone;
6571 progDlg.SetOptions(options);
6672 progDlg.SetPathList(pathList);
6773 progDlg.SetUrl(dlg.m_URL);
@@ -68,20 +74,20 @@
6874 progDlg.SetCommitMessage(dlg.m_sLogMessage);
6975 progDlg.SetRevision(dlg.m_CopyRev);
7076 progDlg.SetExternals(dlg.GetExternalsToTag());
71- url = dlg.m_URL;
72- logmessage = dlg.m_sLogMessage;
73- copyRev = dlg.m_CopyRev;
74- doSwitch = dlg.m_bDoSwitch;
77+ url = dlg.m_URL;
78+ logMessage = dlg.m_sLogMessage;
79+ copyRev = dlg.m_CopyRev;
80+ doSwitch = dlg.m_bDoSwitch;
7581 makeParents = dlg.m_bMakeParents;
7682 progDlg.DoModal();
7783 CRegDWORD err(L"Software\\TortoiseSVN\\ErrorOccurred", FALSE);
78- err = (DWORD)progDlg.DidErrorsOccur();
79- bRet = !progDlg.DidErrorsOccur();
80- repeat = progDlg.DidErrorsOccur();
84+ err = static_cast<DWORD>(progDlg.DidErrorsOccur());
85+ bRet = !progDlg.DidErrorsOccur();
86+ repeat = progDlg.DidErrorsOccur();
8187 CRegDWORD bFailRepeat = CRegDWORD(L"Software\\TortoiseSVN\\CommitReopen", FALSE);
82- if (DWORD(bFailRepeat) == FALSE)
83- repeat = false; // do not repeat if the user chose not to in the settings.
88+ if (static_cast<DWORD>(bFailRepeat) == FALSE)
89+ repeat = false; // do not repeat if the user chose not to in the settings.
8490 }
85- } while(repeat);
91+ } while (repeat);
8692 return bRet;
8793 }
\ No newline at end of file
旧リポジトリブラウザで表示