• R/O
  • SSH
  • HTTPS

tortoisesvn: コミット


コミットメタ情報

リビジョン28978 (tree)
日時2020-09-26 03:30:26
作者stefankueng

ログメッセージ

Merged revision(s) r28977 from trunk:
* rewrote reconstruction of wc paths from the file list in the log dialog. Don't show the menu "compare with working copy" if the reconstructed path does not exist.

変更サマリ

差分

--- branches/1.14.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28977)
+++ branches/1.14.x/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28978)
@@ -7186,19 +7186,32 @@
71867186 pCmi->fileUrl = sUrlRootUnescaped + pCmi->fileUrl.Trim();
71877187 if (m_hasWC)
71887188 {
7189- // firstfile = (e.g.) http://mydomain.com/repos/trunk/folder/file1
7190- // pCmi->sUrl = http://mydomain.com/repos/trunk/folder
7189+ // sUnescapedUrl = (e.g.) http://mydomain.com/repos/trunk/folder/file1
7190+ // pCmi->sUrl = (e.g.) http://mydomain.com/repos/trunk/folder
71917191 auto wcroot = GetWCRootFromPath(m_path);
71927192 auto wcrooturl = GetURLFromPath(wcroot);
71937193 CString sUnescapedUrl = CPathUtils::PathUnescape(wcrooturl);
7194- // find out until which char the urls are identical
7194+ std::wstring url1 = sUnescapedUrl;
7195+ std::wstring url2 = pCmi->fileUrl;
7196+ std::vector<std::wstring> vec1;
7197+ std::vector<std::wstring> vec2;
7198+ stringtok(vec1, url1, true, L"\\/");
7199+ stringtok(vec2, url2, true, L"\\/");
71957200 int i = 0;
7196- while ((i < pCmi->fileUrl.GetLength()) && (i < sUnescapedUrl.GetLength()) && (pCmi->fileUrl[i] == sUnescapedUrl[i]))
7197- i++;
7198- int leftcount = wcroot.GetWinPathString().GetLength() - (sUnescapedUrl.GetLength() - i);
7199- pCmi->wcPath = wcroot.GetWinPathString().Left(leftcount);
7200- pCmi->wcPath += pCmi->fileUrl.Mid(i);
7201+ while (i < vec1.size() && i < vec2.size() && vec1[i] == vec2[i])
7202+ ++i;
7203+
7204+ pCmi->wcPath = wcroot.GetWinPathString();
7205+ while (i < vec2.size())
7206+ {
7207+ pCmi->wcPath += L"\\";
7208+ pCmi->wcPath += vec2[i].c_str();
7209+ ++i;
7210+ }
7211+
72017212 pCmi->wcPath.Replace('/', '\\');
7213+ if (!PathFileExists(pCmi->wcPath))
7214+ pCmi->wcPath.Empty();
72027215 }
72037216 }
72047217
@@ -7221,7 +7234,7 @@
72217234 popup.AppendMenuIcon(ID_BLAMEDIFF, IDS_LOG_POPUP_BLAMEDIFF, IDI_BLAME);
72227235 popup.SetDefaultItem(ID_DIFF, FALSE);
72237236 popup.AppendMenuIcon(ID_GNUDIFF1, IDS_LOG_POPUP_GNUDIFF_CH, IDI_DIFF);
7224- if (m_hasWC)
7237+ if (m_hasWC && !pCmi->wcPath.IsEmpty())
72257238 {
72267239 popup.AppendMenuIcon(ID_COMPARE, IDS_LOG_POPUP_COMPARE, IDI_DIFF);
72277240 }
旧リポジトリブラウザで表示