• R/O
  • SSH
  • HTTPS

tortoisesvn: コミット


コミットメタ情報

リビジョン29056 (tree)
日時2021-01-12 02:57:04
作者stefankueng

ログメッセージ

patch from Matthias (https://groups.google.com/g/tortoisesvn-dev/c/Ko1Cf6vK4jE/m/TF0P0GJ2CQAJ)
The command "copy to clipboard / revisions" copied the revision numbers unsorted into clipboard.
I wrote a patch that sort the revision numbers before write them to clipboard.

変更サマリ

差分

--- trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 29055)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 29056)
@@ -2040,9 +2040,9 @@
20402040 void CLogDlg::CopyCommaSeparatedRevisionsToClipboard()
20412041 {
20422042 POSITION pos = m_LogList.GetFirstSelectedItemPosition();
2043- CString sRevisions;
2044- CString sRevision;
20452043
2044+ std::set<svn_revnum_t> setSelectedRevisions;
2045+
20462046 if (pos != NULL)
20472047 {
20482048 while (pos)
@@ -2053,18 +2053,20 @@
20532053 PLOGENTRYDATA pLogEntry = m_logEntries.GetVisible(index);
20542054 if (pLogEntry)
20552055 {
2056- sRevision.Format(L"%ld, ", pLogEntry->GetRevision());
2057- sRevisions += sRevision;
2056+ setSelectedRevisions.insert(pLogEntry->GetRevision());
20582057 }
20592058 }
2060-
2061- // trim trailing comma and space
2062- int revisionsLength = sRevisions.GetLength() - 2;
2063- if (revisionsLength > 0)
2064- {
2065- sRevisions = sRevisions.Left(revisionsLength);
2066- CStringUtils::WriteAsciiStringToClipboard(sRevisions, GetSafeHwnd());
2059+ }
2060+ if (setSelectedRevisions.size() > 0)
2061+ {
2062+ CString sRevisions;
2063+ std::set<svn_revnum_t>::iterator it;
2064+ for (it = setSelectedRevisions.begin(); it != setSelectedRevisions.end(); ++it) {
2065+ if (!sRevisions.IsEmpty())
2066+ sRevisions += ", ";
2067+ sRevisions += SVNRev(*it).ToString();
20672068 }
2069+ CStringUtils::WriteAsciiStringToClipboard(sRevisions, GetSafeHwnd());
20682070 }
20692071 }
20702072
旧リポジトリブラウザで表示