From 3326dfbeb9721e0e4b88a266780c4545ccd9dddf Mon Sep 17 00:00:00 2001 From: Frank Li Date: Tue, 30 Dec 2008 09:32:38 +0800 Subject: [PATCH] Fix CStringList TortoiseShell build problem --- ext/ResizableLib/ResizableLib.vcproj | 8 ++++---- ext/hunspell/hunspell.vcproj | 8 ++++---- ext/scintilla/vcbuild/SciLexer.vcproj | 8 ++++---- src/Git/Git.cpp | 12 ++++++------ src/Git/Git.h | 7 ++++--- src/Git/Git.vcproj | 6 +++--- src/Git/GitRev.cpp | 28 ++++++++++++++-------------- src/TGitCache/CachedDirectory.h | 2 +- src/TGitCache/TSVNCache.vcproj | 24 ++++++------------------ src/TortoiseProc/ChooseVersion.h | 4 ++-- src/TortoiseProc/FormatPatchDlg.cpp | 2 +- src/TortoiseProc/PushDlg.cpp | 18 +++++------------- src/TortoiseProc/TortoiseProc.vcproj | 34 +++++++++++++++++----------------- src/TortoiseShell/TortoiseShell.vcproj | 8 ++++---- src/TortoiseUDiff/TortoiseUDiff.vcproj | 8 ++++---- src/Utils/MiscUI/HistoryCombo.cpp | 8 +++----- src/Utils/MiscUI/HistoryCombo.h | 3 ++- src/Utils/Utils.vcproj | 8 ++++---- 18 files changed, 88 insertions(+), 108 deletions(-) diff --git a/ext/ResizableLib/ResizableLib.vcproj b/ext/ResizableLib/ResizableLib.vcproj index db50a1e..785463e 100644 --- a/ext/ResizableLib/ResizableLib.vcproj +++ b/ext/ResizableLib/ResizableLib.vcproj @@ -21,8 +21,8 @@ STRING_VECTOR; typedef std::map MAP_HASH_NAME; + class CGit { private: @@ -41,9 +42,9 @@ public: BRANCH_ALL=BRANCH_LOCAL|BRANCH_REMOTE, }BRANCH_TYPE; - int GetRemoteList(CStringList &list); - int GetBranchList(CStringList &list, int *Current,BRANCH_TYPE type=BRANCH_LOCAL); - int GetTagList(CStringList &list); + int GetRemoteList(STRING_VECTOR &list); + int GetBranchList(STRING_VECTOR &list, int *Current,BRANCH_TYPE type=BRANCH_LOCAL); + int GetTagList(STRING_VECTOR &list); int GetMapHashToFriendName(MAP_HASH_NAME &map); //hash is empty means all. -1 means all diff --git a/src/Git/Git.vcproj b/src/Git/Git.vcproj index 0ca9773..c2bdd05 100644 --- a/src/Git/Git.vcproj +++ b/src/Git/Git.vcproj @@ -18,7 +18,7 @@ GetLog(onelog,m_CommitHash,1); - CString oldhash=m_CommitHash; - ParserFromLog(onelog); - - ASSERT(oldhash==m_CommitHash); - - InterlockedExchange(&m_IsUpdateing,FALSE); - InterlockedExchange(&m_IsFull,TRUE); - return 0; - } + if(InterlockedExchange(&m_IsUpdateing,TRUE) == FALSE) + { + //GitRev rev; + CString onelog; + git->GetLog(onelog,m_CommitHash,1); + CString oldhash=m_CommitHash; + ParserFromLog(onelog); + + //ASSERT(oldhash==m_CommitHash); + + InterlockedExchange(&m_IsUpdateing,FALSE); + InterlockedExchange(&m_IsFull,TRUE); + return 0; + } return -1; } \ No newline at end of file diff --git a/src/TGitCache/CachedDirectory.h b/src/TGitCache/CachedDirectory.h index 71e2da6..08e76cc 100644 --- a/src/TGitCache/CachedDirectory.h +++ b/src/TGitCache/CachedDirectory.h @@ -19,7 +19,7 @@ #pragma once #include "StatusCacheEntry.h" -#include "TSVNPath.h" +#include "TGitPath.h" /** * \ingroup TSVNCache diff --git a/src/TGitCache/TSVNCache.vcproj b/src/TGitCache/TSVNCache.vcproj index 0bfdf05..bc4f210 100644 --- a/src/TGitCache/TSVNCache.vcproj +++ b/src/TGitCache/TSVNCache.vcproj @@ -21,8 +21,8 @@ - - - - - - diff --git a/src/TortoiseProc/ChooseVersion.h b/src/TortoiseProc/ChooseVersion.h index f4e51b1..128fec0 100644 --- a/src/TortoiseProc/ChooseVersion.h +++ b/src/TortoiseProc/ChooseVersion.h @@ -58,11 +58,11 @@ protected: void Init() { - CStringList list; + STRING_VECTOR list; g_Git.GetTagList(list); m_ChooseVersioinTags.AddString(list); - list.RemoveAll(); + list.clear(); int current; g_Git.GetBranchList(list,¤t,CGit::BRANCH_ALL); m_ChooseVersioinBranch.AddString(list); diff --git a/src/TortoiseProc/FormatPatchDlg.cpp b/src/TortoiseProc/FormatPatchDlg.cpp index 8087b4f..7528677 100644 --- a/src/TortoiseProc/FormatPatchDlg.cpp +++ b/src/TortoiseProc/FormatPatchDlg.cpp @@ -73,7 +73,7 @@ BOOL CFormatPatchDlg::OnInitDialog() m_cDir.LoadHistory(_T("Software\\TortoiseGit\\History\\FormatPatchURLS"), _T("path")); m_cDir.SetCurSel(0); - CStringList list; + STRING_VECTOR list; g_Git.GetBranchList(list,NULL,CGit::BRANCH_ALL); m_cSince.AddString(list); diff --git a/src/TortoiseProc/PushDlg.cpp b/src/TortoiseProc/PushDlg.cpp index 6330e55..fc10f83 100644 --- a/src/TortoiseProc/PushDlg.cpp +++ b/src/TortoiseProc/PushDlg.cpp @@ -67,27 +67,19 @@ BOOL CPushDlg::OnInitDialog() m_RemoteURL.EnableWindow(FALSE); CheckRadioButton(IDC_RD_REMOTE,IDC_RD_URL,IDC_RD_REMOTE); - CStringList list; + STRING_VECTOR list; if(!g_Git.GetRemoteList(list)) { - POSITION pos; - pos=list.GetHeadPosition(); - while(pos) - { - m_Remote.AddString(list.GetNext(pos)); - } + for(int i=0;i @@ -95,8 +95,8 @@