return prepare_revision_walk(handle);\r
}\r
\r
+int git_get_log_estimate_commit_count(GIT_LOG handle)\r
+{\r
+ struct rev_info *p_Rev;\r
+ p_Rev=(struct rev_info *)handle;\r
+\r
+ return estimate_commit_count(p_Rev, p_Rev->commits);\r
+}\r
+\r
int git_get_log_nextcommit(GIT_LOG handle, GIT_COMMIT *commit)\r
{\r
int ret =0;\r
\r
GITDLL_API int git_open_log(GIT_LOG * handle, char * arg);\r
GITDLL_API int git_get_log_firstcommit(GIT_LOG handle);\r
+GITDLL_API int git_get_log_estimate_commit_count(GIT_LOG handle);\r
\r
/**\r
* Get Next Commit\r
InterlockedExchange(&m_bNoDispUpdates, FALSE);\r
\r
git_get_log_firstcommit(m_DllGitLog);\r
+ int total = git_get_log_estimate_commit_count(m_DllGitLog);\r
GIT_COMMIT commit;\r
t1=GetTickCount();\r
\r
if(t2-t1>500 )\r
{\r
//update UI\r
+ int percent=m_logEntries.size()*100/total + GITLOG_START+1;\r
+ if(percent > 99)\r
+ percent =99;\r
+\r
oldsize = m_logEntries.size();\r
PostMessage(LVM_SETITEMCOUNT, (WPARAM) this->m_logEntries.size(),(LPARAM) LVSICF_NOINVALIDATEALL|LVSICF_NOSCROLL);\r
- ::PostMessage(this->GetParent()->m_hWnd,MSG_LOAD_PERCENTAGE,(WPARAM) GITLOG_END,0);\r
+ ::PostMessage(this->GetParent()->m_hWnd,MSG_LOAD_PERCENTAGE,(WPARAM) percent,0);\r
} \r
}\r
\r
}\r
UpdateLogInfoLabel();\r
\r
-#if 0\r
+\r
//if (!m_bShowedAll)\r
DialogEnableWindow(IDC_SHOWWHOLEPROJECT, TRUE);\r
\r
m_LogList.GetTimeRange(begin,end);\r
m_DateFrom.SetTime(&begin);\r
m_DateTo.SetTime(&end);\r
-#endif\r
+\r
\r
}else\r
{\r
if(this->m_LogList.HasText())\r
{\r
this->m_LogList.ClearText();\r
- UpdateLogInfoLabel();\r
}\r
+ UpdateLogInfoLabel();\r
m_LogProgress.SetPos(cur);\r
}\r
return 0;\r