• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision26899 (tree)
Zeit2015-10-10 04:45:15
Autorstefankueng

Log Message

Merged revision(s) r26879, r26880, r26881, r26884, r26885, r26889, r26898 from trunk:
* Not finding the xml SVNParentPath marker in the file does not indicate a failure.
* New method GetYoungestRev() to return the revision of the last log entry.
* Fetch the log to find the revision where the external should be pegged to. Also add a test file for situations where this is required and SVNInfo and the last-committed-rev does not work.
* Get the log message before executing the manual pre-commit hook script.
* When in overlap mode, zoom both images at the same time.
* Ensure the height is at least one.
* Use "TortoiseSVN project monitor" as the tooltip for the tray icon, not "commit monitor".

Ändern Zusammenfassung

Diff

--- branches/1.9.x/src/Changelog.txt (revision 26898)
+++ branches/1.9.x/src/Changelog.txt (revision 26899)
@@ -23,6 +23,17 @@
2323 set or are otherwise set as readonly. (Stefan)
2424 - BUG: The column "SVN Statusnumber" showed sometimes
2525 the wrong value. (Stefan)
26+- BUG: Repobrowser failed to properly detect SVNParentPath
27+ pages which don't use xml output. (Stefan)
28+- BUG: Adjusting externals used the wrong revision
29+ if the external was copied itself but not
30+ modified later. (Stefan)
31+- BUG: The manual pre-commit hook script was executed with
32+ an outdated or empty log message. (Stefan)
33+- BUG: TortoiseIDiff only zoomed one image in overlap mode
34+ when zooming with the Ctrl-mousewheel. (Stefan)
35+- BUG: The tooltip of the tray icon mentioned commit monitor
36+ instead of project monitor. (Stefan)
2637
2738 Version 1.9.2
2839 - BUG: Performance issue if dragging lots of files
--- branches/1.9.x/src/SVN/SVNLogHelper.cpp (revision 26898)
+++ branches/1.9.x/src/SVN/SVNLogHelper.cpp (revision 26899)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007, 2009, 2011, 2013 - TortoiseSVN
3+// Copyright (C) 2007, 2009, 2011, 2013, 2015 - 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
@@ -131,3 +131,43 @@
131131 return std::make_pair (iter1->first, commonRev);
132132 }
133133
134+SVNRev SVNLogHelper::GetYoungestRev(CTSVNPath url)
135+{
136+ SVNRev result;
137+
138+ // fill / update a suitable log cache
139+
140+ auto pegrev = GetHEADRevision(url);
141+
142+ std::unique_ptr<const CCacheLogQuery> query
143+ (ReceiveLog(CTSVNPathList(url), pegrev, pegrev, 1, 1, TRUE, FALSE, false));
144+ if (query.get() == NULL)
145+ return pegrev;
146+
147+ // construct the path object
148+ // (URLs are always escaped, so we must unescape them)
149+
150+ CStringA svnURLPath = CUnicodeUtils::GetUTF8(url.GetSVNPathString());
151+ if (svnURLPath.Left(9).CompareNoCase("file:///\\") == 0)
152+ svnURLPath.Delete(7, 2);
153+
154+ CStringA relPath = svnURLPath.Mid(query->GetRootURL().GetLength());
155+ relPath = CPathUtils::PathUnescape(relPath);
156+
157+ const CPathDictionary* paths = &query->GetCache()->GetLogInfo().GetPaths();
158+ CDictionaryBasedTempPath path(paths, (const char*)relPath);
159+
160+ // follow the log
161+
162+ LogCache::CStrictLogIterator iterator
163+ (query->GetCache()
164+ , pegrev
165+ , path);
166+
167+ iterator.Retry();
168+ if (!iterator.EndOfPath())
169+ result = iterator.GetRevision();
170+
171+ return result;
172+}
173+
--- branches/1.9.x/src/SVN/SVNLogHelper.h (revision 26898)
+++ branches/1.9.x/src/SVN/SVNLogHelper.h (revision 26899)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2007, 2009, 2011-2013 - TortoiseSVN
3+// Copyright (C) 2007, 2009, 2011-2015 - 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
@@ -62,4 +62,6 @@
6262 std::pair<CTSVNPath, SVNRev>
6363 GetCommonSource(const CTSVNPath& url1, const SVNRev& pegrev1,
6464 const CTSVNPath& url2, const SVNRev& pegrev2);
65+
66+ SVNRev GetYoungestRev(CTSVNPath url);
6567 };
--- branches/1.9.x/src/TortoiseIDiff/PicWindow.cpp (revision 26898)
+++ branches/1.9.x/src/TortoiseIDiff/PicWindow.cpp (revision 26899)
@@ -885,7 +885,7 @@
885885 InvalidateRect(*this, NULL, FALSE);
886886 SetWindowPos(*this, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOREPOSITION|SWP_NOMOVE);
887887 UpdateWindow(*this);
888- if (bLinkedPositions && pTheOtherPic)
888+ if ((bLinkedPositions || bOverlap) && pTheOtherPic)
889889 {
890890 pTheOtherPic->nHScrollPos = nHScrollPos;
891891 pTheOtherPic->nVScrollPos = nVScrollPos;
@@ -951,6 +951,10 @@
951951
952952 if (pTheOtherPic && !inzoom)
953953 {
954+ if (bOverlap)
955+ {
956+ pTheOtherPic->SetZoom(Zoom, centermouse, true);
957+ }
954958 if (bFitHeights)
955959 {
956960 m_linkedHeight = 0;
--- branches/1.9.x/src/TortoiseProc/CommitDlg.cpp (revision 26898)
+++ branches/1.9.x/src/TortoiseProc/CommitDlg.cpp (revision 26899)
@@ -2019,6 +2019,7 @@
20192019 void CCommitDlg::OnBnClickedRunhook()
20202020 {
20212021 UpdateData();
2022+ m_sLogMessage = m_cLogMessage.GetText();
20222023 // create a list of all checked items
20232024 CTSVNPathList checkedItems;
20242025 m_ListCtrl.WriteCheckedNamesToPathList(checkedItems);
--- branches/1.9.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 26898)
+++ branches/1.9.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 26899)
@@ -8943,7 +8943,10 @@
89438943 swprintf_s(m_SystemTray.szTip, _countof(m_SystemTray.szTip), (LPCWSTR)sFormat, unreadItems, unreadProjects);
89448944 }
89458945 else
8946- swprintf_s(m_SystemTray.szTip, _countof(m_SystemTray.szTip), L"TortoiseSVN Commit Monitor");
8946+ {
8947+ CString sFormat(MAKEINTRESOURCE(IDS_MONITOR_DLGTITLE));
8948+ swprintf_s(m_SystemTray.szTip, _countof(m_SystemTray.szTip), (LPCWSTR)sFormat);
8949+ }
89478950 if (Shell_NotifyIcon(NIM_MODIFY, &m_SystemTray) == FALSE)
89488951 {
89498952 Shell_NotifyIcon(NIM_DELETE, &m_SystemTray);
--- branches/1.9.x/src/TortoiseProc/Properties/EditPropExternals.cpp (revision 26898)
+++ branches/1.9.x/src/TortoiseProc/Properties/EditPropExternals.cpp (revision 26899)
@@ -21,6 +21,7 @@
2121 #include "EditPropExternals.h"
2222 #include "EditPropExternalsValue.h"
2323 #include "SVN.h"
24+#include "SVNLogHelper.h"
2425 #include "SVNInfo.h"
2526 #include "AppUtils.h"
2627 #include "ProgressDlg.h"
@@ -331,6 +332,7 @@
331332 }
332333
333334 progDlg.SetLine(1, CString(MAKEINTRESOURCE(IDS_EDITPROPS_PROG_FINDHEADREVS)));
335+ SVNLogHelper logHelper;
334336 for (auto it = m_externals.begin(); it != m_externals.end(); ++it)
335337 {
336338 progDlg.SetProgress(count, total);
@@ -340,11 +342,11 @@
340342 count += 4;
341343 if (!it->root.IsEmpty())
342344 {
343- const SVNInfoData * pInfo = svnInfo.GetFirstFileInfo(CTSVNPath(it->fullurl), SVNRev(), SVNRev::REV_HEAD);
344- if ((pInfo == nullptr) || (pInfo->lastchangedrev <= 0))
345+ auto youngestRev = logHelper.GetYoungestRev(CTSVNPath(it->fullurl));
346+ if (!youngestRev.IsValid())
345347 it->headrev = svn.GetHEADRevision(CTSVNPath(it->fullurl), true);
346348 else
347- it->headrev = pInfo->lastchangedrev;
349+ it->headrev = youngestRev;
348350 }
349351 }
350352 progDlg.Stop();
@@ -405,6 +407,7 @@
405407 svn.SetPromptParentWindow(m_hWnd);
406408 SVNInfo svnInfo;
407409 svnInfo.SetPromptParentWindow(m_hWnd);
410+ SVNLogHelper logHelper;
408411 CProgressDlg progDlg;
409412 progDlg.ShowModal(m_hWnd, TRUE);
410413 progDlg.SetTitle(IDS_EDITPROPS_PROG_FINDHEADTITLE);
@@ -427,12 +430,12 @@
427430 path_.AppendPathString(m_externals[index].targetDir);
428431 m_externals[index].root = svn.GetRepositoryRoot(path_);
429432 }
430-
431- const SVNInfoData * pInfo = svnInfo.GetFirstFileInfo(CTSVNPath(m_externals[index].fullurl), SVNRev(), SVNRev::REV_HEAD);
432- if ((pInfo == nullptr) || (pInfo->lastchangedrev <= 0))
433- m_externals[index].headrev = svn.GetHEADRevision(CTSVNPath(m_externals[index].fullurl), true);
433+ auto fullurl = CTSVNPath(m_externals[index].fullurl);
434+ auto youngestRev = logHelper.GetYoungestRev(fullurl);
435+ if (!youngestRev.IsValid())
436+ m_externals[index].headrev = svn.GetHEADRevision(fullurl, true);
434437 else
435- m_externals[index].headrev = pInfo->lastchangedrev;
438+ m_externals[index].headrev = youngestRev;
436439 }
437440 }
438441 }
--- branches/1.9.x/src/TortoiseProc/RepositoryBrowser.cpp (revision 26898)
+++ branches/1.9.x/src/TortoiseProc/RepositoryBrowser.cpp (revision 26899)
@@ -5118,8 +5118,7 @@
51185118 }
51195119 if (!regex_search(in.begin(), in.end(), titex2))
51205120 {
5121- TRACE(L"found repository url instead of SVNParentPathList\n");
5122- return false;
5121+ return (nCountNewEntries>0);
51235122 }
51245123 for (tr1::sregex_iterator i(in.begin(), in.end(), expression2); i != end; ++i)
51255124 {
--- branches/1.9.x/src/Utils/MiscUI/MyGraph.cpp (revision 26898)
+++ branches/1.9.x/src/Utils/MiscUI/MyGraph.cpp (revision 26899)
@@ -858,7 +858,8 @@
858858 LOGFONT lf;
859859 ::SecureZeroMemory(&lf, sizeof(lf));
860860 VERIFY(fontLegend.GetLogFont(&lf));
861- int nLabelHeight(abs(lf.lfHeight));
861+ // just in case the font height is invalid (zero), use min().
862+ int nLabelHeight = min(1, abs(lf.lfHeight));
862863
863864 // Get number of legend entries
864865 int nLegendEntries = max(1, GetMaxSeriesSize());
--- branches/1.9.x/test/Scripts/pegexternalstohead.bat (nonexistent)
+++ branches/1.9.x/test/Scripts/pegexternalstohead.bat (revision 26899)
@@ -0,0 +1,35 @@
1+:: show properties for b1, adjust external to HEAD should return r2
2+:: show properties for b2, adjust external to HEAD should return r5
3+svnadmin create repo
4+svn checkout "file:///%CD%/repo" wc
5+pushd wc
6+
7+mkdir branches
8+mkdir trunk
9+svn add trunk
10+svn add branches
11+svn ci . -m ""
12+
13+echo "File 1" > trunk\file1.txt
14+svn add trunk\file1.txt
15+svn ci . -m ""
16+
17+svn cp trunk branches/b1
18+svn ci . -m ""
19+svn up
20+
21+svn propset svn:externals "../../trunk/file1.txt extfile.txt" branches/b1
22+svn ci . -m ""
23+svn up
24+
25+svn cp trunk branches/b2
26+svn ci . -m ""
27+svn up
28+
29+svn propset svn:externals "../b2/file1.txt extfile.txt" branches/b2
30+svn ci . -m ""
31+svn up
32+
33+svn log -v branches/b1/extfile.txt
34+svn log -v branches/b2/extfile.txt
35+popd
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Show on old repository browser