• R/O
  • HTTP
  • SSH
  • HTTPS

TortoiseGitJp: Commit

TortoiseGit日本語言語ファイル作成


Commit MetaInfo

Revision588f1a6cb8ca51c1318db041bd0f228c84be313e (tree)
Time2010-01-23 21:09:06
AuthorFrank Li <lznuaa@gmai...>
CommiterFrank Li

Log Message

Log can refresh when Click Rev button.

Signed-off-by: Frank Li <lznuaa@gmail.com>

Change Summary

Incremental Difference

--- a/src/Git/Git.cpp
+++ b/src/Git/Git.cpp
@@ -129,6 +129,7 @@ CGit::CGit(void)
129129 GetCurrentDirectory(MAX_DIRBUFFER,m_CurrentDir.GetBuffer(MAX_DIRBUFFER));
130130 m_CurrentDir.ReleaseBuffer();
131131 m_IsGitDllInited = false;
132+ m_GitDiff=0;
132133 CheckMsysGitDir();
133134 }
134135
--- a/src/Git/TGitPath.cpp
+++ b/src/Git/TGitPath.cpp
@@ -529,7 +529,7 @@ CString CTGitPath::GetRootPathString() const
529529
530530 CString CTGitPath::GetFilename() const
531531 {
532- ATLASSERT(!IsDirectory());
532+ //ATLASSERT(!IsDirectory());
533533 return GetFileOrDirectoryName();
534534 }
535535
Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ
--- a/src/TortoiseProc/FileDiffDlg.cpp
+++ b/src/TortoiseProc/FileDiffDlg.cpp
@@ -34,6 +34,7 @@
3434 #include "CommonResource.h"
3535 #include "BrowseRefsDlg.h"
3636 #include "LogDlg.h"
37+#include "RefLogDlg.h"
3738
3839 #define ID_COMPARE 1
3940 #define ID_BLAME 2
@@ -287,6 +288,7 @@ UINT CFileDiffDlg::DiffThread()
287288 bool bSuccess = true;
288289 RefreshCursor();
289290 m_cFileList.ShowText(CString(MAKEINTRESOURCE(IDS_FILEDIFF_WAIT)));
291+ m_cFileList.DeleteAllItems();
290292 m_arFileList.Clear();
291293 #if 0
292294 if (m_bDoPegDiff)
@@ -1112,9 +1114,27 @@ void CFileDiffDlg::ClickRevButton(CMenuButton *button, GitRev *rev, CEdit *edit)
11121114
11131115 if(entry == 2) /*RefLog*/
11141116 {
1117+ CRefLogDlg dlg;
1118+ if(dlg.DoModal() == IDOK)
1119+ {
1120+ if(FillRevFromString(rev,dlg.m_SelectedHash))
1121+ return;
1122+
1123+ edit->SetWindowText(dlg.m_SelectedHash);
1124+
1125+ }else
1126+ return;
1127+
11151128 }
11161129
11171130 SetURLLabels();
1131+
1132+ InterlockedExchange(&m_bThreadRunning, TRUE);
1133+ if (AfxBeginThread(DiffThreadEntry, this)==NULL)
1134+ {
1135+ InterlockedExchange(&m_bThreadRunning, FALSE);
1136+ CMessageBox::Show(NULL, IDS_ERR_THREADSTARTFAILED, IDS_APPNAME, MB_OK | MB_ICONERROR);
1137+ }
11181138 }
11191139
11201140 void CFileDiffDlg::OnBnClickedRev2btn()
--- a/src/TortoiseProc/RefLogDlg.cpp
+++ b/src/TortoiseProc/RefLogDlg.cpp
@@ -87,6 +87,20 @@ BOOL CRefLogDlg::OnInitDialog()
8787 void CRefLogDlg::OnBnClickedOk()
8888 {
8989 // TODO: Add your control notification handler code here
90+ if (m_RefList.GetSelectedCount() == 1)
91+ {
92+ // get the selected row
93+ POSITION pos = m_RefList.GetFirstSelectedItemPosition();
94+ int selIndex = m_RefList.GetNextSelectedItem(pos);
95+ if (selIndex < m_RefList.m_arShownList.GetCount())
96+ {
97+ // all ok, pick up the revision
98+ GitRev* pLogEntry = reinterpret_cast<GitRev *>(m_RefList.m_arShownList.GetAt(selIndex));
99+ // extract the hash
100+ m_SelectedHash = pLogEntry->m_CommitHash;
101+ }
102+ }
103+
90104 OnOK();
91105 }
92106
--- a/src/TortoiseProc/RefLogDlg.h
+++ b/src/TortoiseProc/RefLogDlg.h
@@ -27,6 +27,7 @@ public:
2727 CString m_CurrentBranch;
2828 public:
2929 CRefLogList m_RefList;
30+ CString m_SelectedHash;
3031 public:
3132 afx_msg void OnBnClickedOk();
3233 };
Show on old repository browser