• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision29531 (tree)
Time2023-03-01 03:05:47
Authorstefankueng

Log Message

respect ancestry when merging to a WC

Change Summary

Incremental Difference

--- trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 29530)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 29531)
@@ -91,7 +91,7 @@
9191 #define WM_TSVN_MONITOR_TREEDROP (WM_APP + 4)
9292 #define WM_TSVN_MONITOR_SNARLREPLY (WM_APP + 5)
9393
94-#define OVERLAY_MODIFIED 1
94+#define OVERLAY_MODIFIED 1
9595
9696 auto g_snarlInterface = Snarl::V42::SnarlInterface();
9797 UINT g_snarlGlobalMsg = 0;
@@ -572,8 +572,8 @@
572572 void CLogDlg::LoadIconsForActionColumns()
573573 {
574574 // load the icons for the action columns
575- int cx = GetSystemMetrics(SM_CXSMICON);
576- int cy = GetSystemMetrics(SM_CYSMICON);
575+ int cx = GetSystemMetrics(SM_CXSMICON);
576+ int cy = GetSystemMetrics(SM_CYSMICON);
577577
578578 m_hModifiedIcon = CCommonAppUtils::LoadIconEx(IDI_ACTIONMODIFIED, cx, cy);
579579 m_hReplacedIcon = CCommonAppUtils::LoadIconEx(IDI_ACTIONREPLACED, cx, cy);
@@ -589,7 +589,7 @@
589589 {
590590 CString temp;
591591 // set up the columns
592- int c = m_logList.GetHeaderCtrl()->GetItemCount() - 1;
592+ int c = m_logList.GetHeaderCtrl()->GetItemCount() - 1;
593593 while (c >= 0)
594594 m_logList.DeleteColumn(c--);
595595 temp.LoadString(IDS_LOG_REVISION);
@@ -959,8 +959,8 @@
959959 if (ranges.size() < 2)
960960 return;
961961
962- auto begin = ranges.begin();
963- auto end = ranges.end();
962+ auto begin = ranges.begin();
963+ auto end = ranges.end();
964964
965965 auto target = begin;
966966 for (auto source = begin + 1; source != end; ++source)
@@ -977,8 +977,8 @@
977977 {
978978 struct SMarkerInfo
979979 {
980- CString sText;
981- std::wstring text;
980+ CString sText;
981+ std::wstring text;
982982
983983 std::vector<CHARRANGE> ranges;
984984 std::vector<CHARRANGE> idRanges;
@@ -985,11 +985,11 @@
985985 std::vector<CHARRANGE> revRanges;
986986 std::vector<CHARRANGE> urlRanges;
987987
988- BOOL RunRegex(ProjectProperties* project)
988+ BOOL RunRegex(ProjectProperties* project)
989989 {
990990 // turn bug ID's into links if the bugtraq: properties have been set
991991 // and we can find a match of those in the log message
992- idRanges = project->FindBugIDPositions(sText);
992+ idRanges = project->FindBugIDPositions(sText);
993993
994994 // underline all revisions mentioned in the message
995995 revRanges = CAppUtils::FindRegexMatches(text, project->GetLogRevRegex(), L"\\d+");
@@ -1248,7 +1248,7 @@
12481248
12491249 void CLogDlg::Refresh(bool autoGoOnline)
12501250 {
1251- //does the user force the cache to refresh (shift or control key down)?
1251+ // does the user force the cache to refresh (shift or control key down)?
12521252 m_nRefresh = ((GetKeyState(VK_CONTROL) < 0) || (GetKeyState(VK_SHIFT) < 0)) ? Cache : Simple;
12531253
12541254 // refreshing means re-downloading the already shown log messages
@@ -1341,7 +1341,7 @@
13411341 // rev is is revision we already have and we will receive it again
13421342 // -> fetch one extra revision to get NumberOfLogs *new* revisions
13431343
1344- m_limit = static_cast<int>(static_cast<DWORD>(CRegDWORD(L"Software\\TortoiseSVN\\NumberOfLogs", 100))) + 1;
1344+ m_limit = static_cast<int>(static_cast<DWORD>(CRegDWORD(L"Software\\TortoiseSVN\\NumberOfLogs", 100))) + 1;
13451345 InterlockedExchange(&m_bLogThreadRunning, TRUE);
13461346 SetSortArrow(&m_logList, -1, true);
13471347
@@ -1419,11 +1419,11 @@
14191419 MonitorHideDlg();
14201420 return;
14211421 }
1422- bool bWasCancelled = m_bCancelled;
1422+ bool bWasCancelled = m_bCancelled;
14231423 // canceling means stopping the working thread if it's still running.
14241424 // we do this by using the Subversion cancel callback.
14251425
1426- m_bCancelled = true;
1426+ m_bCancelled = true;
14271427
14281428 // We want to close the dialog -> give the background threads some time
14291429 // to actually finish. Otherwise, we might not save the latest data.
@@ -1492,7 +1492,7 @@
14921492 {
14931493 if (m_bLogThreadRunning)
14941494 {
1495- m_bCancelled = true;
1495+ m_bCancelled = true;
14961496
14971497 bool threadsStillRunning = !netScheduler.WaitForEmptyQueueOrTimeout(5000) || !diskScheduler.WaitForEmptyQueueOrTimeout(5000);
14981498
@@ -1586,7 +1586,7 @@
15861586 return TRUE;
15871587 }
15881588
1589-//this is the thread function which calls the subversion function
1589+// this is the thread function which calls the subversion function
15901590 void CLogDlg::LogThread()
15911591 {
15921592 InterlockedExchange(&m_bLogThreadRunning, TRUE);
@@ -1600,8 +1600,8 @@
16001600
16011601 new async::CAsyncCall(this, &CLogDlg::StatusThread, &diskScheduler);
16021602
1603- //disable the "Get All" button while we're receiving
1604- //log messages.
1603+ // disable the "Get All" button while we're receiving
1604+ // log messages.
16051605 DialogEnableWindow(IDC_GETALL, FALSE);
16061606 DialogEnableWindow(IDC_NEXTHUNDRED, FALSE);
16071607 DialogEnableWindow(IDC_HIDENONMERGEABLE, FALSE);
@@ -1997,7 +1997,7 @@
19971997 PostMessage(WM_TIMER, LOGFILTER_TIMER);
19981998 }
19991999
2000-//this is the thread function which calls the subversion function
2000+// this is the thread function which calls the subversion function
20012001 void CLogDlg::StatusThread()
20022002 {
20032003 bool bAllowStatusCheck = m_bMonitoringMode || !!static_cast<DWORD>(CRegDWORD(L"Software\\TortoiseSVN\\LogStatusCheck", TRUE));
@@ -2028,7 +2028,7 @@
20282028 // we can paste this list into a code review tool
20292029 void CLogDlg::CopyCommaSeparatedRevisionsToClipboard() const
20302030 {
2031- POSITION pos = m_logList.GetFirstSelectedItemPosition();
2031+ POSITION pos = m_logList.GetFirstSelectedItemPosition();
20322032
20332033 std::set<svn_revnum_t> setSelectedRevisions;
20342034
@@ -2257,9 +2257,9 @@
22572257 if (pLogEntry == nullptr)
22582258 continue;
22592259
2260- CString logMessage = CUnicodeUtils::StdGetUnicode(pLogEntry->GetMessageW()).c_str();
2260+ CString logMessage = CUnicodeUtils::StdGetUnicode(pLogEntry->GetMessageW()).c_str();
22612261
2262- std::set<CString> setBugIDs = m_projectProperties.FindBugIDs(logMessage);
2262+ std::set<CString> setBugIDs = m_projectProperties.FindBugIDs(logMessage);
22632263 setAllBugIDs.merge(setBugIDs);
22642264 }
22652265 }
@@ -2378,7 +2378,7 @@
23782378 if (pos == nullptr)
23792379 return; // nothing is selected, get out of here
23802380
2381- CString sPaths;
2381+ CString sPaths;
23822382
23832383 POSITION pos2 = m_changedFileListCtrl.GetFirstSelectedItemPosition();
23842384 while (pos2)
@@ -2516,11 +2516,11 @@
25162516
25172517 if (m_pFindDialog->FindNext())
25182518 {
2519- //read data from dialog
2520- CString findText = m_pFindDialog->GetFindString();
2521- bool bMatchCase = (m_pFindDialog->MatchCase() == TRUE);
2522- std::wregex pat;
2523- bool bRegex = ValidateRegexp(findText, pat, bMatchCase);
2519+ // read data from dialog
2520+ CString findText = m_pFindDialog->GetFindString();
2521+ bool bMatchCase = (m_pFindDialog->MatchCase() == TRUE);
2522+ std::wregex pat;
2523+ bool bRegex = ValidateRegexp(findText, pat, bMatchCase);
25242524
25252525 bool scanRelevantPathsOnly = (m_cShowPaths.GetState() & 0x0003) == BST_CHECKED;
25262526 CLogDlgFilter filter(findText, bRegex, LOGFILTER_ALL, bMatchCase, m_tFrom, m_tTo, scanRelevantPathsOnly, &m_mergedRevs, !!m_bHideNonMergeables, m_copyFromRev, -1);
@@ -2660,7 +2660,7 @@
26602660 {
26612661 sUrl = GetURLFromPath(m_path);
26622662 }
2663- sUrl = sUrl.Mid(m_sRepositoryRoot.GetLength());
2663+ sUrl = sUrl.Mid(m_sRepositoryRoot.GetLength());
26642664
26652665 const CLogChangedPathArray& paths = pLogEntry->GetChangedPaths();
26662666 for (size_t cp = 0; cp < paths.GetCount(); ++cp)
@@ -2793,8 +2793,8 @@
27932793 }
27942794 else
27952795 {
2796- const CLogChangedPathArray& paths = pLogEntry->GetChangedPaths();
2797- rev2 = rev1 - 1;
2796+ const CLogChangedPathArray& paths = pLogEntry->GetChangedPaths();
2797+ rev2 = rev1 - 1;
27982798 // nothing or only one revision selected in the log list
27992799
28002800 const CLogChangedPath& changedPath = m_currentChangedArray[selIndex];
@@ -2833,7 +2833,7 @@
28332833 else
28342834 {
28352835 CTSVNPath tempFile = CTempFiles::Instance().GetTempFilePath(false,
2836- CTSVNPath(changedPath.GetPath()));
2836+ CTSVNPath(changedPath.GetPath()));
28372837 CTSVNPath tempFile2 = CTempFiles::Instance().GetTempFilePath(false,
28382838 CTSVNPath(changedPath.GetPath()));
28392839 SVNRev r = rev1;
@@ -2938,15 +2938,15 @@
29382938 PLOGENTRYDATA pLogEntry = m_logEntries.GetVisible(m_logList.GetNextSelectedItem(pos));
29392939 if (pLogEntry == nullptr)
29402940 return;
2941- long rev1 = pLogEntry->GetRevision();
2942- long rev2 = rev1 - 1;
2943- CTSVNPath path = m_path;
2941+ long rev1 = pLogEntry->GetRevision();
2942+ long rev2 = rev1 - 1;
2943+ CTSVNPath path = m_path;
29442944
29452945 // See how many files under the relative root were changed in selected revision
2946- int nChanged = 0;
2947- size_t lastChangedIndex = static_cast<size_t>(-1);
2946+ int nChanged = 0;
2947+ size_t lastChangedIndex = static_cast<size_t>(-1);
29482948
2949- const CLogChangedPathArray& paths = pLogEntry->GetChangedPaths();
2949+ const CLogChangedPathArray& paths = pLogEntry->GetChangedPaths();
29502950 for (size_t c = 0; c < paths.GetCount(); ++c)
29512951 if (paths[c].IsRelevantForStartPath())
29522952 {
@@ -2993,7 +2993,7 @@
29932993 {
29942994 DialogEnableWindow(IDOK, FALSE);
29952995 SetPromptApp(&theApp);
2996- //get the filename
2996+ // get the filename
29972997 CString filepath;
29982998 if (SVN::PathIsURL(m_path))
29992999 {
@@ -3006,7 +3006,7 @@
30063006 {
30073007 ReportNoUrlOfFile(filepath);
30083008 EnableOKButton();
3009- return; //exit
3009+ return; // exit
30103010 }
30113011 }
30123012 m_bCancelled = FALSE;
@@ -3015,13 +3015,13 @@
30153015 {
30163016 ShowErrorDialog(m_hWnd);
30173017 EnableOKButton();
3018- return; //exit
3018+ return; // exit
30193019 }
30203020 // filepath is in escaped form. But since the changedpath
30213021 // is not, we have to unescape the filepath here first,
30223022 // so the escaped parts won't get escaped again in case changedpath
30233023 // needs escaping as well
3024- filepath = CPathUtils::PathUnescape(filepath);
3024+ filepath = CPathUtils::PathUnescape(filepath);
30253025
30263026 svn_node_kind_t nodeKind = svn_node_unknown;
30273027
@@ -3152,7 +3152,7 @@
31523152
31533153 LogCache::CCachedLogInfo* toUpdate = GetLogCache(CTSVNPath(m_sRepositoryRoot));
31543154
3155- CProgressDlg progDlg;
3155+ CProgressDlg progDlg;
31563156 progDlg.SetTitle(IDS_APPNAME);
31573157 progDlg.SetLine(1, CString(MAKEINTRESOURCE(IDS_PROGRESSWAIT)));
31583158 progDlg.SetTime(true);
@@ -3207,13 +3207,13 @@
32073207 SetPromptApp(&theApp);
32083208 CLogWndHourglass wait;
32093209
3210- CString url;
3210+ CString url;
32113211 if (SVN::PathIsURL(m_path))
32123212 url = m_path.GetSVNPathString();
32133213 else
32143214 url = GetURLFromPath(m_path);
32153215
3216- CString name = CString(SVN_PROP_REVISION_LOG);
3216+ CString name = CString(SVN_PROP_REVISION_LOG);
32173217
32183218 PLOGENTRYDATA pLogEntry = m_logEntries.GetVisible(index);
32193219 if (pLogEntry == nullptr)
@@ -3269,16 +3269,16 @@
32693269
32703270 BOOL CLogDlg::PreTranslateMessage(MSG* pMsg)
32713271 {
3272- CWnd* wndFocus = GetFocus();
3272+ CWnd* wndFocus = GetFocus();
32733273
32743274 // Skip Ctrl-C when copying text out of the log message or search filter
3275- BOOL bSkipAccelerator = (pMsg->message == WM_KEYDOWN &&
3275+ BOOL bSkipAccelerator = (pMsg->message == WM_KEYDOWN &&
32763276 (pMsg->wParam == L'C' || pMsg->wParam == VK_INSERT) &&
32773277 (wndFocus == GetDlgItem(IDC_MSGVIEW) || wndFocus == GetDlgItem(IDC_SEARCHEDIT)) &&
32783278 GetKeyState(VK_CONTROL) & 0x8000);
32793279
32803280 // Skip the 'Delete' key if the filter box is not empty
3281- bSkipAccelerator = bSkipAccelerator || (pMsg->message == WM_KEYDOWN &&
3281+ bSkipAccelerator = bSkipAccelerator || (pMsg->message == WM_KEYDOWN &&
32823282 (pMsg->wParam == VK_DELETE) &&
32833283 (GetDlgItem(IDC_SEARCHEDIT)->GetWindowTextLength() > 0));
32843284 if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN)
@@ -3470,7 +3470,7 @@
34703470 }
34713471 // now check whether it matches a revision
34723472 const std::wregex regMatch(m_projectProperties.GetLogRevRegex(),
3473- std::regex_constants::icase | std::regex_constants::ECMAScript);
3473+ std::regex_constants::icase | std::regex_constants::ECMAScript);
34743474 const std::wsregex_iterator end;
34753475 std::wstring s = static_cast<LPCWSTR>(msg);
34763476 for (std::wsregex_iterator it(s.begin(), s.end(), regMatch); it != end; ++it)
@@ -3557,7 +3557,7 @@
35573557
35583558 std::map<__time64_t, PLOGENTRYDATA> revsByDate;
35593559
3560- std::set<svn_revnum_t> revisionsCovered;
3560+ std::set<svn_revnum_t> revisionsCovered;
35613561 for (size_t i = 0; i < m_logEntries.GetVisibleCount(); ++i)
35623562 {
35633563 PLOGENTRYDATA entry = m_logEntries.GetVisible(i);
@@ -3597,7 +3597,7 @@
35973597 {
35983598 NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>(pNMHDR);
35993599 // Take the default processing unless we set this to something else below.
3600- *pResult = CDRF_DODEFAULT;
3600+ *pResult = CDRF_DODEFAULT;
36013601
36023602 if (m_bLogThreadRunning)
36033603 return;
@@ -3680,11 +3680,11 @@
36803680 if (pLogEntry == nullptr)
36813681 return;
36823682
3683- int nIcons = 0;
3684- int iconWidth = ::GetSystemMetrics(SM_CXSMICON);
3685- int iconHeight = ::GetSystemMetrics(SM_CYSMICON);
3683+ int nIcons = 0;
3684+ int iconWidth = ::GetSystemMetrics(SM_CXSMICON);
3685+ int iconHeight = ::GetSystemMetrics(SM_CYSMICON);
36863686
3687- CRect rect = DrawListColumnBackground(m_logList, pLVCD, pLogEntry);
3687+ CRect rect = DrawListColumnBackground(m_logList, pLVCD, pLogEntry);
36883688 CMemDC myDC(*CDC::FromHandle(pLVCD->nmcd.hdc), rect);
36893689 BitBlt(myDC.GetDC(), rect.left, rect.top, rect.Width(), rect.Height(), pLVCD->nmcd.hdc, rect.left, rect.top, SRCCOPY);
36903690
@@ -3754,7 +3754,7 @@
37543754 return;
37553755 }
37563756 break;
3757- case 4: //message or bug id
3757+ case 4: // message or bug id
37583758 if (pLogEntry == nullptr)
37593759 return;
37603760 if (m_bShowBugtraqColumn)
@@ -3802,7 +3802,7 @@
38023802 else if (CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage)
38033803 {
38043804 // Tell Windows to send draw notifications for each subitem.
3805- *pResult = CDRF_NOTIFYSUBITEMDRAW;
3805+ *pResult = CDRF_NOTIFYSUBITEMDRAW;
38063806
38073807 COLORREF crText = CTheme::Instance().IsDarkTheme() ? CTheme::darkTextColor : GetSysColor(COLOR_WINDOWTEXT);
38083808 bool bGrayed = false;
@@ -3968,13 +3968,13 @@
39683968 std::vector<CHARRANGE> ranges = m_filter.GetMatchRanges(matchText);
39693969 if (!ranges.empty())
39703970 {
3971- int drawPos = 0;
3971+ int drawPos = 0;
39723972
39733973 // even though we initialize the 'rect' here with nmcd.rc,
39743974 // we must not use it but use the rects from GetItemRect()
39753975 // and GetSubItemRect(). Because on XP, the nmcd.rc has
39763976 // bogus data in it.
3977- CRect rect = pLVCD->nmcd.rc;
3977+ CRect rect = pLVCD->nmcd.rc;
39783978
39793979 // find the margin where the text label starts
39803980 CRect labelRC, boundsRC, iconRC;
@@ -4068,7 +4068,7 @@
40684068 InflateRect(&rect, -(2 * borderWidth), 0);
40694069
40704070 rect.left += leftMargin;
4071- RECT rc = rect;
4071+ RECT rc = rect;
40724072
40734073 // is the column left- or right-aligned? (we don't handle centered (yet))
40744074 LVCOLUMN column;
@@ -4139,16 +4139,16 @@
41394139 CRect messageViewRect;
41404140 GetDlgItem(IDC_MSGVIEW)->GetClientRect(messageViewRect);
41414141
4142- int messageViewDelta = max(-delta, 20 - messageViewRect.Height());
4143- int changeFileListDelta = -delta - messageViewDelta;
4142+ int messageViewDelta = max(-delta, 20 - messageViewRect.Height());
4143+ int changeFileListDelta = -delta - messageViewDelta;
41444144
41454145 // set new sizes & positions
41464146
4147- auto hdwp = BeginDeferWindowPos(4);
4148- hdwp = CSplitterControl::ChangeRect(hdwp, &m_logList, 0, 0, 0, delta);
4149- hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_MSGVIEW), 0, delta, 0, delta + messageViewDelta);
4150- hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_SPLITTERBOTTOM), 0, -changeFileListDelta, 0, -changeFileListDelta);
4151- hdwp = CSplitterControl::ChangeRect(hdwp, &m_changedFileListCtrl, 0, -changeFileListDelta, 0, 0);
4147+ auto hdwp = BeginDeferWindowPos(4);
4148+ hdwp = CSplitterControl::ChangeRect(hdwp, &m_logList, 0, 0, 0, delta);
4149+ hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_MSGVIEW), 0, delta, 0, delta + messageViewDelta);
4150+ hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_SPLITTERBOTTOM), 0, -changeFileListDelta, 0, -changeFileListDelta);
4151+ hdwp = CSplitterControl::ChangeRect(hdwp, &m_changedFileListCtrl, 0, -changeFileListDelta, 0, 0);
41524152 EndDeferWindowPos(hdwp);
41534153
41544154 AddMainAnchors();
@@ -4171,15 +4171,15 @@
41714171 CRect messageViewRect;
41724172 GetDlgItem(IDC_MSGVIEW)->GetClientRect(messageViewRect);
41734173
4174- int messageViewDelta = max(delta, 20 - messageViewRect.Height());
4175- int logListDelta = delta - messageViewDelta;
4174+ int messageViewDelta = max(delta, 20 - messageViewRect.Height());
4175+ int logListDelta = delta - messageViewDelta;
41764176
41774177 // set new sizes & positions
4178- auto hdwp = BeginDeferWindowPos(4);
4179- hdwp = CSplitterControl::ChangeRect(hdwp, &m_logList, 0, 0, 0, logListDelta);
4180- hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_SPLITTERTOP), 0, logListDelta, 0, logListDelta);
4181- hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_MSGVIEW), 0, logListDelta, 0, logListDelta + messageViewDelta);
4182- hdwp = CSplitterControl::ChangeRect(hdwp, &m_changedFileListCtrl, 0, delta, 0, 0);
4178+ auto hdwp = BeginDeferWindowPos(4);
4179+ hdwp = CSplitterControl::ChangeRect(hdwp, &m_logList, 0, 0, 0, logListDelta);
4180+ hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_SPLITTERTOP), 0, logListDelta, 0, logListDelta);
4181+ hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_MSGVIEW), 0, logListDelta, 0, logListDelta + messageViewDelta);
4182+ hdwp = CSplitterControl::ChangeRect(hdwp, &m_changedFileListCtrl, 0, delta, 0, 0);
41834183 EndDeferWindowPos(hdwp);
41844184
41854185 AddMainAnchors();
@@ -4447,7 +4447,7 @@
44474447 NMLVDISPINFO* pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);
44484448
44494449 // Create a pointer to the item
4450- LV_ITEM* pItem = &(pDispInfo)->item;
4450+ LV_ITEM* pItem = &(pDispInfo)->item;
44514451
44524452 // Which item number?
44534453 size_t itemId = pItem->iItem;
@@ -4469,12 +4469,12 @@
44694469 UINT state = m_logList.GetItemState(pItem->iItem, LVIS_SELECTED);
44704470 if (state & LVIS_SELECTED)
44714471 {
4472- //Turn check box on
4472+ // Turn check box on
44734473 pItem->state = INDEXTOSTATEIMAGEMASK(2);
44744474 }
44754475 else
44764476 {
4477- //Turn check box off
4477+ // Turn check box off
44784478 pItem->state = INDEXTOSTATEIMAGEMASK(1);
44794479 }
44804480 }
@@ -4494,7 +4494,7 @@
44944494 // Which column?
44954495 switch (pItem->iSubItem)
44964496 {
4497- case 0: //revision
4497+ case 0: // revision
44984498 if (pLogEntry)
44994499 {
45004500 swprintf_s(pItem->pszText, pItem->cchTextMax, L"%ld", pLogEntry->GetRevision());
@@ -4517,7 +4517,7 @@
45174517 if (pLogEntry)
45184518 lstrcpyn(pItem->pszText, L"Action column" /*L"XXXXXXXXXXXXXXXX"*/, pItem->cchTextMax - 1);
45194519 break;
4520- case 2: //author
4520+ case 2: // author
45214521 if (pLogEntry)
45224522 {
45234523 lstrcpyn(pItem->pszText, CUnicodeUtils::StdGetUnicode(pLogEntry->GetAuthor()).c_str(),
@@ -4524,7 +4524,7 @@
45244524 pItem->cchTextMax - 1);
45254525 }
45264526 break;
4527- case 3: //date
4527+ case 3: // date
45284528 if (pLogEntry)
45294529 {
45304530 lstrcpyn(pItem->pszText, CUnicodeUtils::StdGetUnicode(pLogEntry->GetDateString()).c_str(),
@@ -4531,7 +4531,7 @@
45314531 pItem->cchTextMax - 1);
45324532 }
45334533 break;
4534- case 4: //message or bug id
4534+ case 4: // message or bug id
45354535 if (m_bShowBugtraqColumn)
45364536 {
45374537 if (pLogEntry)
@@ -4573,11 +4573,11 @@
45734573
45744574 void CLogDlg::OnLvnGetdispinfoChangedFileList(NMHDR* pNMHDR, LRESULT* pResult)
45754575 {
4576- *pResult = 0;
4576+ *pResult = 0;
45774577
45784578 NMLVDISPINFO* pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);
4579- //Create a pointer to the item
4580- LV_ITEM* pItem = &(pDispInfo)->item;
4579+ // Create a pointer to the item
4580+ LV_ITEM* pItem = &(pDispInfo)->item;
45814581
45824582 if (m_bLogThreadRunning)
45834583 {
@@ -4598,25 +4598,25 @@
45984598 return;
45994599 }
46004600
4601- //Does the list need text information?
4601+ // Does the list need text information?
46024602 if (pItem->mask & LVIF_TEXT)
46034603 {
4604- //Which column?
4604+ // Which column?
46054605 switch (pItem->iSubItem)
46064606 {
4607- case 0: //path
4607+ case 0: // path
46084608 lstrcpyn(pItem->pszText, static_cast<LPCWSTR>(m_currentChangedArray.GetCount() > 0 ? m_currentChangedArray[pItem->iItem].GetPath() : m_currentChangedPathList[pItem->iItem].GetSVNPathString()), pItem->cchTextMax - 1);
46094609 break;
46104610
4611- case 1: //Action
4611+ case 1: // Action
46124612 lstrcpyn(pItem->pszText, m_bSingleRevision && m_currentChangedArray.GetCount() > static_cast<size_t>(pItem->iItem) ? static_cast<LPCWSTR>(CUnicodeUtils::GetUnicode(m_currentChangedArray[pItem->iItem].GetActionString().c_str())) : L"", pItem->cchTextMax - 1);
46134613 break;
46144614
4615- case 2: //copyfrom path
4615+ case 2: // copyfrom path
46164616 lstrcpyn(pItem->pszText, m_bSingleRevision && m_currentChangedArray.GetCount() > static_cast<size_t>(pItem->iItem) ? static_cast<LPCWSTR>(m_currentChangedArray[pItem->iItem].GetCopyFromPath()) : L"", pItem->cchTextMax - 1);
46174617 break;
46184618
4619- case 3: //revision
4619+ case 3: // revision
46204620 svn_revnum_t revision = 0;
46214621 if (m_bSingleRevision && m_currentChangedArray.GetCount() > static_cast<size_t>(pItem->iItem))
46224622 revision = m_currentChangedArray[pItem->iItem].GetCopyFromRev();
@@ -4849,7 +4849,7 @@
48494849 if (pLogEntry)
48504850 {
48514851 CString sRevMsg;
4852- sRevMsg.FormatMessage(m_sMultiLogFormat, //L"r%1!ld!\n%2!s!\n---------------------\n",
4852+ sRevMsg.FormatMessage(m_sMultiLogFormat, // L"r%1!ld!\n%2!s!\n---------------------\n",
48534853 pLogEntry->GetRevision(),
48544854 static_cast<LPCWSTR>(pLogEntry->GetShortMessageUTF16()));
48554855 sMessageSketch += sRevMsg;
@@ -4856,9 +4856,9 @@
48564856 const CLogChangedPathArray& cPathArray = pLogEntry->GetChangedPaths();
48574857 for (size_t cpPathIndex = 0; cpPathIndex < cPathArray.GetCount(); ++cpPathIndex)
48584858 {
4859- const CLogChangedPath& cPath = cPathArray[cpPathIndex];
4859+ const CLogChangedPath& cPath = cPathArray[cpPathIndex];
48604860
4861- LogCache::index_t pathID = cPath.GetCachedPath().GetIndex();
4861+ LogCache::index_t pathID = cPath.GetCachedPath().GetIndex();
48624862 if (pathIDsAdded.contains(pathID))
48634863 continue;
48644864
@@ -4903,7 +4903,7 @@
49034903 void CLogDlg::OnLvnColumnclick(NMHDR* pNMHDR, LRESULT* pResult)
49044904 {
49054905 if ((m_bLogThreadRunning) || (m_logList.HasText()))
4906- return; //no sorting while the arrays are filled
4906+ return; // no sorting while the arrays are filled
49074907 LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
49084908 const int nColumn = pNMLV->iSubItem;
49094909 m_bAscending = nColumn == m_nSortColumn ? !m_bAscending : TRUE;
@@ -4956,7 +4956,7 @@
49564956 void CLogDlg::OnLvnColumnclickChangedFileList(NMHDR* pNMHDR, LRESULT* pResult)
49574957 {
49584958 if ((m_bLogThreadRunning) || (m_logList.HasText()))
4959- return; //no sorting while the arrays are filled
4959+ return; // no sorting while the arrays are filled
49604960
49614961 LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
49624962 const int nColumn = pNMLV->iSubItem;
@@ -5200,7 +5200,7 @@
52005200 {
52015201 m_endRev = 0;
52025202
5203- m_limit = 0;
5203+ m_limit = 0;
52045204 Refresh();
52055205 }
52065206
@@ -5277,8 +5277,8 @@
52775277 pCmi->selLogEntry = m_logEntries.GetVisible(indexNext);
52785278 if (pCmi->selLogEntry == nullptr)
52795279 return false;
5280- pCmi->revSelected = pCmi->selLogEntry->GetRevision();
5281- pCmi->revPrevious = static_cast<svn_revnum_t>(pCmi->revSelected) - 1;
5280+ pCmi->revSelected = pCmi->selLogEntry->GetRevision();
5281+ pCmi->revPrevious = static_cast<svn_revnum_t>(pCmi->revSelected) - 1;
52825282
52835283 const CLogChangedPathArray& paths = pCmi->selLogEntry->GetChangedPaths();
52845284 if (paths.GetCount() <= 2)
@@ -5761,7 +5761,7 @@
57615761 if (pCmi->pathURL.IsEmpty())
57625762 {
57635763 ReportNoUrlOfFile(m_path.GetUIPathString());
5764- return; //exit
5764+ return; // exit
57655765 }
57665766
57675767 if (ConfirmRevert(m_path.GetUIPathString()))
@@ -5785,7 +5785,7 @@
57855785 if (pCmi->pathURL.IsEmpty())
57865786 {
57875787 ReportNoUrlOfFile(m_path.GetUIPathString());
5788- return; //exit
5788+ return; // exit
57895789 }
57905790
57915791 CString path = m_path.GetWinPathString();
@@ -5832,7 +5832,7 @@
58325832 }
58335833 CSVNProgressDlg dlg;
58345834 dlg.SetCommand(CSVNProgressDlg::SVNProgress_Merge);
5835- dlg.SetOptions(ProgOptIgnoreAncestry | ProgOptAllowMixedRev);
5835+ dlg.SetOptions(ProgOptAllowMixedRev);
58365836 dlg.SetPathList(CTSVNPathList(CTSVNPath(path)));
58375837 dlg.SetUrl(pCmi->pathURL);
58385838 dlg.SetSecondUrl(pCmi->pathURL);
@@ -5849,7 +5849,7 @@
58495849 if (pCmi->pathURL.IsEmpty())
58505850 {
58515851 ReportNoUrlOfFile(m_path.GetUIPathString());
5852- return; //exit
5852+ return; // exit
58535853 }
58545854
58555855 if (ConfirmRevert(m_path.GetWinPath(), true))
@@ -5874,7 +5874,7 @@
58745874 if (pCmi->pathURL.IsEmpty())
58755875 {
58765876 ReportNoUrlOfFile(m_path.GetUIPathString());
5877- return; //exit
5877+ return; // exit
58785878 }
58795879
58805880 CCopyDlg dlg;
@@ -5909,7 +5909,7 @@
59095909
59105910 void CLogDlg::ExecuteCompareWithWorkingCopyMenuRevisions(std::shared_ptr<CContextMenuInfoForRevisions>& pCmi)
59115911 {
5912- //user clicked on the menu item "compare with working copy"
5912+ // user clicked on the menu item "compare with working copy"
59135913 if (PromptShown())
59145914 {
59155915 auto f = [=]() {
@@ -5947,7 +5947,7 @@
59475947 {
59485948 nodeKind = m_path.IsDirectory() ? svn_node_dir : svn_node_file;
59495949 }
5950- //user clicked on the menu item "compare revisions"
5950+ // user clicked on the menu item "compare revisions"
59515951 if (PromptShown())
59525952 {
59535953 auto f = [=]() {
@@ -6005,8 +6005,8 @@
60056005
60066006 void CLogDlg::ExecuteBlameCompareMenuRevisions(std::shared_ptr<CContextMenuInfoForRevisions>& pCmi)
60076007 {
6008- //user clicked on the menu item "compare with working copy"
6009- //now first get the revision which is selected
6008+ // user clicked on the menu item "compare with working copy"
6009+ // now first get the revision which is selected
60106010 if (PromptShown())
60116011 {
60126012 auto f = [=]() {
@@ -6030,7 +6030,7 @@
60306030
60316031 void CLogDlg::ExecuteBlameTwoMenuRevisions(std::shared_ptr<CContextMenuInfoForRevisions>& pCmi)
60326032 {
6033- //user clicked on the menu item "compare and blame revisions"
6033+ // user clicked on the menu item "compare and blame revisions"
60346034 svn_node_kind_t nodekind = svn_node_unknown;
60356035 if (!m_path.IsUrl())
60366036 {
@@ -6062,7 +6062,7 @@
60626062
60636063 void CLogDlg::ExecuteWithPreviousMenuRevisions(std::shared_ptr<CContextMenuInfoForRevisions>& pCmi)
60646064 {
6065- //user clicked on the menu item "Compare and Blame with previous revision"
6065+ // user clicked on the menu item "Compare and Blame with previous revision"
60666066 svn_node_kind_t nodekind = svn_node_unknown;
60676067 if (!m_path.IsUrl())
60686068 {
@@ -6093,7 +6093,7 @@
60936093
60946094 void CLogDlg::ExecuteSaveAsMenuRevisions(std::shared_ptr<CContextMenuInfoForRevisions>& pCmi)
60956095 {
6096- //now first get the revision which is selected
6096+ // now first get the revision which is selected
60976097 CString revFilename;
60986098 CString strWinPath = CPathUtils::GetFileNameFromPath(pCmi->pathURL);
60996099 strWinPath = CPathUtils::PathUnescape(strWinPath);
@@ -6194,7 +6194,7 @@
61946194 bool textViewer = !!dlg.m_bTextView;
61956195 CString options = SVN::GetOptionsString(!!dlg.m_bIgnoreEOL, dlg.m_ignoreSpaces);
61966196
6197- auto f = [=]() {
6197+ auto f = [=]() {
61986198 CoInitialize(nullptr);
61996199 OnOutOfScope(CoUninitialize());
62006200 this->EnableWindow(FALSE);
@@ -6202,12 +6202,12 @@
62026202
62036203 CBlame blame;
62046204 CString tempFile = blame.BlameToTempFile(m_path, startRev, endRev, m_pegRev,
6205- options, includeMerge, TRUE, TRUE);
6205+ options, includeMerge, TRUE, TRUE);
62066206 if (!tempFile.IsEmpty())
62076207 {
62086208 if (textViewer)
62096209 {
6210- //open the default text editor for the result file
6210+ // open the default text editor for the result file
62116211 CAppUtils::StartTextViewer(tempFile);
62126212 }
62136213 else
@@ -6214,11 +6214,11 @@
62146214 {
62156215 CString sParams = L"/path:\"" + m_path.GetSVNPathString() + L"\" ";
62166216 CAppUtils::LaunchTortoiseBlame(tempFile,
6217- CPathUtils::GetFileNameFromPath(m_path.GetFileOrDirectoryName()),
6218- sParams,
6219- startRev,
6220- endRev,
6221- m_pegRev);
6217+ CPathUtils::GetFileNameFromPath(m_path.GetFileOrDirectoryName()),
6218+ sParams,
6219+ startRev,
6220+ endRev,
6221+ m_pegRev);
62226222 }
62236223 }
62246224 else
@@ -6339,16 +6339,16 @@
63396339 // need this shortcut that can't easily go into the helper class
63406340 const CLogChangedPath& changedLogPath = m_currentChangedArray[selIndex];
63416341
6342- //entry is selected, now show the popup menu
6343- CIconMenu popup;
6344- CIconMenu clipSubMenu;
6342+ // entry is selected, now show the popup menu
6343+ CIconMenu popup;
6344+ CIconMenu clipSubMenu;
63456345 if (!clipSubMenu.CreatePopupMenu())
63466346 return;
63476347
63486348 PopulateContextMenuForChangedPaths(pCmi, popup, clipSubMenu);
63496349 int cmd = popup.TrackPopupMenu(TPM_RETURNCMD | TPM_LEFTALIGN | TPM_NONOTIFY |
6350- TPM_RIGHTBUTTON,
6351- point.x, point.y, this, nullptr);
6350+ TPM_RIGHTBUTTON,
6351+ point.x, point.y, this, nullptr);
63526352 CLogWndHourglass wait;
63536353
63546354 switch (cmd)
@@ -6476,7 +6476,7 @@
64766476 GetDlgItem(IDC_LOGINFO)->GetWindowRect(rcBottomLimit);
64776477 ScreenToClient(rcBottomLimit);
64786478
6479- auto minCtrlHeight = MIN_CTRL_HEIGHT;
6479+ auto minCtrlHeight = MIN_CTRL_HEIGHT;
64806480
64816481 // the IDC_LOGINFO and the changed file list control
64826482 // have a space of 3 dlg units between them (check in the dlg resource editor)
@@ -6644,7 +6644,7 @@
66446644
66456645 // Draw the icon(s) into the compatible DC
66466646
6647- DWORD actions = pLogEntry->GetChangedPaths().GetActions();
6647+ DWORD actions = pLogEntry->GetChangedPaths().GetActions();
66486648
66496649 std::string actionText;
66506650 if (actions & LOGACTIONS_MODIFIED)
@@ -6924,7 +6924,7 @@
69246924 entry.dwSize = sizeof(PROCESSENTRY32);
69256925 m_bVisualStudioRunningAtStart = false;
69266926
6927- CAutoGeneralHandle snapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
6927+ CAutoGeneralHandle snapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
69286928
69296929 if (Process32First(snapShot, &entry))
69306930 {
@@ -7030,12 +7030,12 @@
70307030
70317031 CString CLogDlg::GetWcPathFromUrl(CString url)
70327032 {
7033- CString fileUrl = GetRepositoryRoot(m_path) + url.Trim();
7033+ CString fileUrl = GetRepositoryRoot(m_path) + url.Trim();
70347034 // firstfile = (e.g.) http://mydomain.com/repos/trunk/folder/file1
70357035 // sUrl = http://mydomain.com/repos/trunk/folder
70367036 CString sUnescapedUrl = CPathUtils::PathUnescape(GetSUrl());
70377037 // find out until which char the urls are identical
7038- int j = 0;
7038+ int j = 0;
70397039 while ((j < fileUrl.GetLength()) && (j < sUnescapedUrl.GetLength()) && (fileUrl[j] == sUnescapedUrl[j]))
70407040 {
70417041 j++;
@@ -7069,7 +7069,7 @@
70697069 _bstr_t bstrFileName(filename);
70707070
70717071 // ok, open one file in VS
7072- HRESULT result = pItemOperations->OpenFile(bstrFileName, bstrKind, &pWindow);
7072+ HRESULT result = pItemOperations->OpenFile(bstrFileName, bstrKind, &pWindow);
70737073 if (FAILED(result))
70747074 return false;
70757075 return true;
@@ -7204,8 +7204,8 @@
72047204
72057205 bool CLogDlg::GetContextMenuInfoForChangedPaths(ContextMenuInfoForChangedPathsPtr& pCmi)
72067206 {
7207- POSITION pos = m_logList.GetFirstSelectedItemPosition();
7208- INT_PTR selIndex = m_changedFileListCtrl.GetSelectionMark();
7207+ POSITION pos = m_logList.GetFirstSelectedItemPosition();
7208+ INT_PTR selIndex = m_changedFileListCtrl.GetSelectionMark();
72097209
72107210 PLOGENTRYDATA pLogEntry = m_logEntries.GetVisible(m_logList.GetNextSelectedItem(pos));
72117211 if (pLogEntry == nullptr)
@@ -7244,7 +7244,7 @@
72447244 {
72457245 // only one revision is selected in the log dialog top pane
72467246 // but multiple items could be selected in the changed items list
7247- pCmi->rev2 = pCmi->rev1 - 1;
7247+ pCmi->rev2 = pCmi->rev1 - 1;
72487248
72497249 POSITION pos2 = m_changedFileListCtrl.GetFirstSelectedItemPosition();
72507250 while (pos2)
@@ -7251,7 +7251,7 @@
72517251 {
72527252 const CLogChangedPathArray& paths = pLogEntry->GetChangedPaths();
72537253
7254- int nItem = m_changedFileListCtrl.GetNextSelectedItem(pos2);
7254+ int nItem = m_changedFileListCtrl.GetNextSelectedItem(pos2);
72557255 pCmi->changedLogPathIndices.push_back(static_cast<size_t>(nItem));
72567256 if ((m_cShowPaths.GetState() & 0x0003) == BST_CHECKED)
72577257 {
@@ -7295,7 +7295,7 @@
72957295 }
72967296 }
72977297
7298- pCmi->sUrl = GetSUrl();
7298+ pCmi->sUrl = GetSUrl();
72997299
73007300 // find the working copy path of the selected item from the URL
73017301 CString sUrlRoot = GetRepositoryRoot(m_path);
@@ -7488,13 +7488,13 @@
74887488
74897489 DialogEnableWindow(IDOK, FALSE);
74907490 SetPromptApp(&theApp);
7491- CTSVNPath tsvnfilepath = CTSVNPath(pCmi->fileUrl);
7491+ CTSVNPath tsvnfilepath = CTSVNPath(pCmi->fileUrl);
74927492
74937493 CProgressDlg progDlg;
74947494 progDlg.SetTitle(IDS_APPNAME);
74957495 CString sInfoLine;
74967496 sInfoLine.FormatMessage(IDS_PROGRESSGETFILEREVISION, static_cast<LPCWSTR>(pCmi->fileUrl),
7497- static_cast<LPCWSTR>(getRev.ToString()));
7497+ static_cast<LPCWSTR>(getRev.ToString()));
74987498 progDlg.SetLine(1, sInfoLine, true);
74997499 SetAndClearProgressInfo(&progDlg);
75007500 progDlg.ShowModeless(m_hWnd);
@@ -7521,8 +7521,8 @@
75217521 CAppUtils::GetMimeType(tsvnfilepath, mimetype);
75227522
75237523 CAppUtils::StartExtDiff(tempFile, CTSVNPath(pCmi->wcPath), sName1, sName2, tsvnfilepath, tsvnfilepath,
7524- getRev, getRev, getRev, flags, 0,
7525- CPathUtils::GetFileNameFromPath(pCmi->fileUrl), mimetype);
7524+ getRev, getRev, getRev, flags, 0,
7525+ CPathUtils::GetFileNameFromPath(pCmi->fileUrl), mimetype);
75267526 EnableOKButton();
75277527 };
75287528 new async::CAsyncCall(f, &netScheduler);
@@ -7610,7 +7610,7 @@
76107610 // tell the user how to work around this.
76117611 TaskDialog(GetSafeHwnd(), AfxGetResourceHandle(), MAKEINTRESOURCE(IDS_APPNAME), MAKEINTRESOURCE(IDS_ERR_ERROROCCURED), MAKEINTRESOURCE(IDS_LOG_REVERTREV_ERROR), TDCBF_OK_BUTTON, TD_ERROR_ICON, nullptr);
76127612 EnableOKButton();
7613- return; //exit
7613+ return; // exit
76147614 }
76157615 dlg.SetCommand(CSVNProgressDlg::SVNProgress_Merge);
76167616 dlg.SetOptions(ProgOptIgnoreAncestry | ProgOptAllowMixedRev);
@@ -7654,12 +7654,12 @@
76547654 ReportNoUrlOfFile(m_path.GetWinPath());
76557655 return;
76567656 }
7657- m_bCancelled = false;
7658- CString sRoot = GetRepositoryRoot(CTSVNPath(pCmi->fileUrl));
7659- CString sUrlRootUnescaped = CPathUtils::PathUnescape(sRoot);
7657+ m_bCancelled = false;
7658+ CString sRoot = GetRepositoryRoot(CTSVNPath(pCmi->fileUrl));
7659+ CString sUrlRootUnescaped = CPathUtils::PathUnescape(sRoot);
76607660 // if more than one entry is selected, we save them
76617661 // one by one into a folder the user has selected
7662- bool bTargetSelected = false;
7662+ bool bTargetSelected = false;
76637663 CTSVNPath targetPath;
76647664 if (m_changedFileListCtrl.GetSelectedCount() > 1)
76657665 {
@@ -7702,9 +7702,9 @@
77027702 {
77037703 const CLogChangedPath& changedLogPathI = m_currentChangedArray[pCmi->changedLogPathIndices[i]];
77047704
7705- SVNRev getrev = (changedLogPathI.GetAction() == LOGACTIONS_DELETED) ? pCmi->rev2 : pCmi->rev1;
7705+ SVNRev getrev = (changedLogPathI.GetAction() == LOGACTIONS_DELETED) ? pCmi->rev2 : pCmi->rev1;
77067706
7707- CString sInfoLine;
7707+ CString sInfoLine;
77087708 sInfoLine.FormatMessage(IDS_PROGRESSGETFILEREVISION,
77097709 static_cast<LPCWSTR>(CPathUtils::GetFileNameFromPath(changedLogPathI.GetPath())),
77107710 static_cast<LPCWSTR>(getrev.ToString()));
@@ -7747,7 +7747,7 @@
77477747 {
77487748 DialogEnableWindow(IDOK, FALSE);
77497749 SetPromptApp(&theApp);
7750- m_bCancelled = false;
7750+ m_bCancelled = false;
77517751
77527752 bool bTargetSelected = false;
77537753 CTSVNPath targetPath;
@@ -7782,9 +7782,9 @@
77827782
77837783 const CString& schangedlogpath = m_currentChangedArray[pCmi->changedLogPathIndices[i]].GetPath();
77847784
7785- SVNRev getRev = pCmi->rev1;
7785+ SVNRev getRev = pCmi->rev1;
77867786
7787- CTSVNPath tempFile = targetPath;
7787+ CTSVNPath tempFile = targetPath;
77887788 tempFile.AppendPathString(schangedlogpath);
77897789
77907790 CString sInfoLine;
@@ -7857,12 +7857,12 @@
78577857 OnOutOfScope(this->EnableWindow(TRUE); this->SetFocus());
78587858 CBlame blame;
78597859 CString tempFile = blame.BlameToTempFile(CTSVNPath(pCmi->fileUrl), startRev,
7860- endRev, pegRev, options, includeMerge, TRUE, TRUE);
7860+ endRev, pegRev, options, includeMerge, TRUE, TRUE);
78617861 if (!tempFile.IsEmpty())
78627862 {
78637863 if (textView)
78647864 {
7865- //open the default text editor for the result file
7865+ // open the default text editor for the result file
78667866 CAppUtils::StartTextViewer(tempFile);
78677867 }
78687868 else
@@ -7869,11 +7869,11 @@
78697869 {
78707870 CString sParams = L"/path:\"" + pCmi->fileUrl + L"\" ";
78717871 CAppUtils::LaunchTortoiseBlame(tempFile,
7872- CPathUtils::GetFileNameFromPath(pCmi->fileUrl),
7873- sParams,
7874- startRev,
7875- endRev,
7876- pegRev);
7872+ CPathUtils::GetFileNameFromPath(pCmi->fileUrl),
7873+ sParams,
7874+ startRev,
7875+ endRev,
7876+ pegRev);
78777877 }
78787878 }
78797879 else
@@ -7989,14 +7989,14 @@
79897989
79907990 void CLogDlg::CopyChangedPathInfoToClipboard(ContextMenuInfoForChangedPathsPtr pCmi, int cmd) const
79917991 {
7992- int nPaths = static_cast<int>(pCmi->changedLogPathIndices.size());
7992+ int nPaths = static_cast<int>(pCmi->changedLogPathIndices.size());
79937993
79947994 CString sClipboard;
79957995 for (int i = 0; i < nPaths; ++i)
79967996 {
7997- INT_PTR selIndex = static_cast<INT_PTR>(pCmi->changedLogPathIndices[i]);
7997+ INT_PTR selIndex = static_cast<INT_PTR>(pCmi->changedLogPathIndices[i]);
79987998
7999- CLogChangedPath path = m_currentChangedArray[selIndex];
7999+ CLogChangedPath path = m_currentChangedArray[selIndex];
80008000 switch (cmd)
80018001 {
80028002 case ID_COPYCLIPBOARDURL:
@@ -8079,14 +8079,14 @@
80798079 ::SendMessage(m_hwndToolbar, TB_BUTTONSTRUCTSIZE, static_cast<WPARAM>(sizeof(TBBUTTON)), 0);
80808080
80818081 #define MONITORMODE_TOOLBARBUTTONCOUNT 11
8082- TBBUTTON tbb[MONITORMODE_TOOLBARBUTTONCOUNT] = {0};
8082+ TBBUTTON tbb[MONITORMODE_TOOLBARBUTTONCOUNT] = {0};
80838083 // create an image list containing the icons for the toolbar
8084- const int iconSizeX = static_cast<int>(24 * CDPIAware::Instance().ScaleFactor(GetSafeHwnd()));
8085- const int iconSizeY = static_cast<int>(24 * CDPIAware::Instance().ScaleFactor(GetSafeHwnd()));
8084+ const int iconSizeX = static_cast<int>(24 * CDPIAware::Instance().ScaleFactor(GetSafeHwnd()));
8085+ const int iconSizeY = static_cast<int>(24 * CDPIAware::Instance().ScaleFactor(GetSafeHwnd()));
80868086 if (!m_toolbarImages.Create(iconSizeX, iconSizeY, ILC_COLOR32 | ILC_MASK | ILC_HIGHQUALITYSCALE, MONITORMODE_TOOLBARBUTTONCOUNT, 4))
80878087 return false;
80888088 auto iString = ::SendMessage(m_hwndToolbar, TB_ADDSTRING,
8089- reinterpret_cast<WPARAM>(AfxGetResourceHandle()), static_cast<LPARAM>(IDS_MONITOR_TOOLBARTEXTS));
8089+ reinterpret_cast<WPARAM>(AfxGetResourceHandle()), static_cast<LPARAM>(IDS_MONITOR_TOOLBARTEXTS));
80908090 int index = 0;
80918091 HICON hIcon = CCommonAppUtils::LoadIconEx(IDI_MONITOR_GETALL, iconSizeX, iconSizeY);
80928092 tbb[index].iBitmap = m_toolbarImages.Add(hIcon);
@@ -8228,12 +8228,12 @@
82288228 hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_DATETO), 0, rect.Height(), 0, rect.Height());
82298229 hdwp = CSplitterControl::ChangeRect(hdwp, &m_logList, delta, rect.Height(), 0, 0);
82308230
8231- hdwp = CSplitterControl::ChangeRect(hdwp, &m_wndSplitter1, delta, 0, 0, 0);
8232- hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_MSGVIEW), delta, 0, 0, 0);
8233- hdwp = CSplitterControl::ChangeRect(hdwp, &m_wndSplitter2, delta, 0, 0, 0);
8234- hdwp = CSplitterControl::ChangeRect(hdwp, &m_changedFileListCtrl, delta, 0, 0, 75);
8235- hdwp = CSplitterControl::ChangeRect(hdwp, &m_logProgress, delta, 20, -rcGetAll.Width(), 20);
8236- hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_LOGINFO), delta, 75, 0, 75);
8231+ hdwp = CSplitterControl::ChangeRect(hdwp, &m_wndSplitter1, delta, 0, 0, 0);
8232+ hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_MSGVIEW), delta, 0, 0, 0);
8233+ hdwp = CSplitterControl::ChangeRect(hdwp, &m_wndSplitter2, delta, 0, 0, 0);
8234+ hdwp = CSplitterControl::ChangeRect(hdwp, &m_changedFileListCtrl, delta, 0, 0, 75);
8235+ hdwp = CSplitterControl::ChangeRect(hdwp, &m_logProgress, delta, 20, -rcGetAll.Width(), 20);
8236+ hdwp = CSplitterControl::ChangeRect(hdwp, GetDlgItem(IDC_LOGINFO), delta, 75, 0, 75);
82378237 EndDeferWindowPos(hdwp);
82388238
82398239 DWORD exStyle = TVS_EX_AUTOHSCROLL | TVS_EX_DOUBLEBUFFER;
@@ -8251,8 +8251,8 @@
82518251 // Set up the tray icon
82528252 ChangeWindowMessageFilter(WM_TASKBARCREATED, MSGFLT_ADD);
82538253
8254- m_hMonitorIconNormal = CCommonAppUtils::LoadIconEx(IDI_MONITORNORMAL, 0, 0);
8255- m_hMonitorIconNewCommits = CCommonAppUtils::LoadIconEx(IDI_MONITORCOMMITS, 0, 0);
8254+ m_hMonitorIconNormal = CCommonAppUtils::LoadIconEx(IDI_MONITORNORMAL, 0, 0);
8255+ m_hMonitorIconNewCommits = CCommonAppUtils::LoadIconEx(IDI_MONITORCOMMITS, 0, 0);
82568256
82578257 m_systemTray.cbSize = sizeof(NOTIFYICONDATA);
82588258 m_systemTray.uVersion = NOTIFYICON_VERSION_4;
@@ -8361,7 +8361,7 @@
83618361
83628362 void CLogDlg::RefreshMonitorProjTree()
83638363 {
8364- static bool firstCall = true;
8364+ static bool firstCall = true;
83658365
83668366 CSimpleIni::TNamesDepend mItems;
83678367 m_monitoringFile.GetAllSections(mItems);
@@ -8752,7 +8752,7 @@
87528752 pEditProject->userName = CStringUtils::Encrypt(dlg.m_sUsername);
87538753 pEditProject->password = CStringUtils::Encrypt(dlg.m_sPassword);
87548754 pEditProject->parentPath = dlg.m_isParentPath;
8755- pEditProject->sMsgRegex = dlg.m_sIgnoreRegex;
8755+ pEditProject->sMsgRegex = dlg.m_sIgnoreRegex;
87568756 try
87578757 {
87588758 pEditProject->msgRegex = std::wregex(pEditProject->sMsgRegex, std::regex_constants::ECMAScript | std::regex_constants::icase);
@@ -9035,7 +9035,7 @@
90359035 // page from inside a repository
90369036 // some repositories show
90379037 // "<h2>projectname - Revision XX: /trunk</h2>
9038- const char* reTitle = "<\\s*h2\\s*>[^/]+Revision\\s*\\d+:[^<]+<\\s*/\\s*h2\\s*>";
9038+ const char* reTitle = "<\\s*h2\\s*>[^/]+Revision\\s*\\d+:[^<]+<\\s*/\\s*h2\\s*>";
90399039 // xsl transformed pages don't have an easy way to determine
90409040 // the inside from outside of a repository.
90419041 // We therefore check for <index rev="0" to make sure it's either
@@ -9049,8 +9049,8 @@
90499049 continue;
90509050 }
90519051
9052- const char* re = "<\\s*LI\\s*>\\s*<\\s*A\\s+[^>]*HREF\\s*=\\s*\"([^\"]*)\"\\s*>([^<]+)<\\s*/\\s*A\\s*>\\s*<\\s*/\\s*LI\\s*>";
9053- const char* re2 = "<\\s*DIR\\s*name\\s*=\\s*\"([^\"]*)\"\\s*HREF\\s*=\\s*\"([^\"]*)\"\\s*/\\s*>";
9052+ const char* re = "<\\s*LI\\s*>\\s*<\\s*A\\s+[^>]*HREF\\s*=\\s*\"([^\"]*)\"\\s*>([^<]+)<\\s*/\\s*A\\s*>\\s*<\\s*/\\s*LI\\s*>";
9053+ const char* re2 = "<\\s*DIR\\s*name\\s*=\\s*\"([^\"]*)\"\\s*HREF\\s*=\\s*\"([^\"]*)\"\\s*/\\s*>";
90549054
90559055 const std::regex expression(re, std::regex_constants::icase | std::regex_constants::ECMAScript);
90569056 const std::regex expression2(re2, std::regex_constants::icase | std::regex_constants::ECMAScript);
@@ -9064,17 +9064,17 @@
90649064 // what[0] contains the whole string
90659065 // what[1] contains the url part.
90669066 // what[2] contains the name
9067- auto url = CUnicodeUtils::GetUnicode(std::string(match[1]).c_str());
9068- url = item.wcPathOrUrl + _T("/") + url;
9067+ auto url = CUnicodeUtils::GetUnicode(std::string(match[1]).c_str());
9068+ url = item.wcPathOrUrl + _T("/") + url;
90699069
90709070 // we found a new URL, add it to our list
9071- MonitorItem mi = item;
9072- mi.name = CPathUtils::PathUnescape(std::string(match[2]).c_str()).TrimRight('/');
9073- mi.wcPathOrUrl = url;
9074- mi.authFailed = false;
9075- mi.parentPath = false;
9076- mi.lastChecked = 0;
9077- mi.lastCheckedRobots = 0;
9071+ MonitorItem mi = item;
9072+ mi.name = CPathUtils::PathUnescape(std::string(match[2]).c_str()).TrimRight('/');
9073+ mi.wcPathOrUrl = url;
9074+ mi.authFailed = false;
9075+ mi.parentPath = false;
9076+ mi.lastChecked = 0;
9077+ mi.lastCheckedRobots = 0;
90789078 mi.lastErrorMsg.Empty();
90799079 mi.lastHead = 0;
90809080 mi.unreadFirst = 0;
@@ -9097,16 +9097,16 @@
90979097 // what[0] contains the whole string
90989098 // what[1] contains the url part.
90999099 // what[2] contains the name
9100- auto url = CUnicodeUtils::GetUnicode(std::string(match[1]).c_str());
9101- url = item.wcPathOrUrl + _T("/") + url;
9100+ auto url = CUnicodeUtils::GetUnicode(std::string(match[1]).c_str());
9101+ url = item.wcPathOrUrl + _T("/") + url;
91029102
9103- MonitorItem mi = item;
9104- mi.name = CPathUtils::PathUnescape(std::string(match[2]).c_str()).TrimRight('/');
9105- mi.wcPathOrUrl = url;
9106- mi.authFailed = false;
9107- mi.parentPath = false;
9108- mi.lastChecked = 0;
9109- mi.lastCheckedRobots = 0;
9103+ MonitorItem mi = item;
9104+ mi.name = CPathUtils::PathUnescape(std::string(match[2]).c_str()).TrimRight('/');
9105+ mi.wcPathOrUrl = url;
9106+ mi.authFailed = false;
9107+ mi.parentPath = false;
9108+ mi.lastChecked = 0;
9109+ mi.lastCheckedRobots = 0;
91109110 mi.lastErrorMsg.Empty();
91119111 mi.lastHead = 0;
91129112 mi.unreadFirst = 0;
@@ -9488,8 +9488,8 @@
94889488 auto hItem = FindMonitorItem(mip.second.wcPathOrUrl);
94899489 if (hItem == nullptr)
94909490 {
9491- auto item = new MonitorItem();
9492- *item = mip.second;
9491+ auto item = new MonitorItem();
9492+ *item = mip.second;
94939493
94949494 auto hParent = FindMonitorItem(mip.first);
94959495 if (hParent)
@@ -9632,8 +9632,8 @@
96329632 POINT pt;
96339633 GetCursorPos(&pt);
96349634
9635- HMENU hMenu = ::LoadMenu(AfxGetResourceHandle(), MAKEINTRESOURCE(IDR_MONITORTRAY));
9636- hMenu = ::GetSubMenu(hMenu, 0);
9635+ HMENU hMenu = ::LoadMenu(AfxGetResourceHandle(), MAKEINTRESOURCE(IDR_MONITORTRAY));
9636+ hMenu = ::GetSubMenu(hMenu, 0);
96379637
96389638 // set the default entry
96399639 MENUITEMINFO iinfo = {0};
@@ -9786,7 +9786,7 @@
97869786 if (head == 0)
97879787 head = GetHEADRevision(CTSVNPath(pItem->wcPathOrUrl), false);
97889788
9789- m_limit = static_cast<int>(static_cast<DWORD>(CRegDWORD(L"Software\\TortoiseSVN\\NumberOfLogs", 100))) + 1;
9789+ m_limit = static_cast<int>(static_cast<DWORD>(CRegDWORD(L"Software\\TortoiseSVN\\NumberOfLogs", 100))) + 1;
97909790
97919791 m_path = CTSVNPath(pItem->wcPathOrUrl);
97929792 m_pegRev = head;
@@ -9886,7 +9886,7 @@
98869886 {
98879887 LPNMTVDISPINFO pTVDispInfo = reinterpret_cast<LPNMTVDISPINFO>(pNMHDR);
98889888
9889- MonitorItem* pItem = reinterpret_cast<MonitorItem*>(m_projTree.GetItemData(pTVDispInfo->item.hItem));
9889+ MonitorItem* pItem = reinterpret_cast<MonitorItem*>(m_projTree.GetItemData(pTVDispInfo->item.hItem));
98909890 if (pItem && pTVDispInfo->item.pszText)
98919891 {
98929892 CString sName = pTVDispInfo->item.pszText;
@@ -9970,7 +9970,7 @@
99709970 }
99719971 }
99729972 int cmd = popup.TrackPopupMenu(TPM_RETURNCMD | TPM_LEFTALIGN | TPM_NONOTIFY | TPM_RIGHTBUTTON,
9973- point.x, point.y, this, nullptr);
9973+ point.x, point.y, this, nullptr);
99749974 CLogWndHourglass wait;
99759975
99769976 switch (cmd)
@@ -10106,7 +10106,7 @@
1010610106 static CString sMarkAllAsReadTooltip(MAKEINTRESOURCE(IDS_MONITOR_MARKASREADTT));
1010710107 static CString sUpdateAllTooltip(MAKEINTRESOURCE(IDS_MONITOR_UPDATEALLTT));
1010810108
10109- LPNMHDR lpnmhdr = reinterpret_cast<LPNMHDR>(lParam);
10109+ LPNMHDR lpnmhdr = reinterpret_cast<LPNMHDR>(lParam);
1011010110 if ((lpnmhdr->code == TBN_GETINFOTIP) && (lpnmhdr->hwndFrom == m_hwndToolbar))
1011110111 {
1011210112 LPNMTBGETINFOTIP lptbgit = reinterpret_cast<LPNMTBGETINFOTIPW>(lParam);
Show on old repository browser