From 20400d83993be35b86d091610b374179c0792a90 Mon Sep 17 00:00:00 2001 From: Stefan Kueng Date: Fri, 18 Nov 2011 20:47:20 +0100 Subject: [PATCH] Rename a lot of SVN references to GIT Signed-off-by: Stefan Kueng Signed-off-by: Sven Strickroth --- src/Git/GitFolderStatus.cpp | 2 +- src/Git/GitStatusListCtrl.cpp | 234 +++---- src/Git/GitStatusListCtrl.h | 268 ++++---- src/Git/TGitPath.cpp | 6 +- src/Resources/TortoiseProcENG.rc | 2 +- ...logoflipped.bmp => tortoisegit_logoflipped.bmp} | Bin src/TGitCache/CacheInterface.cpp | 6 +- src/TGitCache/CacheInterface.h | 30 +- src/TGitCache/FolderCrawler.cpp | 8 +- .../{SVNStatusCache.cpp => GITStatusCache.cpp} | 4 +- src/TGitCache/StatusCacheEntry.cpp | 2 +- src/TGitCache/StatusCacheEntry.h | 4 +- src/TGitCache/{TSVNCache.cpp => TGITCache.cpp} | 26 +- src/TGitCache/{TSVNCache.h => TGITCache.h} | 0 src/TGitCache/{TSVNCache.rc => TGITCache.rc} | 0 src/TGitCache/{TSVNCache.rc2 => TGITCache.rc2} | 0 .../{TSVNCache.vcproj => TGITCache.vcproj} | 10 +- src/TGitCache/stdafx.cpp | 2 +- src/TortoiseGit.sln | 2 +- .../CustomActions/CustomActions.cpp | 4 +- src/TortoiseGitSetup/FeaturesFragment.wxi | 2 +- src/TortoiseGitSetup/Includes.wxi | 12 +- src/TortoiseGitSetup/StructureFragment.wxi | 10 +- .../{TortoiseSVN.wxs => TortoiseGIT.wxs} | 4 +- src/TortoiseGitSetup/UIFragment.wxi | 8 +- src/TortoiseGitSetup/WiXSetup.wixproj | 2 +- .../include/{TSVN_eula.rtf => TGIT_eula.rtf} | Bin .../{tortoisesvn_logo.jpg => tortoisegit_logo.jpg} | Bin src/TortoiseIDiff/AboutDlg.cpp | 2 +- src/TortoiseMerge/AboutDlg.cpp | 4 +- src/TortoiseMerge/TortoiseMerge.vcproj | 2 +- src/TortoiseProc/AboutDlg.cpp | 2 +- src/TortoiseProc/AddDlg.cpp | 10 +- src/TortoiseProc/AppUtils.cpp | 2 +- src/TortoiseProc/ChangedDlg.cpp | 34 +- src/TortoiseProc/CheckForUpdatesDlg.cpp | 12 +- src/TortoiseProc/Commands/AddCommand.cpp | 2 +- src/TortoiseProc/Commands/DropCopyAddCommand.cpp | 2 +- src/TortoiseProc/Commands/ResolveCommand.cpp | 2 +- src/TortoiseProc/Commands/RevertCommand.cpp | 2 +- src/TortoiseProc/Commands/SendMailCommand.cpp | 2 +- src/TortoiseProc/CommitDlg.cpp | 26 +- src/TortoiseProc/GitLogListAction.cpp | 2 +- src/TortoiseProc/GitLogListBase.cpp | 2 +- .../{SVNProgressDlg.cpp => GitProgressDlg.cpp} | 6 +- .../{SVNProgressDlg.h => GitProgressDlg.h} | 0 src/TortoiseProc/GitStatusListCtrlHelpers.cpp | 36 +- src/TortoiseProc/LogDataVector.cpp | 2 +- src/TortoiseProc/LogDlg.cpp | 6 +- src/TortoiseProc/RebaseDlg.cpp | 4 +- src/TortoiseProc/ResolveDlg.cpp | 8 +- src/TortoiseProc/RevertDlg.cpp | 8 +- src/TortoiseProc/Settings/SetDialogs.cpp | 2 +- src/TortoiseProc/Settings/SetMainPage.cpp | 2 +- src/TortoiseProc/Settings/SetOverlayPage.cpp | 2 +- src/TortoiseProc/Settings/Settings.cpp | 12 +- src/TortoiseProc/SyncDlg.cpp | 20 +- src/TortoiseProc/TortoiseProc.cpp | 2 +- src/TortoiseProc/TortoiseProc.vcproj | 20 +- src/TortoiseProc/TortoiseProcLang.vcproj | 2 +- src/TortoiseShell/ColumnProvider.cpp | 6 +- src/TortoiseShell/ContextMenu.cpp | 684 ++++++++++----------- .../{SVNPropertyPage.cpp => GITPropertyPage.cpp} | 26 +- .../{SVNPropertyPage.h => GITPropertyPage.h} | 0 src/TortoiseShell/Globals.h | 4 +- src/TortoiseShell/IconOverlay.cpp | 8 +- src/TortoiseShell/MenuInfo.cpp | 106 ++-- src/TortoiseShell/RemoteCacheLink.cpp | 26 +- src/TortoiseShell/RemoteCacheLink.h | 4 +- src/TortoiseShell/ShellCache.h | 2 +- src/TortoiseShell/ShellExt.cpp | 2 +- .../{TortoiseSVN.cpp => TortoiseGIT.cpp} | 0 src/TortoiseShell/TortoiseShell.vcproj | 18 +- src/Utils/ShellUpdater.cpp | 8 +- src/version.h | 14 +- test/Cache/CacheDlg.cpp | 18 +- 76 files changed, 907 insertions(+), 907 deletions(-) rename src/Resources/{tortoisesvn_logoflipped.bmp => tortoisegit_logoflipped.bmp} (100%) rename src/TGitCache/{SVNStatusCache.cpp => GITStatusCache.cpp} (96%) rename src/TGitCache/{TSVNCache.cpp => TGITCache.cpp} (94%) rename src/TGitCache/{TSVNCache.h => TGITCache.h} (100%) rename src/TGitCache/{TSVNCache.rc => TGITCache.rc} (100%) rename src/TGitCache/{TSVNCache.rc2 => TGITCache.rc2} (100%) rename src/TGitCache/{TSVNCache.vcproj => TGITCache.vcproj} (94%) rename src/TortoiseGitSetup/{TortoiseSVN.wxs => TortoiseGIT.wxs} (96%) rename src/TortoiseGitSetup/include/{TSVN_eula.rtf => TGIT_eula.rtf} (100%) rename src/TortoiseGitSetup/include/{tortoisesvn_logo.jpg => tortoisegit_logo.jpg} (100%) rename src/TortoiseProc/{SVNProgressDlg.cpp => GitProgressDlg.cpp} (96%) rename src/TortoiseProc/{SVNProgressDlg.h => GitProgressDlg.h} (100%) rename src/TortoiseShell/{SVNPropertyPage.cpp => GITPropertyPage.cpp} (92%) rename src/TortoiseShell/{SVNPropertyPage.h => GITPropertyPage.h} (100%) rename src/TortoiseShell/{TortoiseSVN.cpp => TortoiseGIT.cpp} (100%) diff --git a/src/Git/GitFolderStatus.cpp b/src/Git/GitFolderStatus.cpp index 46536c6ae..2b3eb8859 100644 --- a/src/Git/GitFolderStatus.cpp +++ b/src/Git/GitFolderStatus.cpp @@ -321,7 +321,7 @@ const FileStatusCacheEntry * GitFolderStatus::GetFullStatus(const CTGitPath& fil const FileStatusCacheEntry * ret = NULL; CString sProjectRoot; - BOOL bHasAdminDir = g_ShellCache.HasSVNAdminDir(filepath.GetWinPath(), bIsFolder, &sProjectRoot); + BOOL bHasAdminDir = g_ShellCache.HasGITAdminDir(filepath.GetWinPath(), bIsFolder, &sProjectRoot); //no overlay for unversioned folders if ((!bColumnProvider)&&(!bHasAdminDir)) diff --git a/src/Git/GitStatusListCtrl.cpp b/src/Git/GitStatusListCtrl.cpp index 4acc51ac2..622414893 100644 --- a/src/Git/GitStatusListCtrl.cpp +++ b/src/Git/GitStatusListCtrl.cpp @@ -53,15 +53,15 @@ //#include "CreateChangelistDlg.h" #include "CommonResource.h" -const UINT CGitStatusListCtrl::SVNSLNM_ITEMCOUNTCHANGED +const UINT CGitStatusListCtrl::GITSLNM_ITEMCOUNTCHANGED = ::RegisterWindowMessage(_T("GITSLNM_ITEMCOUNTCHANGED")); -const UINT CGitStatusListCtrl::SVNSLNM_NEEDSREFRESH +const UINT CGitStatusListCtrl::GITSLNM_NEEDSREFRESH = ::RegisterWindowMessage(_T("GITSLNM_NEEDSREFRESH")); -const UINT CGitStatusListCtrl::SVNSLNM_ADDFILE +const UINT CGitStatusListCtrl::GITSLNM_ADDFILE = ::RegisterWindowMessage(_T("GITSLNM_ADDFILE")); -const UINT CGitStatusListCtrl::SVNSLNM_CHECKCHANGED +const UINT CGitStatusListCtrl::GITSLNM_CHECKCHANGED = ::RegisterWindowMessage(_T("GITSLNM_CHECKCHANGED")); -const UINT CGitStatusListCtrl::SVNSLNM_ITEMCHANGED +const UINT CGitStatusListCtrl::GITSLNM_ITEMCHANGED = ::RegisterWindowMessage(_T("GITSLNM_ITEMCHANGED")); @@ -229,7 +229,7 @@ void CGitStatusListCtrl::Init(DWORD dwColumns, const CString& sColumnInfoContain SetImageList(&SYS_IMAGE_LIST(), LVSIL_SMALL); // keep CSorter::operator() in sync!! - static UINT standardColumnNames[SVNSLC_NUMCOLUMNS] + static UINT standardColumnNames[GITSLC_NUMCOLUMNS] = { IDS_STATUSLIST_COLFILE , IDS_STATUSLIST_COLFILENAME , IDS_STATUSLIST_COLEXT @@ -238,8 +238,8 @@ void CGitStatusListCtrl::Init(DWORD dwColumns, const CString& sColumnInfoContain , IDS_STATUSLIST_COLDEL }; - m_ColumnManager.SetNames(standardColumnNames,SVNSLC_NUMCOLUMNS); - m_ColumnManager.ReadSettings (m_dwDefaultColumns, 0, sColumnInfoContainer, SVNSLC_NUMCOLUMNS); + m_ColumnManager.SetNames(standardColumnNames,GITSLC_NUMCOLUMNS); + m_ColumnManager.ReadSettings (m_dwDefaultColumns, 0, sColumnInfoContainer, GITSLC_NUMCOLUMNS); // enable file drops #if 0 @@ -528,33 +528,33 @@ DWORD CGitStatusListCtrl::GetShowFlagsFromGitStatus(git_wc_status_kind status) { case git_wc_status_none: case git_wc_status_unversioned: - return SVNSLC_SHOWUNVERSIONED; + return GITSLC_SHOWUNVERSIONED; case git_wc_status_ignored: if (!m_bShowIgnores) - return SVNSLC_SHOWDIRECTS; - return SVNSLC_SHOWDIRECTS|SVNSLC_SHOWIGNORED; + return GITSLC_SHOWDIRECTS; + return GITSLC_SHOWDIRECTS|GITSLC_SHOWIGNORED; case git_wc_status_incomplete: - return SVNSLC_SHOWINCOMPLETE; + return GITSLC_SHOWINCOMPLETE; case git_wc_status_normal: - return SVNSLC_SHOWNORMAL; + return GITSLC_SHOWNORMAL; case git_wc_status_external: - return SVNSLC_SHOWEXTERNAL; + return GITSLC_SHOWEXTERNAL; case git_wc_status_added: - return SVNSLC_SHOWADDED; + return GITSLC_SHOWADDED; case git_wc_status_missing: - return SVNSLC_SHOWMISSING; + return GITSLC_SHOWMISSING; case git_wc_status_deleted: - return SVNSLC_SHOWREMOVED; + return GITSLC_SHOWREMOVED; case git_wc_status_replaced: - return SVNSLC_SHOWREPLACED; + return GITSLC_SHOWREPLACED; case git_wc_status_modified: - return SVNSLC_SHOWMODIFIED; + return GITSLC_SHOWMODIFIED; case git_wc_status_merged: - return SVNSLC_SHOWMERGED; + return GITSLC_SHOWMERGED; case git_wc_status_conflicted: - return SVNSLC_SHOWCONFLICTED; + return GITSLC_SHOWCONFLICTED; case git_wc_status_obstructed: - return SVNSLC_SHOWOBSTRUCTED; + return GITSLC_SHOWOBSTRUCTED; default: // we should NEVER get here! ASSERT(FALSE); @@ -722,7 +722,7 @@ void CGitStatusListCtrl::Show(unsigned int dwShow, unsigned int dwCheck /*=0*/, if (!entry->changelist.IsEmpty()) showFlags |= SVNSLC_SHOWINCHANGELIST; #endif - bool bAllowCheck = ((entry->changelist.Compare(SVNSLC_IGNORECHANGELIST) != 0) + bool bAllowCheck = ((entry->changelist.Compare(GITSLC_IGNORECHANGELIST) != 0) && (m_bCheckIfGroupsExist || (m_changelists.size()==0 || (m_changelists.size()==1 && m_bHasIgnoreGroup)))); // status_ignored is a special case - we must have the 'direct' flag set to add a status_ignored item @@ -1003,8 +1003,8 @@ void CGitStatusListCtrl::AddEntry(CTGitPath * GitPath, WORD /*langID*/, int list // SVNSLC_COLSTATUS SetItemText(index, nCol++, GitPath->GetActionName()); - SetItemText(index, GetColumnIndex(SVNSLC_COLADD),GitPath->m_StatAdd); - SetItemText(index, GetColumnIndex(SVNSLC_COLDEL),GitPath->m_StatDel); + SetItemText(index, GetColumnIndex(GITSLC_COLADD),GitPath->m_StatAdd); + SetItemText(index, GetColumnIndex(GITSLC_COLDEL),GitPath->m_StatDel); SetCheck(index, GitPath->m_Checked); @@ -1330,7 +1330,7 @@ BOOL CGitStatusListCtrl::OnLvnItemchanged(NMHDR *pNMHDR, LRESULT *pResult) CWnd* pParent = GetParent(); if (NULL != pParent && NULL != pParent->GetSafeHwnd()) { - pParent->SendMessage(SVNSLNM_ITEMCHANGED, pNMLV->iItem); + pParent->SendMessage(GITSLNM_ITEMCHANGED, pNMLV->iItem); } if ((pNMLV->uNewState==0)||(pNMLV->uNewState & LVIS_SELECTED)||(pNMLV->uNewState & LVIS_FOCUSED)) @@ -1667,17 +1667,17 @@ void CGitStatusListCtrl::OnContextMenuGroup(CWnd * /*pWnd*/, CPoint point) { CString temp; temp.LoadString(IDS_STATUSLIST_CHECKGROUP); - popup.AppendMenu(MF_STRING | MF_ENABLED, IDSVNLC_CHECKGROUP, temp); + popup.AppendMenu(MF_STRING | MF_ENABLED, IDGITLC_CHECKGROUP, temp); temp.LoadString(IDS_STATUSLIST_UNCHECKGROUP); - popup.AppendMenu(MF_STRING | MF_ENABLED, IDSVNLC_UNCHECKGROUP, temp); + popup.AppendMenu(MF_STRING | MF_ENABLED, IDGITLC_UNCHECKGROUP, temp); int cmd = popup.TrackPopupMenu(TPM_RETURNCMD | TPM_LEFTALIGN | TPM_NONOTIFY, point.x, point.y, this, 0); bool bCheck = false; switch (cmd) { - case IDSVNLC_CHECKGROUP: + case IDGITLC_CHECKGROUP: bCheck = true; // fall through here - case IDSVNLC_UNCHECKGROUP: + case IDGITLC_UNCHECKGROUP: { int group = GetGroupFromPoint(&clientpoint); // go through all items and check/uncheck those assigned to the group @@ -1772,27 +1772,27 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) if (wcStatus & CTGitPath::LOGACTIONS_UNMERGED) { - if ((m_dwContextMenus & SVNSLC_POPCONFLICT)/*&&(entry->textstatus == git_wc_status_conflicted)*/) + if ((m_dwContextMenus & GITSLC_POPCONFLICT)/*&&(entry->textstatus == git_wc_status_conflicted)*/) { - popup.AppendMenuIcon(IDSVNLC_EDITCONFLICT, IDS_MENUCONFLICT, IDI_CONFLICT); + popup.AppendMenuIcon(IDGITLC_EDITCONFLICT, IDS_MENUCONFLICT, IDI_CONFLICT); } - if (m_dwContextMenus & SVNSLC_POPRESOLVE) + if (m_dwContextMenus & GITSLC_POPRESOLVE) { - popup.AppendMenuIcon(IDSVNLC_RESOLVECONFLICT, IDS_STATUSLIST_CONTEXT_RESOLVED, IDI_RESOLVE); + popup.AppendMenuIcon(IDGITLC_RESOLVECONFLICT, IDS_STATUSLIST_CONTEXT_RESOLVED, IDI_RESOLVE); } - if ((m_dwContextMenus & SVNSLC_POPRESOLVE)/*&&(entry->textstatus == git_wc_status_conflicted)*/) + if ((m_dwContextMenus & GITSLC_POPRESOLVE)/*&&(entry->textstatus == git_wc_status_conflicted)*/) { - popup.AppendMenuIcon(IDSVNLC_RESOLVETHEIRS, IDS_SVNPROGRESS_MENUUSETHEIRS, IDI_RESOLVE); - popup.AppendMenuIcon(IDSVNLC_RESOLVEMINE, IDS_SVNPROGRESS_MENUUSEMINE, IDI_RESOLVE); + popup.AppendMenuIcon(IDGITLC_RESOLVETHEIRS, IDS_SVNPROGRESS_MENUUSETHEIRS, IDI_RESOLVE); + popup.AppendMenuIcon(IDGITLC_RESOLVEMINE, IDS_SVNPROGRESS_MENUUSEMINE, IDI_RESOLVE); } - if ((m_dwContextMenus & SVNSLC_POPCONFLICT)||(m_dwContextMenus & SVNSLC_POPRESOLVE)) + if ((m_dwContextMenus & GITSLC_POPCONFLICT)||(m_dwContextMenus & GITSLC_POPRESOLVE)) popup.AppendMenu(MF_SEPARATOR); } if (GetSelectedCount() > 0) { if (wcStatus & CTGitPath::LOGACTIONS_UNVER) - if (m_dwContextMenus & SVNSLC_POPADD) + if (m_dwContextMenus & GITSLC_POPADD) { //if ( entry->IsFolder() ) //{ @@ -1800,27 +1800,27 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) //} //else { - popup.AppendMenuIcon(IDSVNLC_ADD, IDS_STATUSLIST_CONTEXT_ADD, IDI_ADD); + popup.AppendMenuIcon(IDGITLC_ADD, IDS_STATUSLIST_CONTEXT_ADD, IDI_ADD); } } } if (!(wcStatus &CTGitPath::LOGACTIONS_UNVER)) { - if ( (m_dwContextMenus & SVNSLC_POPCOMPAREWITHBASE) && GetSelectedCount()>0) + if ( (m_dwContextMenus & GITSLC_POPCOMPAREWITHBASE) && GetSelectedCount()>0) { if(filepath->m_ParentNo & MERGE_MASK) - popup.AppendMenuIcon(IDSVNLC_COMPARE, IDS_TREE_DIFF, IDI_DIFF); + popup.AppendMenuIcon(IDGITLC_COMPARE, IDS_TREE_DIFF, IDI_DIFF); else - popup.AppendMenuIcon(IDSVNLC_COMPARE, IDS_LOG_COMPAREWITHBASE, IDI_DIFF); + popup.AppendMenuIcon(IDGITLC_COMPARE, IDS_LOG_COMPAREWITHBASE, IDI_DIFF); - popup.SetDefaultItem(IDSVNLC_COMPARE, FALSE); + popup.SetDefaultItem(IDGITLC_COMPARE, FALSE); } - if ((m_dwContextMenus & this->GetContextMenuBit(IDSVNLC_COMPAREWC)) && GetSelectedCount()>0) + if ((m_dwContextMenus & this->GetContextMenuBit(IDGITLC_COMPAREWC)) && GetSelectedCount()>0) { if( (!m_CurrentVersion.IsEmpty()) && m_CurrentVersion != GIT_REV_ZERO) - popup.AppendMenuIcon(IDSVNLC_COMPAREWC, IDS_LOG_POPUP_COMPARE, IDI_DIFF); + popup.AppendMenuIcon(IDGITLC_COMPAREWC, IDS_LOG_POPUP_COMPARE, IDI_DIFF); } //Select one items if (GetSelectedCount() == 1) @@ -1832,9 +1832,9 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) // { // if ((m_dwContextMenus & SVNSLC_POPGNUDIFF)&&(wcStatus != git_wc_status_deleted)&&(wcStatus != git_wc_status_missing)) // { - if(!g_Git.IsInitRepos() && (m_dwContextMenus&SVNSLC_POPGNUDIFF)) + if(!g_Git.IsInitRepos() && (m_dwContextMenus&GITSLC_POPGNUDIFF)) { - popup.AppendMenuIcon(IDSVNLC_GNUDIFF1, IDS_LOG_POPUP_GNUDIFF, IDI_DIFF); + popup.AppendMenuIcon(IDGITLC_GNUDIFF1, IDS_LOG_POPUP_GNUDIFF, IDI_DIFF); bEntryAdded = true; } @@ -1873,14 +1873,14 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) { if(GetSelectedCount() == 1) { - if (m_dwContextMenus & this->GetContextMenuBit(IDSVNLC_COMPARETWO)) + if (m_dwContextMenus & this->GetContextMenuBit(IDGITLC_COMPARETWO)) { - popup.AppendMenuIcon(IDSVNLC_COMPARETWO, IDS_LOG_POPUP_COMPARETWO, IDI_DIFF); - popup.SetDefaultItem(IDSVNLC_COMPARETWO, FALSE); + popup.AppendMenuIcon(IDGITLC_COMPARETWO, IDS_LOG_POPUP_COMPARETWO, IDI_DIFF); + popup.SetDefaultItem(IDGITLC_COMPARETWO, FALSE); } - if (m_dwContextMenus & this->GetContextMenuBit(IDSVNLC_GNUDIFF2)) + if (m_dwContextMenus & this->GetContextMenuBit(IDGITLC_GNUDIFF2)) { - popup.AppendMenuIcon(IDSVNLC_GNUDIFF2, IDS_LOG_POPUP_GNUDIFF, IDI_DIFF); + popup.AppendMenuIcon(IDGITLC_GNUDIFF2, IDS_LOG_POPUP_GNUDIFF, IDI_DIFF); } } } @@ -1888,7 +1888,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) //Select Multi item if (GetSelectedCount() > 0) { - if ((GetSelectedCount() == 2) && (m_dwContextMenus & this->GetContextMenuBit(SVNSLC_POPCOMPARETWOFILES))) + if ((GetSelectedCount() == 2) && (m_dwContextMenus & this->GetContextMenuBit(GITSLC_POPCOMPARETWOFILES))) { POSITION pos = GetFirstSelectedItemPosition(); int index = GetNextSelectedItem(pos); @@ -1906,7 +1906,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) if (entry2) bothItemsAreFiles = bothItemsAreFiles && !entry2->IsDirectory(); if (bothItemsAreFiles) - popup.AppendMenuIcon(IDSVNLC_COMPARETWOFILES, IDS_STATUSLIST_CONTEXT_COMPARETWOFILES, IDI_DIFF); + popup.AppendMenuIcon(IDGITLC_COMPARETWOFILES, IDS_STATUSLIST_CONTEXT_COMPARETWOFILES, IDI_DIFF); } } } @@ -1957,51 +1957,51 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) if ( (GetSelectedCount() >0 ) && (!(wcStatus & CTGitPath::LOGACTIONS_UNVER))) { - if ((m_dwContextMenus & SVNSLC_POPREVERT) && (this->m_CurrentVersion.IsEmpty() || this->m_CurrentVersion == GIT_REV_ZERO)) + if ((m_dwContextMenus & GITSLC_POPREVERT) && (this->m_CurrentVersion.IsEmpty() || this->m_CurrentVersion == GIT_REV_ZERO)) { - popup.AppendMenuIcon(IDSVNLC_REVERT, IDS_MENUREVERT, IDI_REVERT); + popup.AppendMenuIcon(IDGITLC_REVERT, IDS_MENUREVERT, IDI_REVERT); } - if ((m_dwContextMenus & GetContextMenuBit(IDSVNLC_REVERTTOREV)) && ( !this->m_CurrentVersion.IsEmpty() ) + if ((m_dwContextMenus & GetContextMenuBit(IDGITLC_REVERTTOREV)) && ( !this->m_CurrentVersion.IsEmpty() ) && this->m_CurrentVersion != GIT_REV_ZERO && !(wcStatus & CTGitPath::LOGACTIONS_DELETED)) { - popup.AppendMenuIcon(IDSVNLC_REVERTTOREV, IDS_LOG_POPUP_REVERTTOREV, IDI_REVERT); + popup.AppendMenuIcon(IDGITLC_REVERTTOREV, IDS_LOG_POPUP_REVERTTOREV, IDI_REVERT); } } if ((GetSelectedCount() == 1)&&(!(wcStatus & CTGitPath::LOGACTIONS_UNVER)) &&(!(wcStatus & CTGitPath::LOGACTIONS_IGNORE))) { - if (m_dwContextMenus & SVNSLC_POPSHOWLOG) + if (m_dwContextMenus & GITSLC_POPSHOWLOG) { - popup.AppendMenuIcon(IDSVNLC_LOG, IDS_REPOBROWSE_SHOWLOG, IDI_LOG); + popup.AppendMenuIcon(IDGITLC_LOG, IDS_REPOBROWSE_SHOWLOG, IDI_LOG); } - if (m_dwContextMenus & SVNSLC_POPBLAME && ! filepath->IsDirectory() && !(wcStatus & CTGitPath::LOGACTIONS_DELETED)) + if (m_dwContextMenus & GITSLC_POPBLAME && ! filepath->IsDirectory() && !(wcStatus & CTGitPath::LOGACTIONS_DELETED)) { - popup.AppendMenuIcon(IDSVNLC_BLAME, IDS_MENUBLAME, IDI_BLAME); + popup.AppendMenuIcon(IDGITLC_BLAME, IDS_MENUBLAME, IDI_BLAME); } } // if ((wcStatus != git_wc_status_deleted)&&(wcStatus != git_wc_status_missing) && (GetSelectedCount() == 1)) if ( (GetSelectedCount() == 1) ) { - if (m_dwContextMenus & this->GetContextMenuBit(IDSVNLC_SAVEAS) && ! filepath->IsDirectory() && !(wcStatus & CTGitPath::LOGACTIONS_DELETED)) + if (m_dwContextMenus & this->GetContextMenuBit(IDGITLC_SAVEAS) && ! filepath->IsDirectory() && !(wcStatus & CTGitPath::LOGACTIONS_DELETED)) { - popup.AppendMenuIcon(IDSVNLC_SAVEAS, IDS_LOG_POPUP_SAVE, IDI_SAVEAS); + popup.AppendMenuIcon(IDGITLC_SAVEAS, IDS_LOG_POPUP_SAVE, IDI_SAVEAS); } - if (m_dwContextMenus & SVNSLC_POPOPEN && ! filepath->IsDirectory() && !(wcStatus & CTGitPath::LOGACTIONS_DELETED)) + if (m_dwContextMenus & GITSLC_POPOPEN && ! filepath->IsDirectory() && !(wcStatus & CTGitPath::LOGACTIONS_DELETED)) { - popup.AppendMenuIcon(IDSVNLC_VIEWREV, IDS_LOG_POPUP_VIEWREV); - popup.AppendMenuIcon(IDSVNLC_OPEN, IDS_REPOBROWSE_OPEN, IDI_OPEN); - popup.AppendMenuIcon(IDSVNLC_OPENWITH, IDS_LOG_POPUP_OPENWITH, IDI_OPEN); + popup.AppendMenuIcon(IDGITLC_VIEWREV, IDS_LOG_POPUP_VIEWREV); + popup.AppendMenuIcon(IDGITLC_OPEN, IDS_REPOBROWSE_OPEN, IDI_OPEN); + popup.AppendMenuIcon(IDGITLC_OPENWITH, IDS_LOG_POPUP_OPENWITH, IDI_OPEN); if (wcStatus &CTGitPath::LOGACTIONS_UNVER) { - popup.SetDefaultItem(IDSVNLC_OPEN, FALSE); + popup.SetDefaultItem(IDGITLC_OPEN, FALSE); } } - if (m_dwContextMenus & SVNSLC_POPEXPLORE && !(wcStatus & CTGitPath::LOGACTIONS_DELETED)) + if (m_dwContextMenus & GITSLC_POPEXPLORE && !(wcStatus & CTGitPath::LOGACTIONS_DELETED)) { - popup.AppendMenuIcon(IDSVNLC_EXPLORE, IDS_STATUSLIST_CONTEXT_EXPLORE, IDI_EXPLORER); + popup.AppendMenuIcon(IDGITLC_EXPLORE, IDS_STATUSLIST_CONTEXT_EXPLORE, IDI_EXPLORER); } } @@ -2020,14 +2020,14 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) // } if ((wcStatus & CTGitPath::LOGACTIONS_UNVER)/*||(wcStatus == git_wc_status_deleted)*/) { - if (m_dwContextMenus & SVNSLC_POPDELETE) + if (m_dwContextMenus & GITSLC_POPDELETE) { - popup.AppendMenuIcon(IDSVNLC_DELETE, IDS_MENUREMOVE, IDI_DELETE); + popup.AppendMenuIcon(IDGITLC_DELETE, IDS_MENUREMOVE, IDI_DELETE); } } if ( (wcStatus & CTGitPath::LOGACTIONS_UNVER || wcStatus & CTGitPath::LOGACTIONS_DELETED) ) { - if (m_dwContextMenus & SVNSLC_POPIGNORE) + if (m_dwContextMenus & GITSLC_POPIGNORE) { CTGitPathList ignorelist; @@ -2051,9 +2051,9 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) ignorepath = ignorelist[0].GetFileOrDirectoryName(); else ignorepath.Format(IDS_MENUIGNOREMULTIPLE, ignorelist.GetCount()); - ignoreSubMenu.AppendMenu(MF_STRING | MF_ENABLED, IDSVNLC_IGNORE, ignorepath); + ignoreSubMenu.AppendMenu(MF_STRING | MF_ENABLED, IDGITLC_IGNORE, ignorepath); ignorepath = _T("*")+sExt; - ignoreSubMenu.AppendMenu(MF_STRING | MF_ENABLED, IDSVNLC_IGNOREMASK, ignorepath); + ignoreSubMenu.AppendMenu(MF_STRING | MF_ENABLED, IDGITLC_IGNOREMASK, ignorepath); CString temp; temp.LoadString(IDS_MENUIGNORE); popup.InsertMenu((UINT)-1, MF_BYPOSITION | MF_POPUP, (UINT_PTR)ignoreSubMenu.m_hMenu, temp); @@ -2070,7 +2070,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) { temp.Format(IDS_MENUIGNOREMULTIPLE, ignorelist.GetCount()); } - popup.AppendMenuIcon(IDSVNLC_IGNORE, temp, IDI_IGNORE); + popup.AppendMenuIcon(IDGITLC_IGNORE, temp, IDI_IGNORE); } } } @@ -2117,8 +2117,8 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } #endif popup.AppendMenu(MF_SEPARATOR); - popup.AppendMenuIcon(IDSVNLC_COPY, IDS_STATUSLIST_CONTEXT_COPY, IDI_COPYCLIP); - popup.AppendMenuIcon(IDSVNLC_COPYEXT, IDS_STATUSLIST_CONTEXT_COPYEXT, IDI_COPYCLIP); + popup.AppendMenuIcon(IDGITLC_COPY, IDS_STATUSLIST_CONTEXT_COPY, IDI_COPYCLIP); + popup.AppendMenuIcon(IDGITLC_COPYEXT, IDS_STATUSLIST_CONTEXT_COPYEXT, IDI_COPYCLIP); #if 0 if ((m_dwContextMenus & SVNSLC_POPCHANGELISTS)&&(XPorLater) &&(wcStatus != git_wc_status_unversioned)&&(wcStatus != git_wc_status_none)) @@ -2176,23 +2176,23 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) //bool bForce = false; switch (cmd) { - case IDSVNLC_VIEWREV: + case IDGITLC_VIEWREV: OpenFile(filepath, ALTERNATIVEEDITOR); break; - case IDSVNLC_OPEN: + case IDGITLC_OPEN: OpenFile(filepath,OPEN); break; - case IDSVNLC_OPENWITH: + case IDGITLC_OPENWITH: OpenFile(filepath,OPEN_WITH); break; - case IDSVNLC_EXPLORE: + case IDGITLC_EXPLORE: { ShellExecute(this->m_hWnd, _T("explore"), filepath->GetDirectory().GetWinPath(), NULL, NULL, SW_SHOW); } break; // Compare current version and work copy. - case IDSVNLC_COMPAREWC: + case IDGITLC_COMPAREWC: { POSITION pos = GetFirstSelectedItemPosition(); while ( pos ) @@ -2203,7 +2203,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } break; // Compare with base version. when current version is zero, compare workcopy and HEAD. - case IDSVNLC_COMPARE: + case IDGITLC_COMPARE: { POSITION pos = GetFirstSelectedItemPosition(); while ( pos ) @@ -2213,7 +2213,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } } break; - case IDSVNLC_COMPARETWO: + case IDGITLC_COMPARETWO: { POSITION pos = GetFirstSelectedItemPosition(); while ( pos ) @@ -2223,7 +2223,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } } break; - case IDSVNLC_COMPARETWOFILES: + case IDGITLC_COMPARETWOFILES: { POSITION pos = GetFirstSelectedItemPosition(); CTGitPath * firstfilepath, * secondfilepath; @@ -2238,7 +2238,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) CAppUtils::LaunchApplication(sCmd, NULL, false); } break; - case IDSVNLC_GNUDIFF1: + case IDGITLC_GNUDIFF1: { // SVNDiff diff(NULL, this->m_hWnd, true); // @@ -2277,7 +2277,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } } break; - case IDSVNLC_GNUDIFF2: + case IDGITLC_GNUDIFF2: { // SVNDiff diff(NULL, this->m_hWnd, true); // @@ -2291,7 +2291,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } break; - case IDSVNLC_ADD: + case IDGITLC_ADD: { // The add went ok, but we now need to run through the selected items again // and update their status std::vector selectIndex; @@ -2330,7 +2330,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } break; - case IDSVNLC_DELETE: + case IDGITLC_DELETE: { //Collect paths std::vector selectIndex; @@ -2391,13 +2391,13 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } break; - case IDSVNLC_BLAME: + case IDGITLC_BLAME: { CAppUtils::LaunchTortoiseBlame(g_Git.m_CurrentDir+_T("\\")+filepath->GetWinPath(), m_CurrentVersion); } break; - case IDSVNLC_LOG: + case IDGITLC_LOG: { CString sCmd; sCmd.Format(_T("\"%s\" /command:log /path:\"%s\""), @@ -2407,14 +2407,14 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } break; - case IDSVNLC_EDITCONFLICT: + case IDGITLC_EDITCONFLICT: { CAppUtils::ConflictEdit(*filepath,false,this->m_bIsRevertTheirMy); break; } - case IDSVNLC_RESOLVETHEIRS: //follow up - case IDSVNLC_RESOLVEMINE: //follow up - case IDSVNLC_RESOLVECONFLICT: + case IDGITLC_RESOLVETHEIRS: //follow up + case IDGITLC_RESOLVEMINE: //follow up + case IDGITLC_RESOLVECONFLICT: { if (CMessageBox::Show(m_hWnd, IDS_PROC_RESOLVE, IDS_APPNAME, MB_ICONQUESTION | MB_YESNO)==IDYES) { @@ -2429,8 +2429,8 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) CString gitcmd,output; output.Empty(); - if ( ((!this->m_bIsRevertTheirMy)&&cmd == IDSVNLC_RESOLVETHEIRS) || - ((this->m_bIsRevertTheirMy)&&cmd == IDSVNLC_RESOLVEMINE) ) + if ( ((!this->m_bIsRevertTheirMy)&&cmd == IDGITLC_RESOLVETHEIRS) || + ((this->m_bIsRevertTheirMy)&&cmd == IDGITLC_RESOLVEMINE) ) { gitcmd.Format(_T("git.exe checkout-index -f --stage=3 -- \"%s\""),fentry->GetGitPathString()); if(g_Git.Run(gitcmd,&output,CP_ACP)) @@ -2440,8 +2440,8 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } } output.Empty(); - if ( ((!this->m_bIsRevertTheirMy)&&cmd == IDSVNLC_RESOLVEMINE) || - ((this->m_bIsRevertTheirMy)&&cmd == IDSVNLC_RESOLVETHEIRS) ) + if ( ((!this->m_bIsRevertTheirMy)&&cmd == IDGITLC_RESOLVEMINE) || + ((this->m_bIsRevertTheirMy)&&cmd == IDGITLC_RESOLVETHEIRS) ) { gitcmd.Format(_T("git.exe checkout-index -f --stage=2 -- \"%s\""),fentry->GetGitPathString()); if(g_Git.Run(gitcmd,&output,CP_ACP)) @@ -2474,7 +2474,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } break; - case IDSVNLC_IGNORE: + case IDGITLC_IGNORE: { CTGitPathList ignorelist; //std::vector toremove; @@ -2648,7 +2648,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } #endif break; - case IDSVNLC_IGNOREMASK: + case IDGITLC_IGNOREMASK: { CString common; CString ext=filepath->GetFileExtension(); @@ -2678,7 +2678,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) CWnd* pParent = GetParent(); if (NULL != pParent && NULL != pParent->GetSafeHwnd()) { - pParent->SendMessage(SVNSLNM_NEEDSREFRESH); + pParent->SendMessage(GITSLNM_NEEDSREFRESH); } SetRedraw(TRUE); @@ -2828,7 +2828,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) #endif break; - case IDSVNLC_REVERT: + case IDGITLC_REVERT: { // If at least one item is not in the status "added" // we ask for a confirmation @@ -2923,18 +2923,18 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) } break; - case IDSVNLC_COPY: + case IDGITLC_COPY: CopySelectedEntriesToClipboard(0); break; - case IDSVNLC_COPYEXT: + case IDGITLC_COPYEXT: CopySelectedEntriesToClipboard((DWORD)-1); break; - case IDSVNLC_SAVEAS: + case IDGITLC_SAVEAS: FileSaveAs(filepath); break; - case IDSVNLC_REVERTTOREV: + case IDGITLC_REVERTTOREV: RevertSelectedItemToVersion(); break; #if 0 @@ -4460,7 +4460,7 @@ BOOL CGitStatusListCtrl::PreTranslateMessage(MSG* pMsg) { // copy all selected paths to the clipboard if (GetAsyncKeyState(VK_SHIFT)&0x8000) - CopySelectedEntriesToClipboard(SVNSLC_COLSTATUS); + CopySelectedEntriesToClipboard(GITSLC_COLSTATUS); else CopySelectedEntriesToClipboard(0); return TRUE; @@ -4514,16 +4514,16 @@ bool CGitStatusListCtrl::CopySelectedEntriesToClipboard(DWORD dwCols) continue; sClipboard += entry->GetWinPathString(); - if (selection & SVNSLC_COLFILENAME) + if (selection & GITSLC_COLFILENAME) { sClipboard += _T("\t")+entry->GetFileOrDirectoryName(); } - if (selection & SVNSLC_COLEXT) + if (selection & GITSLC_COLEXT) { sClipboard += _T("\t")+entry->GetFileExtension(); } - if (selection & SVNSLC_COLSTATUS) + if (selection & GITSLC_COLSTATUS) { #if 0 if (entry->isNested) @@ -4723,11 +4723,11 @@ bool CGitStatusListCtrl::CopySelectedEntriesToClipboard(DWORD dwCols) } } #endif - if (selection & SVNSLC_COLADD) + if (selection & GITSLC_COLADD) { sClipboard += _T("\t")+entry->m_StatAdd; } - if (selection & SVNSLC_COLDEL) + if (selection & GITSLC_COLDEL) { sClipboard += _T("\t")+entry->m_StatDel; } @@ -4894,7 +4894,7 @@ void CGitStatusListCtrl::NotifyCheck() CWnd* pParent = GetParent(); if (NULL != pParent && NULL != pParent->GetSafeHwnd()) { - pParent->SendMessage(SVNSLNM_CHECKCHANGED, m_nSelected); + pParent->SendMessage(GITSLNM_CHECKCHANGED, m_nSelected); } } diff --git a/src/Git/GitStatusListCtrl.h b/src/Git/GitStatusListCtrl.h index 8d218dd2d..a76b20ef8 100644 --- a/src/Git/GitStatusListCtrl.h +++ b/src/Git/GitStatusListCtrl.h @@ -27,21 +27,21 @@ #include "CommonResource.h" #include "HintListCtrl.h" -#define SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN (-1) +#define GIT_WC_ENTRY_WORKING_SIZE_UNKNOWN (-1) // these defines must be in the order the columns are inserted! -#define SVNSLC_COLFILENAME 0x000000002 -#define SVNSLC_COLEXT 0x000000004 -#define SVNSLC_COLSTATUS 0x000000008 +#define GITSLC_COLFILENAME 0x000000002 +#define GITSLC_COLEXT 0x000000004 +#define GITSLC_COLSTATUS 0x000000008 //#define SVNSLC_COLTEXTSTATUS 0x000000010 //#define SVNSLC_COLPROPSTATUS 0x000000020 //#define SVNSLC_COLAUTHOR 0x000000040 //#define SVNSLC_COLREVISION 0x000000080 //#define SVNSLC_COLDATE 0x000000100 //#define SVNSLC_COLMODIFICATIONDATE 0x000000200 -#define SVNSLC_COLADD 0x000000010 -#define SVNSLC_COLDEL 0x000000020 -#define SVNSLC_NUMCOLUMNS 6 +#define GITSLC_COLADD 0x000000010 +#define GITSLC_COLDEL 0x000000020 +#define GITSLC_NUMCOLUMNS 6 //#define SVNSLC_COLREMOTESTATUS 0x000000010 //#define SVNSLC_COLREMOTETEXT 0x000000080 @@ -55,96 +55,96 @@ //#define SVNSLC_COLSVNNEEDSLOCK 0x000010000 //#define SVNSLC_COLCOPYFROM 0x000020000 -#define SVNSLC_SHOWUNVERSIONED CTGitPath::LOGACTIONS_UNVER -#define SVNSLC_SHOWNORMAL 0x000000000 -#define SVNSLC_SHOWMODIFIED (CTGitPath::LOGACTIONS_MODIFIED) -#define SVNSLC_SHOWADDED (CTGitPath::LOGACTIONS_ADDED|CTGitPath::LOGACTIONS_COPY) -#define SVNSLC_SHOWREMOVED CTGitPath::LOGACTIONS_DELETED -#define SVNSLC_SHOWCONFLICTED CTGitPath::LOGACTIONS_UNMERGED -#define SVNSLC_SHOWMISSING 0x00000000 -#define SVNSLC_SHOWREPLACED CTGitPath::LOGACTIONS_REPLACED -#define SVNSLC_SHOWMERGED CTGitPath::LOGACTIONS_MERGED -#define SVNSLC_SHOWIGNORED CTGitPath::LOGACTIONS_IGNORE -#define SVNSLC_SHOWOBSTRUCTED 0x00000000 -#define SVNSLC_SHOWEXTERNAL 0x00000000 -#define SVNSLC_SHOWINCOMPLETE 0x00000000 -#define SVNSLC_SHOWINEXTERNALS 0x00000000 -#define SVNSLC_SHOWREMOVEDANDPRESENT 0x00000000 -#define SVNSLC_SHOWLOCKS 0x00000000 -#define SVNSLC_SHOWDIRECTFILES 0x00000000 -#define SVNSLC_SHOWDIRECTFOLDER 0x00000000 -#define SVNSLC_SHOWEXTERNALFROMDIFFERENTREPO 0x00000000 -#define SVNSLC_SHOWSWITCHED 0x00000000 -#define SVNSLC_SHOWINCHANGELIST 0x00000000 - -#define SVNSLC_SHOWDIRECTS (SVNSLC_SHOWDIRECTFILES | SVNSLC_SHOWDIRECTFOLDER) - - -#define SVNSLC_SHOWVERSIONED (CTGitPath::LOGACTIONS_FORWORD|SVNSLC_SHOWNORMAL|SVNSLC_SHOWMODIFIED|\ -SVNSLC_SHOWADDED|SVNSLC_SHOWREMOVED|SVNSLC_SHOWCONFLICTED|SVNSLC_SHOWMISSING|\ -SVNSLC_SHOWREPLACED|SVNSLC_SHOWMERGED|SVNSLC_SHOWIGNORED|SVNSLC_SHOWOBSTRUCTED|\ -SVNSLC_SHOWEXTERNAL|SVNSLC_SHOWINCOMPLETE|SVNSLC_SHOWINEXTERNALS|\ -SVNSLC_SHOWEXTERNALFROMDIFFERENTREPO) - -#define SVNSLC_SHOWVERSIONEDBUTNORMAL (SVNSLC_SHOWMODIFIED|SVNSLC_SHOWADDED|\ -SVNSLC_SHOWREMOVED|SVNSLC_SHOWCONFLICTED|SVNSLC_SHOWMISSING|\ -SVNSLC_SHOWREPLACED|SVNSLC_SHOWMERGED|SVNSLC_SHOWIGNORED|SVNSLC_SHOWOBSTRUCTED|\ -SVNSLC_SHOWEXTERNAL|SVNSLC_SHOWINCOMPLETE|SVNSLC_SHOWINEXTERNALS|\ -SVNSLC_SHOWEXTERNALFROMDIFFERENTREPO) - -#define SVNSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS (SVNSLC_SHOWMODIFIED|\ -SVNSLC_SHOWADDED|SVNSLC_SHOWREMOVED|SVNSLC_SHOWCONFLICTED|SVNSLC_SHOWMISSING|\ -SVNSLC_SHOWREPLACED|SVNSLC_SHOWMERGED|SVNSLC_SHOWIGNORED|SVNSLC_SHOWOBSTRUCTED|\ -SVNSLC_SHOWINCOMPLETE|SVNSLC_SHOWEXTERNAL|SVNSLC_SHOWINEXTERNALS) - -#define SVNSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALS (SVNSLC_SHOWMODIFIED|\ - SVNSLC_SHOWADDED|SVNSLC_SHOWREMOVED|SVNSLC_SHOWCONFLICTED|SVNSLC_SHOWMISSING|\ - SVNSLC_SHOWREPLACED|SVNSLC_SHOWMERGED|SVNSLC_SHOWIGNORED|SVNSLC_SHOWOBSTRUCTED|\ - SVNSLC_SHOWINCOMPLETE) - -#define SVNSLC_SHOWALL (SVNSLC_SHOWVERSIONED|SVNSLC_SHOWUNVERSIONED) - -#define SVNSLC_POPALL 0xFFFFFFFFFFFFFFFF -#define SVNSLC_POPCOMPAREWITHBASE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMPARE) -#define SVNSLC_POPCOMPARE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMPAREWC) -#define SVNSLC_POPGNUDIFF CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_GNUDIFF1) -#define SVNSLC_POPREVERT CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_REVERT) -#define SVNSLC_POPUPDATE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_UPDATE) -#define SVNSLC_POPSHOWLOG CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_LOG) -#define SVNSLC_POPOPEN CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_OPEN) -#define SVNSLC_POPDELETE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_DELETE) -#define SVNSLC_POPADD CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_ADD) -#define SVNSLC_POPIGNORE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_IGNORE) -#define SVNSLC_POPCONFLICT CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_EDITCONFLICT) -#define SVNSLC_POPRESOLVE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_RESOLVECONFLICT) -#define SVNSLC_POPLOCK CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_LOCK) -#define SVNSLC_POPUNLOCK CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_UNLOCK) -#define SVNSLC_POPUNLOCKFORCE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_UNLOCKFORCE) -#define SVNSLC_POPEXPLORE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_EXPLORE) -#define SVNSLC_POPCOMMIT CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMMIT) -#define SVNSLC_POPPROPERTIES CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_PROPERTIES) -#define SVNSLC_POPREPAIRMOVE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_REPAIRMOVE) -#define SVNSLC_POPCHANGELISTS CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_CHECKGROUP) -#define SVNSLC_POPBLAME CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_BLAME) -#define SVNSLC_POPSAVEAS CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_SAVEAS) -#define SVNSLC_POPCOMPARETWOFILES CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMPARETWO) - -#define SVNSLC_IGNORECHANGELIST _T("ignore-on-commit") +#define GITSLC_SHOWUNVERSIONED CTGitPath::LOGACTIONS_UNVER +#define GITSLC_SHOWNORMAL 0x000000000 +#define GITSLC_SHOWMODIFIED (CTGitPath::LOGACTIONS_MODIFIED) +#define GITSLC_SHOWADDED (CTGitPath::LOGACTIONS_ADDED|CTGitPath::LOGACTIONS_COPY) +#define GITSLC_SHOWREMOVED CTGitPath::LOGACTIONS_DELETED +#define GITSLC_SHOWCONFLICTED CTGitPath::LOGACTIONS_UNMERGED +#define GITSLC_SHOWMISSING 0x00000000 +#define GITSLC_SHOWREPLACED CTGitPath::LOGACTIONS_REPLACED +#define GITSLC_SHOWMERGED CTGitPath::LOGACTIONS_MERGED +#define GITSLC_SHOWIGNORED CTGitPath::LOGACTIONS_IGNORE +#define GITSLC_SHOWOBSTRUCTED 0x00000000 +#define GITSLC_SHOWEXTERNAL 0x00000000 +#define GITSLC_SHOWINCOMPLETE 0x00000000 +#define GITSLC_SHOWINEXTERNALS 0x00000000 +#define GITSLC_SHOWREMOVEDANDPRESENT 0x00000000 +#define GITSLC_SHOWLOCKS 0x00000000 +#define GITSLC_SHOWDIRECTFILES 0x00000000 +#define GITSLC_SHOWDIRECTFOLDER 0x00000000 +#define GITSLC_SHOWEXTERNALFROMDIFFERENTREPO 0x00000000 +#define GITSLC_SHOWSWITCHED 0x00000000 +#define GITSLC_SHOWINCHANGELIST 0x00000000 + +#define GITSLC_SHOWDIRECTS (GITSLC_SHOWDIRECTFILES | GITSLC_SHOWDIRECTFOLDER) + + +#define GITSLC_SHOWVERSIONED (CTGitPath::LOGACTIONS_FORWORD|GITSLC_SHOWNORMAL|GITSLC_SHOWMODIFIED|\ +GITSLC_SHOWADDED|GITSLC_SHOWREMOVED|GITSLC_SHOWCONFLICTED|GITSLC_SHOWMISSING|\ +GITSLC_SHOWREPLACED|GITSLC_SHOWMERGED|GITSLC_SHOWIGNORED|GITSLC_SHOWOBSTRUCTED|\ +GITSLC_SHOWEXTERNAL|GITSLC_SHOWINCOMPLETE|GITSLC_SHOWINEXTERNALS|\ +GITSLC_SHOWEXTERNALFROMDIFFERENTREPO) + +#define GITSLC_SHOWVERSIONEDBUTNORMAL (GITSLC_SHOWMODIFIED|GITSLC_SHOWADDED|\ +GITSLC_SHOWREMOVED|GITSLC_SHOWCONFLICTED|GITSLC_SHOWMISSING|\ +GITSLC_SHOWREPLACED|GITSLC_SHOWMERGED|GITSLC_SHOWIGNORED|GITSLC_SHOWOBSTRUCTED|\ +GITSLC_SHOWEXTERNAL|GITSLC_SHOWINCOMPLETE|GITSLC_SHOWINEXTERNALS|\ +GITSLC_SHOWEXTERNALFROMDIFFERENTREPO) + +#define GITSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS (GITSLC_SHOWMODIFIED|\ +GITSLC_SHOWADDED|GITSLC_SHOWREMOVED|GITSLC_SHOWCONFLICTED|GITSLC_SHOWMISSING|\ +GITSLC_SHOWREPLACED|GITSLC_SHOWMERGED|GITSLC_SHOWIGNORED|GITSLC_SHOWOBSTRUCTED|\ +GITSLC_SHOWINCOMPLETE|GITSLC_SHOWEXTERNAL|GITSLC_SHOWINEXTERNALS) + +#define GITSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALS (GITSLC_SHOWMODIFIED|\ + GITSLC_SHOWADDED|GITSLC_SHOWREMOVED|GITSLC_SHOWCONFLICTED|GITSLC_SHOWMISSING|\ + GITSLC_SHOWREPLACED|GITSLC_SHOWMERGED|GITSLC_SHOWIGNORED|GITSLC_SHOWOBSTRUCTED|\ + GITSLC_SHOWINCOMPLETE) + +#define GITSLC_SHOWALL (GITSLC_SHOWVERSIONED|GITSLC_SHOWUNVERSIONED) + +#define GITSLC_POPALL 0xFFFFFFFFFFFFFFFF +#define GITSLC_POPCOMPAREWITHBASE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMPARE) +#define GITSLC_POPCOMPARE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMPAREWC) +#define GITSLC_POPGNUDIFF CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_GNUDIFF1) +#define GITSLC_POPREVERT CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_REVERT) +#define GITSLC_POPUPDATE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_UPDATE) +#define GITSLC_POPSHOWLOG CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_LOG) +#define GITSLC_POPOPEN CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_OPEN) +#define GITSLC_POPDELETE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_DELETE) +#define GITSLC_POPADD CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_ADD) +#define GITSLC_POPIGNORE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_IGNORE) +#define GITSLC_POPCONFLICT CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_EDITCONFLICT) +#define GITSLC_POPRESOLVE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_RESOLVECONFLICT) +#define GITSLC_POPLOCK CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_LOCK) +#define GITSLC_POPUNLOCK CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_UNLOCK) +#define GITSLC_POPUNLOCKFORCE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_UNLOCKFORCE) +#define GITSLC_POPEXPLORE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_EXPLORE) +#define GITSLC_POPCOMMIT CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMMIT) +#define GITSLC_POPPROPERTIES CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_PROPERTIES) +#define GITSLC_POPREPAIRMOVE CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_REPAIRMOVE) +#define GITSLC_POPCHANGELISTS CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_CHECKGROUP) +#define GITSLC_POPBLAME CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_BLAME) +#define GITSLC_POPSAVEAS CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_SAVEAS) +#define GITSLC_POPCOMPARETWOFILES CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMPARETWO) + +#define GITSLC_IGNORECHANGELIST _T("ignore-on-commit") // This gives up to 64 standard properties and menu entries // plus 192 user-defined properties (should be plenty). // User-defined properties will start at column SVNSLC_NUMCOLUMNS+1 // but in the registry, we will record them starting at SVNSLC_USERPROPCOLOFFSET. -#define SVNSLC_USERPROPCOLOFFSET 0x40 -#define SVNSLC_USERPROPCOLLIMIT 0xff -#define SVNSLC_MAXCOLUMNCOUNT 0xff +#define GITSLC_USERPROPCOLOFFSET 0x40 +#define GITSLC_USERPROPCOLLIMIT 0xff +#define GITSLC_MAXCOLUMNCOUNT 0xff // Supporting extreamly long user props makes no sense here -- // especially for binary properties. CString uses a pool allocator // that works for up to 256 chars. Make sure we are well below that. -#define SVNSLC_MAXUSERPROPLENGTH 0x70 +#define GITSLC_MAXUSERPROPLENGTH 0x70 typedef int (__cdecl *GENERICCOMPAREFN)(const void * elem1, const void * elem2); typedef CComCritSecLock Locker; @@ -527,50 +527,50 @@ class CGitStatusListCtrl : public: enum { - IDSVNLC_REVERT = 1, - IDSVNLC_COMPARE, - IDSVNLC_OPEN, - IDSVNLC_DELETE, - IDSVNLC_IGNORE, - IDSVNLC_GNUDIFF1 , - IDSVNLC_UPDATE , - IDSVNLC_LOG , - IDSVNLC_EDITCONFLICT , - IDSVNLC_IGNOREMASK , - IDSVNLC_ADD , - IDSVNLC_RESOLVECONFLICT , - IDSVNLC_LOCK , - IDSVNLC_LOCKFORCE , - IDSVNLC_UNLOCK , - IDSVNLC_UNLOCKFORCE , - IDSVNLC_OPENWITH , - IDSVNLC_EXPLORE , - IDSVNLC_RESOLVETHEIRS , - IDSVNLC_RESOLVEMINE , - IDSVNLC_REMOVE , - IDSVNLC_COMMIT , - IDSVNLC_PROPERTIES , - IDSVNLC_COPY , - IDSVNLC_COPYEXT , - IDSVNLC_REPAIRMOVE , - IDSVNLC_REMOVEFROMCS , - IDSVNLC_CREATECS , - IDSVNLC_CREATEIGNORECS , - IDSVNLC_CHECKGROUP , - IDSVNLC_UNCHECKGROUP , - IDSVNLC_ADD_RECURSIVE , - IDSVNLC_COMPAREWC , - IDSVNLC_BLAME , - IDSVNLC_SAVEAS , - IDSVNLC_REVERTTOREV , - IDSVNLC_VIEWREV , - IDSVNLC_FINDENTRY , - IDSVNLC_COMPARETWO , - IDSVNLC_GNUDIFF2 , - IDSVNLC_COMPARETWOFILES , + IDGITLC_REVERT = 1, + IDGITLC_COMPARE, + IDGITLC_OPEN, + IDGITLC_DELETE, + IDGITLC_IGNORE, + IDGITLC_GNUDIFF1 , + IDGITLC_UPDATE , + IDGITLC_LOG , + IDGITLC_EDITCONFLICT , + IDGITLC_IGNOREMASK , + IDGITLC_ADD , + IDGITLC_RESOLVECONFLICT , + IDGITLC_LOCK , + IDGITLC_LOCKFORCE , + IDGITLC_UNLOCK , + IDGITLC_UNLOCKFORCE , + IDGITLC_OPENWITH , + IDGITLC_EXPLORE , + IDGITLC_RESOLVETHEIRS , + IDGITLC_RESOLVEMINE , + IDGITLC_REMOVE , + IDGITLC_COMMIT , + IDGITLC_PROPERTIES , + IDGITLC_COPY , + IDGITLC_COPYEXT , + IDGITLC_REPAIRMOVE , + IDGITLC_REMOVEFROMCS , + IDGITLC_CREATECS , + IDGITLC_CREATEIGNORECS , + IDGITLC_CHECKGROUP , + IDGITLC_UNCHECKGROUP , + IDGITLC_ADD_RECURSIVE , + IDGITLC_COMPAREWC , + IDGITLC_BLAME , + IDGITLC_SAVEAS , + IDGITLC_REVERTTOREV , + IDGITLC_VIEWREV , + IDGITLC_FINDENTRY , + IDGITLC_COMPARETWO , + IDGITLC_GNUDIFF2 , + IDGITLC_COMPARETWOFILES , // the IDSVNLC_MOVETOCS *must* be the last index, because it contains a dynamic submenu where // the submenu items get command ID's sequent to this number - IDSVNLC_MOVETOCS , + IDGITLC_MOVETOCS , }; int GetColumnIndex(int colmask); static inline unsigned __int64 GetContextMenuBit(int i){ return ((unsigned __int64 )0x1)<= 0; } -void CStatusCacheEntry::BuildCacheResponse(TSVNCacheResponse& response, DWORD& responseLength) const +void CStatusCacheEntry::BuildCacheResponse(TGITCacheResponse& response, DWORD& responseLength) const { SecureZeroMemory(&response, sizeof(response)); if(m_bSVNEntryFieldSet) diff --git a/src/TGitCache/StatusCacheEntry.h b/src/TGitCache/StatusCacheEntry.h index c0b98db8e..69919e38a 100644 --- a/src/TGitCache/StatusCacheEntry.h +++ b/src/TGitCache/StatusCacheEntry.h @@ -19,7 +19,7 @@ // #pragma once -struct TSVNCacheResponse; +struct TGITCacheResponse; #define CACHETIMEOUT 0x7FFFFFFF extern DWORD cachetimeout; @@ -36,7 +36,7 @@ public: CStatusCacheEntry(const git_wc_status_kind status); CStatusCacheEntry(const git_wc_status2_t* pGitStatus, __int64 lastWriteTime, bool bReadOnly, DWORD validuntil = 0); bool HasExpired(long now) const; - void BuildCacheResponse(TSVNCacheResponse& response, DWORD& responseLength) const; + void BuildCacheResponse(TGITCacheResponse& response, DWORD& responseLength) const; bool IsVersioned() const; bool DoesFileTimeMatch(__int64 testTime) const; bool ForceStatus(git_wc_status_kind forcedStatus); diff --git a/src/TGitCache/TSVNCache.cpp b/src/TGitCache/TGITCache.cpp similarity index 94% rename from src/TGitCache/TSVNCache.cpp rename to src/TGitCache/TGITCache.cpp index a0b0f75f0..bd1ac7203 100644 --- a/src/TGitCache/TSVNCache.cpp +++ b/src/TGitCache/TGITCache.cpp @@ -20,7 +20,7 @@ #include "stdafx.h" #include "shellapi.h" -#include "TSVNCache.h" +#include "TGITCache.h" #include "GitStatusCache.h" #include "CacheInterface.h" #include "Resource.h" @@ -155,7 +155,7 @@ int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /* HANDLE hPipeThread; HANDLE hCommandWaitThread; MSG msg; - TCHAR szWindowClass[] = {TSVN_CACHE_WINDOW_NAME}; + TCHAR szWindowClass[] = {TGIT_CACHE_WINDOW_NAME}; // create a hidden window to receive window messages. WNDCLASSEX wcex; @@ -172,7 +172,7 @@ int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /* wcex.lpszClassName = szWindowClass; wcex.hIconSm = 0; RegisterClassEx(&wcex); - hWnd = CreateWindow(TSVN_CACHE_WINDOW_NAME, TSVN_CACHE_WINDOW_NAME, WS_CAPTION, 0, 0, 800, 300, NULL, 0, hInstance, 0); + hWnd = CreateWindow(TGIT_CACHE_WINDOW_NAME, TGIT_CACHE_WINDOW_NAME, WS_CAPTION, 0, 0, 800, 300, NULL, 0, hInstance, 0); hTrayWnd = hWnd; if (hWnd == NULL) { @@ -478,13 +478,13 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ////////////////////////////////////////////////////////////////////////// -VOID GetAnswerToRequest(const TSVNCacheRequest* pRequest, TSVNCacheResponse* pReply, DWORD* pResponseLength) +VOID GetAnswerToRequest(const TGITCacheRequest* pRequest, TGITCacheResponse* pReply, DWORD* pResponseLength) { CTGitPath path; *pResponseLength = 0; - if(pRequest->flags & TSVNCACHE_FLAGS_FOLDERISKNOWN) + if(pRequest->flags & TGITCACHE_FLAGS_FOLDERISKNOWN) { - path.SetFromWin(pRequest->path, !!(pRequest->flags & TSVNCACHE_FLAGS_ISFOLDER)); + path.SetFromWin(pRequest->path, !!(pRequest->flags & TGITCACHE_FLAGS_ISFOLDER)); } else { @@ -666,7 +666,7 @@ DWORD WINAPI CommandWaitThread(LPVOID lpvParam) DWORD WINAPI InstanceThread(LPVOID lpvParam) { ATLTRACE("InstanceThread started\n"); - TSVNCacheResponse response; + TGITCacheResponse response; DWORD cbBytesRead, cbWritten; BOOL fSuccess; HANDLE hPipe; @@ -678,7 +678,7 @@ DWORD WINAPI InstanceThread(LPVOID lpvParam) while (bRun) { // Read client requests from the pipe. - TSVNCacheRequest request; + TGITCacheRequest request; fSuccess = ReadFile( hPipe, // handle to pipe &request, // buffer to receive data @@ -748,7 +748,7 @@ DWORD WINAPI CommandThread(LPVOID lpvParam) while (bRun) { // Read client requests from the pipe. - TSVNCacheCommand command; + TGITCacheCommand command; fSuccess = ReadFile( hPipe, // handle to pipe &command, // buffer to receive data @@ -766,13 +766,13 @@ DWORD WINAPI CommandThread(LPVOID lpvParam) switch (command.command) { - case TSVNCACHECOMMAND_END: + case TGITCACHECOMMAND_END: FlushFileBuffers(hPipe); DisconnectNamedPipe(hPipe); CloseHandle(hPipe); ATLTRACE("Command thread exited\n"); return 0; - case TSVNCACHECOMMAND_CRAWL: + case TGITCACHECOMMAND_CRAWL: { CTGitPath changedpath; changedpath.SetFromWin(CString(command.path), true); @@ -783,12 +783,12 @@ DWORD WINAPI CommandThread(LPVOID lpvParam) CGitStatusCache::Instance().AddFolderForCrawling(changedpath.GetDirectory()); } break; - case TSVNCACHECOMMAND_REFRESHALL: + case TGITCACHECOMMAND_REFRESHALL: CGitStatusCache::Instance().WaitToWrite(); CGitStatusCache::Instance().Refresh(); CGitStatusCache::Instance().Done(); break; - case TSVNCACHECOMMAND_RELEASE: + case TGITCACHECOMMAND_RELEASE: { CTGitPath changedpath; changedpath.SetFromWin(CString(command.path), true); diff --git a/src/TGitCache/TSVNCache.h b/src/TGitCache/TGITCache.h similarity index 100% rename from src/TGitCache/TSVNCache.h rename to src/TGitCache/TGITCache.h diff --git a/src/TGitCache/TSVNCache.rc b/src/TGitCache/TGITCache.rc similarity index 100% rename from src/TGitCache/TSVNCache.rc rename to src/TGitCache/TGITCache.rc diff --git a/src/TGitCache/TSVNCache.rc2 b/src/TGitCache/TGITCache.rc2 similarity index 100% rename from src/TGitCache/TSVNCache.rc2 rename to src/TGitCache/TGITCache.rc2 diff --git a/src/TGitCache/TSVNCache.vcproj b/src/TGitCache/TGITCache.vcproj similarity index 94% rename from src/TGitCache/TSVNCache.vcproj rename to src/TGitCache/TGITCache.vcproj index 6fd9bf39a..4ed35967b 100644 --- a/src/TGitCache/TSVNCache.vcproj +++ b/src/TGitCache/TGITCache.vcproj @@ -400,6 +400,10 @@ > + + @@ -460,7 +464,7 @@ - - diff --git a/src/TGitCache/stdafx.cpp b/src/TGitCache/stdafx.cpp index e9421f9b1..edb80377f 100644 --- a/src/TGitCache/stdafx.cpp +++ b/src/TGitCache/stdafx.cpp @@ -1,5 +1,5 @@ // stdafx.cpp : source file that includes just the standard includes -// TSVNCache.pch will be the pre-compiled header +// TGitCache.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" diff --git a/src/TortoiseGit.sln b/src/TortoiseGit.sln index 012fb98ea..aff7383da 100644 --- a/src/TortoiseGit.sln +++ b/src/TortoiseGit.sln @@ -67,7 +67,7 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "WixSetup", "TortoiseGitSetu {4BE529FB-C2F2-49F7-A897-054B955564CF} = {4BE529FB-C2F2-49F7-A897-054B955564CF} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TGitCache", "TGitCache\TSVNCache.vcproj", "{A00D2EDC-B4F5-4B41-94BA-13961DE5D296}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TGitCache", "TGitCache\TGitCache.vcproj", "{A00D2EDC-B4F5-4B41-94BA-13961DE5D296}" ProjectSection(ProjectDependencies) = postProject {13BC1836-2726-45C4-9249-5BA2BBBF8328} = {13BC1836-2726-45C4-9249-5BA2BBBF8328} {2B4F366C-93BA-491E-87AF-5EF7B37F75F7} = {2B4F366C-93BA-491E-87AF-5EF7B37F75F7} diff --git a/src/TortoiseGitSetup/CustomActions/CustomActions.cpp b/src/TortoiseGitSetup/CustomActions/CustomActions.cpp index 29253a90a..d4360face 100644 --- a/src/TortoiseGitSetup/CustomActions/CustomActions.cpp +++ b/src/TortoiseGitSetup/CustomActions/CustomActions.cpp @@ -28,7 +28,7 @@ #pragma comment(lib, "shlwapi") #pragma comment(lib, "shell32") -#define TSVN_CACHE_WINDOW_NAME _T("TGitCacheWindow") +#define TGIT_CACHE_WINDOW_NAME _T("TGitCacheWindow") BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, @@ -40,7 +40,7 @@ BOOL APIENTRY DllMain( HANDLE hModule, UINT __stdcall TerminateCache(MSIHANDLE hModule) { - HWND hWnd = FindWindow(TSVN_CACHE_WINDOW_NAME, TSVN_CACHE_WINDOW_NAME); + HWND hWnd = FindWindow(TGIT_CACHE_WINDOW_NAME, TGIT_CACHE_WINDOW_NAME); if (hWnd) { PostMessage(hWnd, WM_CLOSE, NULL, NULL); diff --git a/src/TortoiseGitSetup/FeaturesFragment.wxi b/src/TortoiseGitSetup/FeaturesFragment.wxi index 216387090..2eed16eeb 100644 --- a/src/TortoiseGitSetup/FeaturesFragment.wxi +++ b/src/TortoiseGitSetup/FeaturesFragment.wxi @@ -12,7 +12,7 @@ - + diff --git a/src/TortoiseGitSetup/Includes.wxi b/src/TortoiseGitSetup/Includes.wxi index 70dafa5ae..56ac72839 100644 --- a/src/TortoiseGitSetup/Includes.wxi +++ b/src/TortoiseGitSetup/Includes.wxi @@ -1,5 +1,5 @@ - + @@ -11,7 +11,7 @@ - + @@ -66,7 +66,7 @@ - + @@ -84,7 +84,7 @@ - + @@ -134,7 +134,7 @@ - + @@ -149,7 +149,7 @@ - + diff --git a/src/TortoiseGitSetup/StructureFragment.wxi b/src/TortoiseGitSetup/StructureFragment.wxi index 76c95938d..b79667e97 100644 --- a/src/TortoiseGitSetup/StructureFragment.wxi +++ b/src/TortoiseGitSetup/StructureFragment.wxi @@ -63,7 +63,7 @@ - + @@ -467,7 +467,7 @@ - + @@ -785,7 +785,7 @@ - + @@ -837,7 +837,7 @@ - + @@ -855,7 +855,7 @@ - + $(var.PackageComments) $(var.PackageManufacturer) - $(var.TortoiseSvnOrg) - TSVNIcon + $(var.TortoiseGitOrg) + TGITIcon 1 1 - $(var.TortoiseSvnOrg) + $(var.TortoiseGitOrg) @@ -496,7 +496,7 @@ 1 - + diff --git a/src/TortoiseGitSetup/WiXSetup.wixproj b/src/TortoiseGitSetup/WiXSetup.wixproj index 4f28c061f..26be9be4c 100644 --- a/src/TortoiseGitSetup/WiXSetup.wixproj +++ b/src/TortoiseGitSetup/WiXSetup.wixproj @@ -51,7 +51,7 @@ --> - + diff --git a/src/TortoiseGitSetup/include/TSVN_eula.rtf b/src/TortoiseGitSetup/include/TGIT_eula.rtf similarity index 100% rename from src/TortoiseGitSetup/include/TSVN_eula.rtf rename to src/TortoiseGitSetup/include/TGIT_eula.rtf diff --git a/src/TortoiseGitSetup/include/tortoisesvn_logo.jpg b/src/TortoiseGitSetup/include/tortoisegit_logo.jpg similarity index 100% rename from src/TortoiseGitSetup/include/tortoisesvn_logo.jpg rename to src/TortoiseGitSetup/include/tortoisegit_logo.jpg diff --git a/src/TortoiseIDiff/AboutDlg.cpp b/src/TortoiseIDiff/AboutDlg.cpp index 01a8e9deb..da61560f0 100644 --- a/src/TortoiseIDiff/AboutDlg.cpp +++ b/src/TortoiseIDiff/AboutDlg.cpp @@ -33,7 +33,7 @@ LRESULT CAboutDlg::DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam { SecureZeroMemory(maskbuf, sizeof(maskbuf)); } - _stprintf_s(verbuf, maskbuf, TSVN_VERMAJOR, TSVN_VERMINOR, TSVN_VERMICRO, TSVN_VERBUILD); + _stprintf_s(verbuf, maskbuf, TGIT_VERMAJOR, TGIT_VERMINOR, TGIT_VERMICRO, TGIT_VERBUILD); SetDlgItemText(hwndDlg, IDC_ABOUTVERSION, verbuf); } return TRUE; diff --git a/src/TortoiseMerge/AboutDlg.cpp b/src/TortoiseMerge/AboutDlg.cpp index 617f25183..e2c99abfb 100644 --- a/src/TortoiseMerge/AboutDlg.cpp +++ b/src/TortoiseMerge/AboutDlg.cpp @@ -96,10 +96,10 @@ BOOL CAboutDlg::OnInitDialog() //set the version string CString temp, boxtitle; - boxtitle.Format(IDS_ABOUTVERSIONBOX, TSVN_VERMAJOR, TSVN_VERMINOR, TSVN_VERMICRO, TSVN_VERBUILD, _T(TSVN_PLATFORM), _T(TSVN_VERDATE)); + boxtitle.Format(IDS_ABOUTVERSIONBOX, TGIT_VERMAJOR, TGIT_VERMINOR, TGIT_VERMICRO, TGIT_VERBUILD, _T(TGIT_PLATFORM), _T(TGIT_VERDATE)); SetDlgItemText(IDC_VERSIONBOX, boxtitle); const svn_version_t * diffver = svn_diff_version(); - temp.Format(IDS_ABOUTVERSION, TSVN_VERMAJOR, TSVN_VERMINOR, TSVN_VERMICRO, TSVN_VERBUILD, _T(TSVN_PLATFORM), _T(TSVN_VERDATE), + temp.Format(IDS_ABOUTVERSION, TGIT_VERMAJOR, TGIT_VERMINOR, TGIT_VERMICRO, TGIT_VERBUILD, _T(TGIT_PLATFORM), _T(TGIT_VERDATE), diffver->major, diffver->minor, diffver->patch, CString(diffver->tag), APR_MAJOR_VERSION, APR_MINOR_VERSION, APR_PATCH_VERSION, APU_MAJOR_VERSION, APU_MINOR_VERSION, APU_PATCH_VERSION); diff --git a/src/TortoiseMerge/TortoiseMerge.vcproj b/src/TortoiseMerge/TortoiseMerge.vcproj index db36b3704..490dd546f 100644 --- a/src/TortoiseMerge/TortoiseMerge.vcproj +++ b/src/TortoiseMerge/TortoiseMerge.vcproj @@ -1081,7 +1081,7 @@ > TSVN_VERMAJOR) + if (major > TGIT_VERMAJOR) bNewer = TRUE; - else if ((minor > TSVN_VERMINOR)&&(major == TSVN_VERMAJOR)) + else if ((minor > TGIT_VERMINOR)&&(major == TGIT_VERMAJOR)) bNewer = TRUE; - else if ((micro > TSVN_VERMICRO)&&(minor == TSVN_VERMINOR)&&(major == TSVN_VERMAJOR)) + else if ((micro > TGIT_VERMICRO)&&(minor == TGIT_VERMINOR)&&(major == TGIT_VERMAJOR)) bNewer = TRUE; - else if ((build > TSVN_VERBUILD)&&(micro == TSVN_VERMICRO)&&(minor == TSVN_VERMINOR)&&(major == TSVN_VERMAJOR)) + else if ((build > TGIT_VERBUILD)&&(micro == TGIT_VERMICRO)&&(minor == TGIT_VERMINOR)&&(major == TGIT_VERMAJOR)) bNewer = TRUE; if (version != 0) @@ -198,7 +198,7 @@ UINT CCheckForUpdatesDlg::CheckThread() ver.Format(_T("%d.%d.%d.%d"),major,minor,micro,build); temp.Format(IDS_CHECKNEWER_CURRENTVERSION, (LPCTSTR)ver); SetDlgItemText(IDC_CURRENTVERSION, temp); - temp.Format(_T("%d.%d.%d.%d"), TSVN_VERMAJOR, TSVN_VERMINOR, TSVN_VERMICRO, TSVN_VERBUILD); + temp.Format(_T("%d.%d.%d.%d"), TGIT_VERMAJOR, TGIT_VERMINOR, TGIT_VERMICRO, TGIT_VERBUILD); } if (version == 0) diff --git a/src/TortoiseProc/Commands/AddCommand.cpp b/src/TortoiseProc/Commands/AddCommand.cpp index f20f85a71..a150c3ba2 100644 --- a/src/TortoiseProc/Commands/AddCommand.cpp +++ b/src/TortoiseProc/Commands/AddCommand.cpp @@ -20,7 +20,7 @@ #include "AddCommand.h" #include "AddDlg.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "ShellUpdater.h" #include "messagebox.h" diff --git a/src/TortoiseProc/Commands/DropCopyAddCommand.cpp b/src/TortoiseProc/Commands/DropCopyAddCommand.cpp index 510e8506f..718a9b104 100644 --- a/src/TortoiseProc/Commands/DropCopyAddCommand.cpp +++ b/src/TortoiseProc/Commands/DropCopyAddCommand.cpp @@ -19,7 +19,7 @@ #include "StdAfx.h" #include "DropCopyAddCommand.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "MessageBox.h" bool DropCopyAddCommand::Execute() diff --git a/src/TortoiseProc/Commands/ResolveCommand.cpp b/src/TortoiseProc/Commands/ResolveCommand.cpp index c3f2d553e..128f402ab 100644 --- a/src/TortoiseProc/Commands/ResolveCommand.cpp +++ b/src/TortoiseProc/Commands/ResolveCommand.cpp @@ -20,7 +20,7 @@ #include "ResolveCommand.h" #include "ResolveDlg.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" bool ResolveCommand::Execute() { diff --git a/src/TortoiseProc/Commands/RevertCommand.cpp b/src/TortoiseProc/Commands/RevertCommand.cpp index d20a1dc70..c806b043c 100644 --- a/src/TortoiseProc/Commands/RevertCommand.cpp +++ b/src/TortoiseProc/Commands/RevertCommand.cpp @@ -20,7 +20,7 @@ #include "RevertCommand.h" #include "RevertDlg.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "MessageBox.h" bool RevertCommand::Execute() diff --git a/src/TortoiseProc/Commands/SendMailCommand.cpp b/src/TortoiseProc/Commands/SendMailCommand.cpp index 4eeae76fc..f7ef9f8e3 100644 --- a/src/TortoiseProc/Commands/SendMailCommand.cpp +++ b/src/TortoiseProc/Commands/SendMailCommand.cpp @@ -1,7 +1,7 @@ #include "StdAfx.h" #include "SendMailCommand.h" #include "SendMailDlg.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "AppUtils.h" bool SendMailCommand::Execute() diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index 4e050a2ae..c0c7fd17d 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -106,11 +106,11 @@ BEGIN_MESSAGE_MAP(CCommitDlg, CResizableStandAloneDialog) // ON_BN_CLICKED(IDC_HISTORY, OnBnClickedHistory) ON_BN_CLICKED(IDC_BUGTRAQBUTTON, OnBnClickedBugtraqbutton) ON_EN_CHANGE(IDC_LOGMESSAGE, OnEnChangeLogmessage) - ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_ITEMCOUNTCHANGED, OnGitStatusListCtrlItemCountChanged) - ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_NEEDSREFRESH, OnGitStatusListCtrlNeedsRefresh) - ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_ADDFILE, OnFileDropped) - ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_CHECKCHANGED, &CCommitDlg::OnGitStatusListCtrlCheckChanged) - ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_ITEMCHANGED, &CCommitDlg::OnGitStatusListCtrlItemChanged) + ON_REGISTERED_MESSAGE(CGitStatusListCtrl::GITSLNM_ITEMCOUNTCHANGED, OnGitStatusListCtrlItemCountChanged) + ON_REGISTERED_MESSAGE(CGitStatusListCtrl::GITSLNM_NEEDSREFRESH, OnGitStatusListCtrlNeedsRefresh) + ON_REGISTERED_MESSAGE(CGitStatusListCtrl::GITSLNM_ADDFILE, OnFileDropped) + ON_REGISTERED_MESSAGE(CGitStatusListCtrl::GITSLNM_CHECKCHANGED, &CCommitDlg::OnGitStatusListCtrlCheckChanged) + ON_REGISTERED_MESSAGE(CGitStatusListCtrl::GITSLNM_ITEMCHANGED, &CCommitDlg::OnGitStatusListCtrlItemChanged) ON_REGISTERED_MESSAGE(WM_AUTOLISTREADY, OnAutoListReady) ON_WM_TIMER() @@ -177,7 +177,7 @@ BOOL CCommitDlg::OnInitDialog() UpdateData(FALSE); - m_ListCtrl.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS | SVNSLC_COLADD |SVNSLC_COLDEL, _T("CommitDlg"),(SVNSLC_POPALL ^ (SVNSLC_POPCOMMIT | SVNSLC_POPSAVEAS))); + m_ListCtrl.Init(GITSLC_COLEXT | GITSLC_COLSTATUS | GITSLC_COLADD |GITSLC_COLDEL, _T("CommitDlg"),(GITSLC_POPALL ^ (GITSLC_POPCOMMIT | GITSLC_POPSAVEAS))); m_ListCtrl.SetSelectButton(&m_SelectAll); m_ListCtrl.SetStatLabel(GetDlgItem(IDC_STATISTICS)); m_ListCtrl.SetCancelBool(&m_bCancelled); @@ -981,8 +981,8 @@ UINT CCommitDlg::StatusThread() m_ListCtrl.CheckIfChangelistsArePresent(false); - DWORD dwShow = SVNSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | SVNSLC_SHOWLOCKS | SVNSLC_SHOWINCHANGELIST; - dwShow |= DWORD(m_regAddBeforeCommit) ? SVNSLC_SHOWUNVERSIONED : 0; + DWORD dwShow = GITSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | GITSLC_SHOWLOCKS | GITSLC_SHOWINCHANGELIST; + dwShow |= DWORD(m_regAddBeforeCommit) ? GITSLC_SHOWUNVERSIONED : 0; if (success) { if (m_checkedPathList.GetCount()) @@ -1017,7 +1017,7 @@ UINT CCommitDlg::StatusThread() { m_bShowUnversioned = TRUE; GetDlgItem(IDC_SHOWUNVERSIONED)->SendMessage(BM_SETCHECK, BST_CHECKED); - DWORD dwShow = (DWORD)(SVNSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | SVNSLC_SHOWUNVERSIONED | SVNSLC_SHOWLOCKS); + DWORD dwShow = (DWORD)(GITSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | GITSLC_SHOWUNVERSIONED | GITSLC_SHOWLOCKS); m_ListCtrl.UpdateFileList(CGitStatusListCtrl::FILELIST_UNVER); m_ListCtrl.Show(dwShow,dwShow&(~CTGitPath::LOGACTIONS_UNVER)); } @@ -1211,10 +1211,10 @@ void CCommitDlg::OnBnClickedShowunversioned() { DWORD dwShow = m_ListCtrl.GetShowFlags(); if (DWORD(m_regAddBeforeCommit)) - dwShow |= SVNSLC_SHOWUNVERSIONED; + dwShow |= GITSLC_SHOWUNVERSIONED; else - dwShow &= ~SVNSLC_SHOWUNVERSIONED; - if(dwShow & SVNSLC_SHOWUNVERSIONED) + dwShow &= ~GITSLC_SHOWUNVERSIONED; + if(dwShow & GITSLC_SHOWUNVERSIONED) { if(m_bWholeProject) m_ListCtrl.GetStatus(NULL,false,false,true); @@ -1990,7 +1990,7 @@ void CCommitDlg::OnBnClickedWholeProject() else m_ListCtrl.GetStatus(&this->m_pathList,true,false,true); - DWORD dwShow = (DWORD)(SVNSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | SVNSLC_SHOWUNVERSIONED | SVNSLC_SHOWLOCKS); + DWORD dwShow = (DWORD)(GITSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | GITSLC_SHOWUNVERSIONED | GITSLC_SHOWLOCKS); m_ListCtrl.Show(m_ListCtrl.GetShowFlags(), dwShow & (~CTGitPath::LOGACTIONS_UNVER|~CTGitPath::LOGACTIONS_IGNORE)); } diff --git a/src/TortoiseProc/GitLogListAction.cpp b/src/TortoiseProc/GitLogListAction.cpp index 9bf6c43cb..b73dc3b4a 100644 --- a/src/TortoiseProc/GitLogListAction.cpp +++ b/src/TortoiseProc/GitLogListAction.cpp @@ -29,7 +29,7 @@ #include "cursor.h" #include "InputDlg.h" #include "PropDlg.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "ProgressDlg.h" #include "SysProgressDlg.h" //#include "RepositoryBrowser.h" diff --git a/src/TortoiseProc/GitLogListBase.cpp b/src/TortoiseProc/GitLogListBase.cpp index 2af5f56de..be8940aec 100644 --- a/src/TortoiseProc/GitLogListBase.cpp +++ b/src/TortoiseProc/GitLogListBase.cpp @@ -30,7 +30,7 @@ #include "cursor.h" #include "InputDlg.h" #include "PropDlg.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "ProgressDlg.h" //#include "RepositoryBrowser.h" //#include "CopyDlg.h" diff --git a/src/TortoiseProc/SVNProgressDlg.cpp b/src/TortoiseProc/GitProgressDlg.cpp similarity index 96% rename from src/TortoiseProc/SVNProgressDlg.cpp rename to src/TortoiseProc/GitProgressDlg.cpp index 07bee3fbf..b9488a579 100644 --- a/src/TortoiseProc/SVNProgressDlg.cpp +++ b/src/TortoiseProc/GitProgressDlg.cpp @@ -20,7 +20,7 @@ #include "stdafx.h" #include "TortoiseProc.h" #include "messagebox.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "LogDlg.h" #include "TGitPath.h" #include "Registry.h" @@ -51,7 +51,7 @@ int CGitProgressDlg::m_nSortedColumn = -1; #define TRANSFERTIMER 100 #define VISIBLETIMER 101 -enum SVNProgressDlgContextMenuCommands +enum GITProgressDlgContextMenuCommands { // needs to start with 1, since 0 is the return value if *nothing* is clicked on in the context menu ID_COMPARE = 1, @@ -789,7 +789,7 @@ BOOL CGitProgressDlg::OnInitDialog() //SetPromptParentWindow(this->m_hWnd); if (hWndExplorer) CenterWindow(CWnd::FromHandle(hWndExplorer)); - EnableSaveRestore(_T("SVNProgressDlg")); + EnableSaveRestore(_T("GITProgressDlg")); return TRUE; } diff --git a/src/TortoiseProc/SVNProgressDlg.h b/src/TortoiseProc/GitProgressDlg.h similarity index 100% rename from src/TortoiseProc/SVNProgressDlg.h rename to src/TortoiseProc/GitProgressDlg.h diff --git a/src/TortoiseProc/GitStatusListCtrlHelpers.cpp b/src/TortoiseProc/GitStatusListCtrlHelpers.cpp index 0c4509542..8cf87b918 100644 --- a/src/TortoiseProc/GitStatusListCtrlHelpers.cpp +++ b/src/TortoiseProc/GitStatusListCtrlHelpers.cpp @@ -257,7 +257,7 @@ bool ColumnManager::IsUserProp (int column) const size_t index = static_cast(column); assert (columns.size() > index); - return columns[index].index >= SVNSLC_USERPROPCOLOFFSET; + return columns[index].index >= GITSLC_USERPROPCOLOFFSET; } int ColumnManager::SetNames(UINT* buffer, int size) @@ -376,8 +376,8 @@ void ColumnManager::ColumnResized (int column) columns[index].width = width; int propertyIndex = columns[index].index; - if (propertyIndex >= SVNSLC_USERPROPCOLOFFSET) - userProps[propertyIndex - SVNSLC_USERPROPCOLOFFSET].width = width; + if (propertyIndex >= GITSLC_USERPROPCOLOFFSET) + userProps[propertyIndex - GITSLC_USERPROPCOLOFFSET].width = width; control->Invalidate (FALSE); } @@ -526,7 +526,7 @@ void ColumnManager::RemoveUnusedProps() // map them onto new IDs (we may delete some IDs in between) std::map validIndices; - int userPropID = SVNSLC_USERPROPCOLOFFSET; + int userPropID = GITSLC_USERPROPCOLOFFSET; for (size_t i = 0, count = columns.size(); i < count; ++i) { @@ -534,9 +534,9 @@ void ColumnManager::RemoveUnusedProps() if (itemProps.find (GetName((int)i)) != itemProps.end() || columns[i].visible - || index < SVNSLC_USERPROPCOLOFFSET) + || index < GITSLC_USERPROPCOLOFFSET) { - validIndices[index] = index < SVNSLC_USERPROPCOLOFFSET + validIndices[index] = index < GITSLC_USERPROPCOLOFFSET ? index : userPropID++; } @@ -567,7 +567,7 @@ void ColumnManager::RemoveUnusedProps() for (size_t i = userProps.size(); i > 0; --i) { - int index = static_cast(i)-1 + SVNSLC_USERPROPCOLOFFSET; + int index = static_cast(i)-1 + GITSLC_USERPROPCOLOFFSET; if (validIndices.find (index) == validIndices.end()) userProps.erase (userProps.begin() + i-1); } @@ -657,7 +657,7 @@ void ColumnManager::ParseUserPropSettings(const CString& userPropList, const CSt newColumn.visible = true; newColumn.relevant = true; newColumn.index = static_cast(userProps.size()) - + SVNSLC_USERPROPCOLOFFSET - 1; + + GITSLC_USERPROPCOLOFFSET - 1; columns.push_back (newColumn); } @@ -677,11 +677,11 @@ void ColumnManager::ParseWidths (const CString& widths) columns[i].width = width; } - else if (i >= SVNSLC_USERPROPCOLOFFSET) + else if (i >= GITSLC_USERPROPCOLOFFSET) { // a user-prop column - size_t index = static_cast(i - SVNSLC_USERPROPCOLOFFSET); + size_t index = static_cast(i - GITSLC_USERPROPCOLOFFSET); assert (index < userProps.size()); userProps[index].width = width; @@ -716,12 +716,12 @@ void ColumnManager::ParseColumnOrder // place columns according to valid entries in orderString - int limit = static_cast(SVNSLC_USERPROPCOLOFFSET + userProps.size()); + int limit = static_cast(GITSLC_USERPROPCOLOFFSET + userProps.size()); for (int i = 0, count = widths.GetLength() / 2; i < count; ++i) { int index = _tcstol (widths.Mid (i*2, 2), NULL, 16); if ((index < itemName.size()) - || ((index >= SVNSLC_USERPROPCOLOFFSET) && (index < limit))) + || ((index >= GITSLC_USERPROPCOLOFFSET) && (index < limit))) { alreadyPlaced.insert (index); columnOrder.push_back (index); @@ -734,7 +734,7 @@ void ColumnManager::ParseColumnOrder if (alreadyPlaced.find (i) == alreadyPlaced.end()) columnOrder.push_back (i); - for (int i = SVNSLC_USERPROPCOLOFFSET; i < limit; ++i) + for (int i = GITSLC_USERPROPCOLOFFSET; i < limit; ++i) if (alreadyPlaced.find (i) == alreadyPlaced.end()) columnOrder.push_back (i); } @@ -747,7 +747,7 @@ std::vector ColumnManager::GetGridColumnOrder() // extract order of used columns from order of all columns std::vector result; - result.reserve (SVNSLC_MAXCOLUMNCOUNT+1); + result.reserve (GITSLC_MAXCOLUMNCOUNT+1); size_t colCount = columns.size(); bool visible = false; @@ -778,7 +778,7 @@ void ColumnManager::ApplyColumnOrder() { // extract order of used columns from order of all columns - int order[SVNSLC_MAXCOLUMNCOUNT+1]; + int order[GITSLC_MAXCOLUMNCOUNT+1]; SecureZeroMemory (order, sizeof (order)); std::vector gridColumnOrder = GetGridColumnOrder(); @@ -822,8 +822,8 @@ CString ColumnManager::GetShownUserProps() const for (size_t i = 0, count = columns.size(); i < count; ++i) { size_t index = static_cast(columns[i].index); - if (columns[i].visible && (index >= SVNSLC_USERPROPCOLOFFSET)) - result += userProps[index - SVNSLC_USERPROPCOLOFFSET].name + if (columns[i].visible && (index >= GITSLC_USERPROPCOLOFFSET)) + result += userProps[index - GITSLC_USERPROPCOLOFFSET].name + _T(' '); } @@ -845,7 +845,7 @@ CString ColumnManager::GetWidthString() const // range with no column IDs - result += CString ('0', 8 * (SVNSLC_USERPROPCOLOFFSET - itemName.size())); + result += CString ('0', 8 * (GITSLC_USERPROPCOLOFFSET - itemName.size())); // user-prop columns diff --git a/src/TortoiseProc/LogDataVector.cpp b/src/TortoiseProc/LogDataVector.cpp index 8b7c74348..fde4b3adc 100644 --- a/src/TortoiseProc/LogDataVector.cpp +++ b/src/TortoiseProc/LogDataVector.cpp @@ -35,7 +35,7 @@ #include "cursor.h" #include "InputDlg.h" #include "PropDlg.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "ProgressDlg.h" //#include "RepositoryBrowser.h" //#include "CopyDlg.h" diff --git a/src/TortoiseProc/LogDlg.cpp b/src/TortoiseProc/LogDlg.cpp index e20518c95..a02ba74de 100644 --- a/src/TortoiseProc/LogDlg.cpp +++ b/src/TortoiseProc/LogDlg.cpp @@ -22,7 +22,7 @@ #include "cursor.h" #include "InputDlg.h" #include "PropDlg.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "ProgressDlg.h" //#include "RepositoryBrowser.h" //#include "CopyDlg.h" @@ -237,7 +237,7 @@ BOOL CLogDlg::OnInitDialog() m_LogList.m_bShowWC = true; m_LogList.InsertGitColumn(); - m_ChangedFileListCtrl.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS |SVNSLC_COLADD|SVNSLC_COLDEL , _T("LogDlg"),(SVNSLC_POPALL ^ (SVNSLC_POPCOMMIT|SVNSLC_POPIGNORE)),false); + m_ChangedFileListCtrl.Init(GITSLC_COLEXT | GITSLC_COLSTATUS |GITSLC_COLADD|GITSLC_COLDEL , _T("LogDlg"),(GITSLC_POPALL ^ (GITSLC_POPCOMMIT|GITSLC_POPIGNORE)),false); GetDlgItem(IDC_LOGLIST)->UpdateData(FALSE); @@ -664,7 +664,7 @@ void CLogDlg::FillLogMessageCtrl(bool bShow /* = true*/) m_ChangedFileListCtrl.UpdateWithGitPathList(pLogEntry->GetFiles(&m_LogList)); m_ChangedFileListCtrl.m_CurrentVersion=pLogEntry->m_CommitHash; - m_ChangedFileListCtrl.Show(SVNSLC_SHOWVERSIONED); + m_ChangedFileListCtrl.Show(GITSLC_SHOWVERSIONED); m_ChangedFileListCtrl.SetBusyString(_T("Fetch Changed File...")); diff --git a/src/TortoiseProc/RebaseDlg.cpp b/src/TortoiseProc/RebaseDlg.cpp index 579e05571..2f45b0412 100644 --- a/src/TortoiseProc/RebaseDlg.cpp +++ b/src/TortoiseProc/RebaseDlg.cpp @@ -188,7 +188,7 @@ BOOL CRebaseDlg::OnInitDialog() - m_FileListCtrl.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS |SVNSLC_COLADD|SVNSLC_COLDEL , _T("RebaseDlg"),(SVNSLC_POPALL ^ SVNSLC_POPCOMMIT),false); + m_FileListCtrl.Init(GITSLC_COLEXT | GITSLC_COLSTATUS |GITSLC_COLADD|GITSLC_COLDEL , _T("RebaseDlg"),(GITSLC_POPALL ^ GITSLC_POPCOMMIT),false); m_ctrlTabCtrl.AddTab(&m_FileListCtrl,_T("Revision Files")); m_ctrlTabCtrl.AddTab(&m_LogMessageCtrl,_T("Commit Message"),1); @@ -1752,7 +1752,7 @@ void CRebaseDlg::FillLogMessageCtrl() GitRev* pLogEntry = reinterpret_cast(m_CommitList.m_arShownList.SafeGetAt(selIndex)); m_FileListCtrl.UpdateWithGitPathList(pLogEntry->GetFiles(&m_CommitList)); m_FileListCtrl.m_CurrentVersion = pLogEntry->m_CommitHash; - m_FileListCtrl.Show(SVNSLC_SHOWVERSIONED); + m_FileListCtrl.Show(GITSLC_SHOWVERSIONED); m_LogMessageCtrl.Call(SCI_SETREADONLY, FALSE); m_LogMessageCtrl.SetText(pLogEntry->GetSubject() + _T("\n") + pLogEntry->GetBody()); m_LogMessageCtrl.Call(SCI_SETREADONLY, TRUE); diff --git a/src/TortoiseProc/ResolveDlg.cpp b/src/TortoiseProc/ResolveDlg.cpp index 9c5b43135..e6c201acc 100644 --- a/src/TortoiseProc/ResolveDlg.cpp +++ b/src/TortoiseProc/ResolveDlg.cpp @@ -48,8 +48,8 @@ void CResolveDlg::DoDataExchange(CDataExchange* pDX) BEGIN_MESSAGE_MAP(CResolveDlg, CResizableStandAloneDialog) ON_BN_CLICKED(IDC_SELECTALL, OnBnClickedSelectall) ON_BN_CLICKED(IDHELP, OnBnClickedHelp) - ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_NEEDSREFRESH, OnSVNStatusListCtrlNeedsRefresh) - ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_ADDFILE, OnFileDropped) + ON_REGISTERED_MESSAGE(CGitStatusListCtrl::GITSLNM_NEEDSREFRESH, OnSVNStatusListCtrlNeedsRefresh) + ON_REGISTERED_MESSAGE(CGitStatusListCtrl::GITSLNM_ADDFILE, OnFileDropped) ON_WM_TIMER() END_MESSAGE_MAP() @@ -58,7 +58,7 @@ BOOL CResolveDlg::OnInitDialog() CResizableStandAloneDialog::OnInitDialog(); CAppUtils::MarkWindowAsUnpinnable(m_hWnd); - m_resolveListCtrl.Init(SVNSLC_COLEXT, _T("ResolveDlg"), SVNSLC_POPALL ^ (SVNSLC_POPIGNORE|SVNSLC_POPADD|SVNSLC_POPCOMMIT)); + m_resolveListCtrl.Init(GITSLC_COLEXT, _T("ResolveDlg"), GITSLC_POPALL ^ (GITSLC_POPIGNORE|GITSLC_POPADD|GITSLC_POPCOMMIT)); m_resolveListCtrl.SetConfirmButton((CButton*)GetDlgItem(IDOK)); m_resolveListCtrl.SetSelectButton(&m_SelectAll); m_resolveListCtrl.SetCancelBool(&m_bCancelled); @@ -143,7 +143,7 @@ UINT CResolveDlg::ResolveThread() { m_resolveListCtrl.SetEmptyString(m_resolveListCtrl.GetLastErrorMessage()); } - m_resolveListCtrl.Show(SVNSLC_SHOWCONFLICTED|SVNSLC_SHOWINEXTERNALS, SVNSLC_SHOWCONFLICTED); + m_resolveListCtrl.Show(GITSLC_SHOWCONFLICTED|GITSLC_SHOWINEXTERNALS, GITSLC_SHOWCONFLICTED); InterlockedExchange(&m_bThreadRunning, FALSE); return 0; diff --git a/src/TortoiseProc/RevertDlg.cpp b/src/TortoiseProc/RevertDlg.cpp index c8464eca1..baa3d4c95 100644 --- a/src/TortoiseProc/RevertDlg.cpp +++ b/src/TortoiseProc/RevertDlg.cpp @@ -53,8 +53,8 @@ void CRevertDlg::DoDataExchange(CDataExchange* pDX) BEGIN_MESSAGE_MAP(CRevertDlg, CResizableStandAloneDialog) ON_BN_CLICKED(IDHELP, OnBnClickedHelp) ON_BN_CLICKED(IDC_SELECTALL, OnBnClickedSelectall) - ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_NEEDSREFRESH, OnSVNStatusListCtrlNeedsRefresh) - ON_REGISTERED_MESSAGE(CGitStatusListCtrl::SVNSLNM_ADDFILE, OnFileDropped) + ON_REGISTERED_MESSAGE(CGitStatusListCtrl::GITSLNM_NEEDSREFRESH, OnSVNStatusListCtrlNeedsRefresh) + ON_REGISTERED_MESSAGE(CGitStatusListCtrl::GITSLNM_ADDFILE, OnFileDropped) ON_WM_TIMER() END_MESSAGE_MAP() @@ -121,9 +121,9 @@ UINT CRevertDlg::RevertThread() { m_RevertList.SetEmptyString(m_RevertList.GetLastErrorMessage()); } - m_RevertList.Show(SVNSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | SVNSLC_SHOWDIRECTFILES | SVNSLC_SHOWEXTERNALFROMDIFFERENTREPO, + m_RevertList.Show(GITSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | GITSLC_SHOWDIRECTFILES | GITSLC_SHOWEXTERNALFROMDIFFERENTREPO, // do not select all files, only the ones the user has selected directly - SVNSLC_SHOWDIRECTFILES|SVNSLC_SHOWADDED); + GITSLC_SHOWDIRECTFILES|GITSLC_SHOWADDED); if (m_RevertList.HasUnversionedItems()) { diff --git a/src/TortoiseProc/Settings/SetDialogs.cpp b/src/TortoiseProc/Settings/SetDialogs.cpp index a7c65df1f..6c0797625 100644 --- a/src/TortoiseProc/Settings/SetDialogs.cpp +++ b/src/TortoiseProc/Settings/SetDialogs.cpp @@ -21,7 +21,7 @@ #include "SetMainPage.h" #include "AppUtils.h" #include "DirFileEnum.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "..\version.h" #include ".\setdialogs.h" #include "Git.h" diff --git a/src/TortoiseProc/Settings/SetMainPage.cpp b/src/TortoiseProc/Settings/SetMainPage.cpp index 1f88355bb..99005909f 100644 --- a/src/TortoiseProc/Settings/SetMainPage.cpp +++ b/src/TortoiseProc/Settings/SetMainPage.cpp @@ -23,7 +23,7 @@ #include "AppUtils.h" #include "PathUtils.h" #include "DirFileEnum.h" -#include "SVNProgressDlg.h" +#include "GITProgressDlg.h" #include "..\version.h" #include ".\setmainpage.h" #include "Git.h" diff --git a/src/TortoiseProc/Settings/SetOverlayPage.cpp b/src/TortoiseProc/Settings/SetOverlayPage.cpp index 34c360050..59a0fb0e5 100644 --- a/src/TortoiseProc/Settings/SetOverlayPage.cpp +++ b/src/TortoiseProc/Settings/SetOverlayPage.cpp @@ -242,7 +242,7 @@ BOOL CSetOverlayPage::OnApply() if (m_dwCacheType != 1) { // close the possible running cache process - HWND hWnd = ::FindWindow(TSVN_CACHE_WINDOW_NAME, TSVN_CACHE_WINDOW_NAME); + HWND hWnd = ::FindWindow(TGIT_CACHE_WINDOW_NAME, TGIT_CACHE_WINDOW_NAME); if (hWnd) { ::PostMessage(hWnd, WM_CLOSE, NULL, NULL); diff --git a/src/TortoiseProc/Settings/Settings.cpp b/src/TortoiseProc/Settings/Settings.cpp index e5951354f..fc2bec721 100644 --- a/src/TortoiseProc/Settings/Settings.cpp +++ b/src/TortoiseProc/Settings/Settings.cpp @@ -222,9 +222,9 @@ void CSettings::HandleRestart() NULL)) // don't set maximum time { DWORD cbWritten; - TSVNCacheCommand cmd; - SecureZeroMemory(&cmd, sizeof(TSVNCacheCommand)); - cmd.command = TSVNCACHECOMMAND_REFRESHALL; + TGITCacheCommand cmd; + SecureZeroMemory(&cmd, sizeof(TGITCacheCommand)); + cmd.command = TGITCACHECOMMAND_REFRESHALL; BOOL fSuccess = WriteFile( hPipe, // handle to pipe &cmd, // buffer to write from @@ -242,9 +242,9 @@ void CSettings::HandleRestart() { // now tell the cache we don't need it's command thread anymore DWORD cbWritten; - TSVNCacheCommand cmd; - SecureZeroMemory(&cmd, sizeof(TSVNCacheCommand)); - cmd.command = TSVNCACHECOMMAND_END; + TGITCacheCommand cmd; + SecureZeroMemory(&cmd, sizeof(TGITCacheCommand)); + cmd.command = TGITCACHECOMMAND_END; WriteFile( hPipe, // handle to pipe &cmd, // buffer to write from diff --git a/src/TortoiseProc/SyncDlg.cpp b/src/TortoiseProc/SyncDlg.cpp index 89355fdc6..8d2333ec7 100644 --- a/src/TortoiseProc/SyncDlg.cpp +++ b/src/TortoiseProc/SyncDlg.cpp @@ -642,9 +642,9 @@ BOOL CSyncDlg::OnInitDialog() } m_ctrlTabCtrl.InsertTab(&m_InChangeFileList,_T("In ChangeList"),-1); - m_InChangeFileList.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS |SVNSLC_COLADD|SVNSLC_COLDEL , _T("OutSyncDlg"), - (CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMPARETWO)| - CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_GNUDIFF2)),false); + m_InChangeFileList.Init(GITSLC_COLEXT | GITSLC_COLSTATUS |GITSLC_COLADD|GITSLC_COLDEL , _T("OutSyncDlg"), + (CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMPARETWO)| + CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_GNUDIFF2)),false); //---------- Create Conflict List Ctrl ----------------- @@ -657,10 +657,10 @@ BOOL CSyncDlg::OnInitDialog() } m_ctrlTabCtrl.InsertTab(&m_ConflictFileList,_T("Conflict"),-1); - m_ConflictFileList.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS |SVNSLC_COLADD|SVNSLC_COLDEL , _T("OutSyncDlg"), - (CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMPARETWO)| - CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_GNUDIFF2)| - SVNSLC_POPCONFLICT|SVNSLC_POPRESOLVE),false); + m_ConflictFileList.Init(GITSLC_COLEXT | GITSLC_COLSTATUS |GITSLC_COLADD|GITSLC_COLDEL , _T("OutSyncDlg"), + (CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMPARETWO)| + CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_GNUDIFF2)| + GITSLC_POPCONFLICT|GITSLC_POPRESOLVE),false); //---------- Create Commit Out List Ctrl--------------- @@ -690,9 +690,9 @@ BOOL CSyncDlg::OnInitDialog() } m_ctrlTabCtrl.InsertTab(&m_OutChangeFileList,_T("Out ChangeList"),-1); - m_OutChangeFileList.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS |SVNSLC_COLADD|SVNSLC_COLDEL , _T("OutSyncDlg"), - (CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_COMPARETWO)| - CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDSVNLC_GNUDIFF2)),false); + m_OutChangeFileList.Init(GITSLC_COLEXT | GITSLC_COLSTATUS |GITSLC_COLADD|GITSLC_COLDEL , _T("OutSyncDlg"), + (CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_COMPARETWO)| + CGitStatusListCtrl::GetContextMenuBit(CGitStatusListCtrl::IDGITLC_GNUDIFF2)),false); this->m_tooltips.Create(this); diff --git a/src/TortoiseProc/TortoiseProc.cpp b/src/TortoiseProc/TortoiseProc.cpp index df95fecdd..6061b059c 100644 --- a/src/TortoiseProc/TortoiseProc.cpp +++ b/src/TortoiseProc/TortoiseProc.cpp @@ -56,7 +56,7 @@ #pragma comment(linker, "\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") -#define APPID (_T("TGIT.TGIT.1") _T(TSVN_PLATFORM)) +#define APPID (_T("TGIT.TGIT.1") _T(TGIT_PLATFORM)) BEGIN_MESSAGE_MAP(CTortoiseProcApp, CWinAppEx) ON_COMMAND(ID_HELP, CWinAppEx::OnHelp) diff --git a/src/TortoiseProc/TortoiseProc.vcproj b/src/TortoiseProc/TortoiseProc.vcproj index fc330b9e2..d6631c783 100644 --- a/src/TortoiseProc/TortoiseProc.vcproj +++ b/src/TortoiseProc/TortoiseProc.vcproj @@ -1018,7 +1018,7 @@ > @@ -2293,4 +2293,4 @@ Value="\TortoiseGit\src\Resources\TortoiseProcENG.rc" /> - \ No newline at end of file + diff --git a/src/TortoiseProc/TortoiseProcLang.vcproj b/src/TortoiseProc/TortoiseProcLang.vcproj index e9dfe8bf2..e729ee4d1 100644 --- a/src/TortoiseProc/TortoiseProcLang.vcproj +++ b/src/TortoiseProc/TortoiseProcLang.vcproj @@ -615,7 +615,7 @@ > wszFolder; if (!path.empty()) { - if (! g_ShellCache.HasSVNAdminDir(path.c_str(), TRUE)) + if (! g_ShellCache.HasGITAdminDir(path.c_str(), TRUE)) return E_FAIL; } columnfilepath = _T(""); @@ -222,7 +222,7 @@ void CShellExt::GetColumnStatus(const TCHAR * path, BOOL bIsDir) LoadLangDll(); columnfilepath = path; const FileStatusCacheEntry * status = NULL; - TSVNCacheResponse itemStatus; + TGITCacheResponse itemStatus; ShellCache::CacheType t = ShellCache::exe; AutoLocker lock(g_csGlobalCOMGuard); t = g_ShellCache.GetCacheType(); @@ -258,7 +258,7 @@ void CShellExt::GetColumnStatus(const TCHAR * path, BOOL bIsDir) default: case ShellCache::none: { - if (g_ShellCache.HasSVNAdminDir(path, bIsDir)) + if (g_ShellCache.HasGITAdminDir(path, bIsDir)) filestatus = git_wc_status_normal; else filestatus = git_wc_status_none; diff --git a/src/TortoiseShell/ContextMenu.cpp b/src/TortoiseShell/ContextMenu.cpp index 6b261c5e3..6ab7e63c7 100644 --- a/src/TortoiseShell/ContextMenu.cpp +++ b/src/TortoiseShell/ContextMenu.cpp @@ -130,7 +130,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder, { itemStates |= ITEMIS_FOLDER; if ((status != git_wc_status_unversioned)&&(status != git_wc_status_ignored)&&(status != git_wc_status_none)) - itemStates |= ITEMIS_FOLDERINSVN; + itemStates |= ITEMIS_FOLDERINGIT; } //if ((stat.status->entry)&&(stat.status->entry->present_props)) //{ @@ -159,7 +159,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder, itemStates |= askedpath.GetAdminDirMask(); if ((status == git_wc_status_unversioned) || (status == git_wc_status_ignored) || (status == git_wc_status_none)) - itemStates &= ~ITEMIS_INSVN; + itemStates &= ~ITEMIS_INGIT; if (status == git_wc_status_ignored) itemStates |= ITEMIS_IGNORED; @@ -229,7 +229,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder, { itemStates |= ITEMIS_FOLDER; if ((status != git_wc_status_unversioned)&&(status != git_wc_status_ignored)&&(status != git_wc_status_none)) - itemStates |= ITEMIS_FOLDERINSVN; + itemStates |= ITEMIS_FOLDERINGIT; } // TODO: do we need to check that it's not a dir? does conflict options makes sense for dir in git? if (status == git_wc_status_conflicted)//if ((stat.status->entry)&&(stat.status->entry->conflict_wrk)) @@ -264,7 +264,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder, itemStates |= strpath.GetAdminDirMask(); if ((status == git_wc_status_unversioned)||(status == git_wc_status_ignored)||(status == git_wc_status_none)) - itemStates &= ~ITEMIS_INSVN; + itemStates &= ~ITEMIS_INGIT; if (status == git_wc_status_ignored) { itemStates |= ITEMIS_IGNORED; @@ -297,7 +297,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder, } } // for (int i = 0; i < count; ++i) ItemIDList child (GetPIDLItem (cida, 0), &parent); - if (g_ShellCache.HasSVNAdminDir(child.toString().c_str(), FALSE)) + if (g_ShellCache.HasGITAdminDir(child.toString().c_str(), FALSE)) itemStates |= ITEMIS_INVERSIONEDFOLDER; GlobalUnlock(medium.hGlobal); @@ -372,7 +372,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder, itemStatesFolder |= askedpath.GetAdminDirMask(); if ((status == git_wc_status_unversioned)||(status == git_wc_status_ignored)||(status == git_wc_status_none)) - itemStates &= ~ITEMIS_INSVN; + itemStates &= ~ITEMIS_INGIT; if (status == git_wc_status_normal) itemStatesFolder |= ITEMIS_NORMAL; @@ -458,7 +458,7 @@ STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST pIDFolder, itemStates |= askedpath.GetAdminDirMask(); if ((status == git_wc_status_unversioned)||(status == git_wc_status_ignored)||(status == git_wc_status_none)) - itemStates &= ~ITEMIS_INSVN; + itemStates &= ~ITEMIS_INGIT; if (status == git_wc_status_ignored) itemStates |= ITEMIS_IGNORED; @@ -784,37 +784,37 @@ STDMETHODIMP CShellExt::QueryDropContext(UINT uFlags, UINT idCmdFirst, HMENU hMe // Git move here // available if source is versioned but not added, target is versioned, source and target from same repository or target folder is added - if ((bSourceAndTargetFromSameRepository||(itemStatesFolder & ITEMIS_ADDED))&&(itemStatesFolder & ITEMIS_FOLDERINSVN)&&((itemStates & ITEMIS_INSVN)&&((~itemStates) & ITEMIS_ADDED))) + if ((bSourceAndTargetFromSameRepository||(itemStatesFolder & ITEMIS_ADDED))&&(itemStatesFolder & ITEMIS_FOLDERINGIT)&&((itemStates & ITEMIS_INGIT)&&((~itemStates) & ITEMIS_ADDED))) InsertGitMenu(FALSE, hMenu, indexMenu++, idCmd++, IDS_DROPMOVEMENU, 0, idCmdFirst, ShellMenuDropMove, uFlags); // Git move and rename here // available if source is a single, versioned but not added item, target is versioned, source and target from same repository or target folder is added - if ((bSourceAndTargetFromSameRepository||(itemStatesFolder & ITEMIS_ADDED))&&(itemStatesFolder & ITEMIS_FOLDERINSVN)&&(itemStates & ITEMIS_INSVN)&&(itemStates & ITEMIS_ONLYONE)&&((~itemStates) & ITEMIS_ADDED)) + if ((bSourceAndTargetFromSameRepository||(itemStatesFolder & ITEMIS_ADDED))&&(itemStatesFolder & ITEMIS_FOLDERINGIT)&&(itemStates & ITEMIS_INGIT)&&(itemStates & ITEMIS_ONLYONE)&&((~itemStates) & ITEMIS_ADDED)) InsertGitMenu(FALSE, hMenu, indexMenu++, idCmd++, IDS_DROPMOVERENAMEMENU, 0, idCmdFirst, ShellMenuDropMoveRename, uFlags); // Git copy here // available if source is versioned but not added, target is versioned, source and target from same repository or target folder is added - if ((bSourceAndTargetFromSameRepository||(itemStatesFolder & ITEMIS_ADDED))&&(itemStatesFolder & ITEMIS_FOLDERINSVN)&&(itemStates & ITEMIS_INSVN)&&((~itemStates) & ITEMIS_ADDED)) + if ((bSourceAndTargetFromSameRepository||(itemStatesFolder & ITEMIS_ADDED))&&(itemStatesFolder & ITEMIS_FOLDERINGIT)&&(itemStates & ITEMIS_INGIT)&&((~itemStates) & ITEMIS_ADDED)) InsertGitMenu(FALSE, hMenu, indexMenu++, idCmd++, IDS_DROPCOPYMENU, 0, idCmdFirst, ShellMenuDropCopy, uFlags); // Git copy and rename here, source and target from same repository // available if source is a single, versioned but not added item, target is versioned or target folder is added - if ((bSourceAndTargetFromSameRepository||(itemStatesFolder & ITEMIS_ADDED))&&(itemStatesFolder & ITEMIS_FOLDERINSVN)&&(itemStates & ITEMIS_INSVN)&&(itemStates & ITEMIS_ONLYONE)&&((~itemStates) & ITEMIS_ADDED)) + if ((bSourceAndTargetFromSameRepository||(itemStatesFolder & ITEMIS_ADDED))&&(itemStatesFolder & ITEMIS_FOLDERINGIT)&&(itemStates & ITEMIS_INGIT)&&(itemStates & ITEMIS_ONLYONE)&&((~itemStates) & ITEMIS_ADDED)) InsertGitMenu(FALSE, hMenu, indexMenu++, idCmd++, IDS_DROPCOPYRENAMEMENU, 0, idCmdFirst, ShellMenuDropCopyRename, uFlags); // Git add here // available if target is versioned and source is either unversioned or from another repository - if ((itemStatesFolder & ITEMIS_FOLDERINSVN)&&(((~itemStates) & ITEMIS_INSVN)||!bSourceAndTargetFromSameRepository)) + if ((itemStatesFolder & ITEMIS_FOLDERINGIT)&&(((~itemStates) & ITEMIS_INGIT)||!bSourceAndTargetFromSameRepository)) InsertGitMenu(FALSE, hMenu, indexMenu++, idCmd++, IDS_DROPCOPYADDMENU, 0, idCmdFirst, ShellMenuDropCopyAdd, uFlags); // Git export here // available if source is versioned and a folder - //if ((itemStates & ITEMIS_INSVN)&&(itemStates & ITEMIS_FOLDER)) + //if ((itemStates & ITEMIS_INGIT)&&(itemStates & ITEMIS_FOLDER)) // InsertGitMenu(FALSE, hMenu, indexMenu++, idCmd++, IDS_DROPEXPORTMENU, 0, idCmdFirst, ShellMenuDropExport, uFlags); // Git export all here // available if source is versioned and a folder - //if ((itemStates & ITEMIS_INSVN)&&(itemStates & ITEMIS_FOLDER)) + //if ((itemStates & ITEMIS_INGIT)&&(itemStates & ITEMIS_FOLDER)) // InsertGitMenu(FALSE, hMenu, indexMenu++, idCmd++, IDS_DROPEXPORTEXTENDEDMENU, 0, idCmdFirst, ShellMenuDropExportExtended, uFlags); // apply patch @@ -900,7 +900,7 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu, if (((uFlags & CMF_EXTENDEDVERBS) == 0) && g_ShellCache.HideMenusForUnversionedItems()) { - if ((itemStates & (ITEMIS_INSVN|ITEMIS_INVERSIONEDFOLDER|ITEMIS_FOLDERINSVN))==0) + if ((itemStates & (ITEMIS_INGIT|ITEMIS_INVERSIONEDFOLDER|ITEMIS_FOLDERINGIT))==0) return S_OK; } @@ -1256,498 +1256,498 @@ STDMETHODIMP CShellExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) // //* path is a path to a single file/directory for commands which only act on single items (log, checkout, ...) //* pathfile is a path to a temporary file which contains a list of file paths - stdstring svnCmd = _T(" /command:"); + stdstring gitCmd = _T(" /command:"); stdstring tempfile; switch (id_it->second) { //#region case case ShellMenuSync: - svnCmd += _T("sync /path:\""); + gitCmd += _T("sync /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuUpdate: tempfile = WriteFileListToTempFile(); - svnCmd += _T("update /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("update /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuSubSync: tempfile = WriteFileListToTempFile(); - svnCmd += _T("subsync /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("subsync /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); if(itemStatesFolder&ITEMIS_SUBMODULECONTAINER) { - svnCmd += _T(" /bkpath:\""); - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += _T(" /bkpath:\""); + gitCmd += folder_; + gitCmd += _T("\""); } break; case ShellMenuUpdateExt: tempfile = WriteFileListToTempFile(); - svnCmd += _T("subupdate /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("subupdate /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); if(itemStatesFolder&ITEMIS_SUBMODULECONTAINER) { - svnCmd += _T(" /bkpath:\""); - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += _T(" /bkpath:\""); + gitCmd += folder_; + gitCmd += _T("\""); } break; case ShellMenuCommit: tempfile = WriteFileListToTempFile(); - svnCmd += _T("commit /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("commit /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuAdd: case ShellMenuAddAsReplacement: tempfile = WriteFileListToTempFile(); - svnCmd += _T("add /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("add /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuIgnore: tempfile = WriteFileListToTempFile(); - svnCmd += _T("ignore /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("ignore /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuIgnoreCaseSensitive: tempfile = WriteFileListToTempFile(); - svnCmd += _T("ignore /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /onlymask"); + gitCmd += _T("ignore /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /onlymask"); break; case ShellMenuDeleteIgnore: tempfile = WriteFileListToTempFile(); - svnCmd += _T("ignore /delete /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("ignore /delete /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuDeleteIgnoreCaseSensitive: tempfile = WriteFileListToTempFile(); - svnCmd += _T("ignore /delete /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /onlymask"); + gitCmd += _T("ignore /delete /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /onlymask"); break; case ShellMenuUnIgnore: tempfile = WriteFileListToTempFile(); - svnCmd += _T("unignore /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("unignore /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuUnIgnoreCaseSensitive: tempfile = WriteFileListToTempFile(); - svnCmd += _T("unignore /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /onlymask"); + gitCmd += _T("unignore /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /onlymask"); break; case ShellMenuRevert: tempfile = WriteFileListToTempFile(); - svnCmd += _T("revert /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("revert /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuCleanup: tempfile = WriteFileListToTempFile(); - svnCmd += _T("cleanup /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("cleanup /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuSendMail: tempfile = WriteFileListToTempFile(); - svnCmd += _T("sendmail /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("sendmail /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuResolve: tempfile = WriteFileListToTempFile(); - svnCmd += _T("resolve /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("resolve /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuSwitch: - svnCmd += _T("switch /path:\""); + gitCmd += _T("switch /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuExport: - svnCmd += _T("export /path:\""); + gitCmd += _T("export /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuAbout: - svnCmd += _T("about"); + gitCmd += _T("about"); break; case ShellMenuCreateRepos: - svnCmd += _T("repocreate /path:\""); + gitCmd += _T("repocreate /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuMerge: - svnCmd += _T("merge /path:\""); + gitCmd += _T("merge /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuCopy: - svnCmd += _T("copy /path:\""); + gitCmd += _T("copy /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuSettings: - svnCmd += _T("settings /path:\""); + gitCmd += _T("settings /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuHelp: - svnCmd += _T("help"); + gitCmd += _T("help"); break; case ShellMenuRename: - svnCmd += _T("rename /path:\""); + gitCmd += _T("rename /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuRemove: tempfile = WriteFileListToTempFile(); - svnCmd += _T("remove /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("remove /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuRemoveKeep: tempfile = WriteFileListToTempFile(); - svnCmd += _T("remove /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /keep"); + gitCmd += _T("remove /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /keep"); break; case ShellMenuDiff: - svnCmd += _T("diff /path:\""); + gitCmd += _T("diff /path:\""); if (files_.size() == 1) - svnCmd += files_.front(); + gitCmd += files_.front(); else if (files_.size() == 2) { std::vector::iterator I = files_.begin(); - svnCmd += *I; + gitCmd += *I; I++; - svnCmd += _T("\" /path2:\""); - svnCmd += *I; + gitCmd += _T("\" /path2:\""); + gitCmd += *I; } else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); if (GetAsyncKeyState(VK_SHIFT) & 0x8000) - svnCmd += _T(" /alternative"); + gitCmd += _T(" /alternative"); break; case ShellMenuPrevDiff: - svnCmd += _T("prevdiff /path:\""); + gitCmd += _T("prevdiff /path:\""); if (files_.size() == 1) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); if (GetAsyncKeyState(VK_SHIFT) & 0x8000) - svnCmd += _T(" /alternative"); + gitCmd += _T(" /alternative"); break; case ShellMenuDiffTwo: - svnCmd += _T("diffcommits /path:\""); + gitCmd += _T("diffcommits /path:\""); if (files_.size() == 1) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuDropCopyAdd: tempfile = WriteFileListToTempFile(); - svnCmd += _T("dropcopyadd /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /droptarget:\""); - svnCmd += folder_; - svnCmd += _T("\"";) + gitCmd += _T("dropcopyadd /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /droptarget:\""); + gitCmd += folder_; + gitCmd += _T("\"";) break; case ShellMenuDropCopy: tempfile = WriteFileListToTempFile(); - svnCmd += _T("dropcopy /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /droptarget:\""); - svnCmd += folder_; - svnCmd += _T("\"";) + gitCmd += _T("dropcopy /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /droptarget:\""); + gitCmd += folder_; + gitCmd += _T("\"";) break; case ShellMenuDropCopyRename: tempfile = WriteFileListToTempFile(); - svnCmd += _T("dropcopy /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /droptarget:\""); - svnCmd += folder_; - svnCmd += _T("\" /rename";) + gitCmd += _T("dropcopy /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /droptarget:\""); + gitCmd += folder_; + gitCmd += _T("\" /rename";) break; case ShellMenuDropMove: tempfile = WriteFileListToTempFile(); - svnCmd += _T("dropmove /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /droptarget:\""); - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += _T("dropmove /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /droptarget:\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuDropMoveRename: tempfile = WriteFileListToTempFile(); - svnCmd += _T("dropmove /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /droptarget:\""); - svnCmd += folder_; - svnCmd += _T("\" /rename";) + gitCmd += _T("dropmove /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /droptarget:\""); + gitCmd += folder_; + gitCmd += _T("\" /rename";) break; case ShellMenuDropExport: tempfile = WriteFileListToTempFile(); - svnCmd += _T("dropexport /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /droptarget:\""); - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += _T("dropexport /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /droptarget:\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuDropExportExtended: tempfile = WriteFileListToTempFile(); - svnCmd += _T("dropexport /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /droptarget:\""); - svnCmd += folder_; - svnCmd += _T("\""); - svnCmd += _T(" /extended"); + gitCmd += _T("dropexport /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /droptarget:\""); + gitCmd += folder_; + gitCmd += _T("\""); + gitCmd += _T(" /extended"); break; case ShellMenuLog: - svnCmd += _T("log /path:\""); + gitCmd += _T("log /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuConflictEditor: - svnCmd += _T("conflicteditor /path:\""); + gitCmd += _T("conflicteditor /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuGitSVNRebase: - svnCmd += _T("svnrebase /path:\""); + gitCmd += _T("svnrebase /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuGitSVNDCommit: - svnCmd += _T("svndcommit /path:\""); + gitCmd += _T("svndcommit /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuGitSVNIgnore: - svnCmd += _T("svnignore /path:\""); + gitCmd += _T("svnignore /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuRebase: - svnCmd += _T("rebase /path:\""); + gitCmd += _T("rebase /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuShowChanged: if (files_.size() > 1) { tempfile = WriteFileListToTempFile(); - svnCmd += _T("repostatus /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("repostatus /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); } else { - svnCmd += _T("repostatus /path:\""); + gitCmd += _T("repostatus /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); } break; case ShellMenuRefBrowse: - svnCmd += _T("refbrowse /path:\""); + gitCmd += _T("refbrowse /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuRefLog: - svnCmd += _T("reflog /path:\""); + gitCmd += _T("reflog /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuStashSave: - svnCmd += _T("stashsave /path:\""); + gitCmd += _T("stashsave /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuStashApply: - svnCmd += _T("stashapply /path:\""); + gitCmd += _T("stashapply /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuStashPop: - svnCmd += _T("stashpop /path:\""); + gitCmd += _T("stashpop /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuStashList: - svnCmd += _T("reflog /path:\""); + gitCmd += _T("reflog /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\" /ref:refs/stash"); + gitCmd += folder_; + gitCmd += _T("\" /ref:refs/stash"); break; case ShellMenuBisectStart: - svnCmd += _T("bisect /path:\""); + gitCmd += _T("bisect /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\" /start"); + gitCmd += folder_; + gitCmd += _T("\" /start"); break; case ShellMenuBisectGood: - svnCmd += _T("bisect /path:\""); + gitCmd += _T("bisect /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\" /good"); + gitCmd += folder_; + gitCmd += _T("\" /good"); break; case ShellMenuBisectBad: - svnCmd += _T("bisect /path:\""); + gitCmd += _T("bisect /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\" /bad"); + gitCmd += folder_; + gitCmd += _T("\" /bad"); break; case ShellMenuBisectReset: - svnCmd += _T("bisect /path:\""); + gitCmd += _T("bisect /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\" /reset"); + gitCmd += folder_; + gitCmd += _T("\" /reset"); break; case ShellMenuSubAdd: - svnCmd += _T("subadd /path:\""); + gitCmd += _T("subadd /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuBlame: - svnCmd += _T("blame /path:\""); + gitCmd += _T("blame /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuApplyPatch: if ((itemStates & ITEMIS_PATCHINCLIPBOARD) && ((~itemStates) & ITEMIS_PATCHFILE)) @@ -1789,36 +1789,36 @@ STDMETHODIMP CShellExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) } if (itemStates & ITEMIS_PATCHFILE) { - svnCmd = _T(" /diff:\""); + gitCmd = _T(" /diff:\""); if (files_.size() > 0) { - svnCmd += files_.front(); - if (itemStatesFolder & ITEMIS_FOLDERINSVN) + gitCmd += files_.front(); + if (itemStatesFolder & ITEMIS_FOLDERINGIT) { - svnCmd += _T("\" /patchpath:\""); - svnCmd += folder_; + gitCmd += _T("\" /patchpath:\""); + gitCmd += folder_; } } else - svnCmd += folder_; + gitCmd += folder_; if (itemStates & ITEMIS_INVERSIONEDFOLDER) - svnCmd += _T("\" /wc"); + gitCmd += _T("\" /wc"); else - svnCmd += _T("\""); + gitCmd += _T("\""); } else { - svnCmd = _T(" /patchpath:\""); + gitCmd = _T(" /patchpath:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); } myIDMap.clear(); myVerbsIDMap.clear(); myVerbsMap.clear(); - if (CreateProcess(((stdstring)tortoiseMergePath).c_str(), const_cast(svnCmd.c_str()), NULL, NULL, FALSE, 0, 0, 0, &startup, &process)==0) + if (CreateProcess(((stdstring)tortoiseMergePath).c_str(), const_cast(gitCmd.c_str()), NULL, NULL, FALSE, 0, 0, 0, &startup, &process)==0) { LPVOID lpMsgBuf; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | @@ -1840,10 +1840,10 @@ STDMETHODIMP CShellExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) break; case ShellMenuProperties: tempfile = WriteFileListToTempFile(); - svnCmd += _T("properties /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("properties /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuClipPaste: if (WriteClipboardPathsToTempFile(tempfile)) @@ -1867,106 +1867,106 @@ STDMETHODIMP CShellExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) } if (bCopy) - svnCmd += _T("pastecopy /pathfile:\""); + gitCmd += _T("pastecopy /pathfile:\""); else - svnCmd += _T("pastemove /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - svnCmd += _T(" /droptarget:\""); - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += _T("pastemove /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + gitCmd += _T(" /droptarget:\""); + gitCmd += folder_; + gitCmd += _T("\""); } else return NOERROR; break; case ShellMenuClone: - svnCmd += _T("clone /path:\""); + gitCmd += _T("clone /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuPull: - svnCmd += _T("pull /path:\""); + gitCmd += _T("pull /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuPush: - svnCmd += _T("push /path:\""); + gitCmd += _T("push /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuBranch: - svnCmd += _T("branch /path:\""); + gitCmd += _T("branch /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuTag: - svnCmd += _T("tag /path:\""); + gitCmd += _T("tag /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuFormatPatch: - svnCmd += _T("formatpatch /path:\""); + gitCmd += _T("formatpatch /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuImportPatch: tempfile = WriteFileListToTempFile(); - svnCmd += _T("importpatch /pathfile:\""); - svnCmd += tempfile; - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); + gitCmd += _T("importpatch /pathfile:\""); + gitCmd += tempfile; + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); break; case ShellMenuCherryPick: - svnCmd += _T("cherrypick /path:\""); + gitCmd += _T("cherrypick /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; case ShellMenuFetch: - svnCmd += _T("fetch /path:\""); + gitCmd += _T("fetch /path:\""); if (files_.size() > 0) - svnCmd += files_.front(); + gitCmd += files_.front(); else - svnCmd += folder_; - svnCmd += _T("\""); + gitCmd += folder_; + gitCmd += _T("\""); break; default: break; //#endregion } // switch (id_it->second) - svnCmd += _T(" /hwnd:"); + gitCmd += _T(" /hwnd:"); TCHAR buf[30]; _stprintf_s(buf, 30, _T("%d"), lpcmi->hwnd); - svnCmd += buf; + gitCmd += buf; myIDMap.clear(); myVerbsIDMap.clear(); myVerbsMap.clear(); - if (CreateProcess(((stdstring)tortoiseProcPath).c_str(), const_cast(svnCmd.c_str()), NULL, NULL, FALSE, 0, 0, 0, &startup, &process)==0) + if (CreateProcess(((stdstring)tortoiseProcPath).c_str(), const_cast(gitCmd.c_str()), NULL, NULL, FALSE, 0, 0, 0, &startup, &process)==0) { LPVOID lpMsgBuf; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | @@ -2328,7 +2328,7 @@ bool CShellExt::InsertIgnoreSubmenus(UINT &idCmd, UINT idCmdFirst, HMENU hMenu, ignoresubmenu = CreateMenu(); if (itemStates & ITEMIS_ONLYONE) { - if (itemStates & ITEMIS_INSVN) + if (itemStates & ITEMIS_INGIT) { InsertMenu(ignoresubmenu, indexignoresub++, MF_BYPOSITION | MF_STRING , idCmd, ignorepath); myIDMap[idCmd - idCmdFirst] = ShellMenuDeleteIgnore; @@ -2371,7 +2371,7 @@ bool CShellExt::InsertIgnoreSubmenus(UINT &idCmd, UINT idCmdFirst, HMENU hMenu, } else { - if (itemStates & ITEMIS_INSVN) + if (itemStates & ITEMIS_INGIT) { MAKESTRING(IDS_MENUDELETEIGNOREMULTIPLE); _stprintf_s(ignorepath, MAX_PATH, stringtablebuffer, files_.size()); @@ -2439,7 +2439,7 @@ bool CShellExt::InsertIgnoreSubmenus(UINT &idCmd, UINT idCmdFirst, HMENU hMenu, SecureZeroMemory(stringtablebuffer, sizeof(stringtablebuffer)); if (itemStates & ITEMIS_IGNORED) GetMenuTextFromResource(ShellMenuUnIgnoreSub); - else if (itemStates & ITEMIS_INSVN) + else if (itemStates & ITEMIS_INGIT) GetMenuTextFromResource(ShellMenuDeleteIgnoreSub); else GetMenuTextFromResource(ShellMenuIgnoreSub); diff --git a/src/TortoiseShell/SVNPropertyPage.cpp b/src/TortoiseShell/GITPropertyPage.cpp similarity index 92% rename from src/TortoiseShell/SVNPropertyPage.cpp rename to src/TortoiseShell/GITPropertyPage.cpp index b5a4c7a0d..15dba7cb5 100644 --- a/src/TortoiseShell/SVNPropertyPage.cpp +++ b/src/TortoiseShell/GITPropertyPage.cpp @@ -20,7 +20,7 @@ #include "stdafx.h" #include "ShellExt.h" -#include "svnpropertypage.h" +#include "gitpropertypage.h" #include "UnicodeUtils.h" #include "PathUtils.h" #include "GitStatus.h" @@ -121,11 +121,11 @@ BOOL CGitPropertyPage::PageProc (HWND /*hwnd*/, UINT uMessage, WPARAM wParam, LP startup.cb = sizeof(startup); memset(&process, 0, sizeof(process)); CRegStdString tortoiseProcPath(_T("Software\\TortoiseGit\\ProcPath"), _T("TortoiseProc.exe"), false, HKEY_LOCAL_MACHINE); - stdstring svnCmd = _T(" /command:"); - svnCmd += _T("log /path:\""); - svnCmd += filenames.front().c_str(); - svnCmd += _T("\""); - if (CreateProcess(((stdstring)tortoiseProcPath).c_str(), const_cast(svnCmd.c_str()), NULL, NULL, FALSE, 0, 0, 0, &startup, &process)) + stdstring gitCmd = _T(" /command:"); + gitCmd += _T("log /path:\""); + gitCmd += filenames.front().c_str(); + gitCmd += _T("\""); + if (CreateProcess(((stdstring)tortoiseProcPath).c_str(), const_cast(gitCmd.c_str()), NULL, NULL, FALSE, 0, 0, 0, &startup, &process)) { CloseHandle(process.hThread); CloseHandle(process.hProcess); @@ -137,7 +137,7 @@ BOOL CGitPropertyPage::PageProc (HWND /*hwnd*/, UINT uMessage, WPARAM wParam, LP TCHAR * path = new TCHAR[pathlength+1]; TCHAR * tempFile = new TCHAR[pathlength + 100]; GetTempPath (pathlength+1, path); - GetTempFileName (path, _T("svn"), 0, tempFile); + GetTempFileName (path, _T("git"), 0, tempFile); stdstring retFilePath = stdstring(tempFile); HANDLE file = ::CreateFile (tempFile, @@ -166,12 +166,12 @@ BOOL CGitPropertyPage::PageProc (HWND /*hwnd*/, UINT uMessage, WPARAM wParam, LP startup.cb = sizeof(startup); memset(&process, 0, sizeof(process)); CRegStdString tortoiseProcPath(_T("Software\\TortoiseGit\\ProcPath"), _T("TortoiseProc.exe"), false, HKEY_LOCAL_MACHINE); - stdstring svnCmd = _T(" /command:"); - svnCmd += _T("properties /pathfile:\""); - svnCmd += retFilePath.c_str(); - svnCmd += _T("\""); - svnCmd += _T(" /deletepathfile"); - if (CreateProcess(((stdstring)tortoiseProcPath).c_str(), const_cast(svnCmd.c_str()), NULL, NULL, FALSE, 0, 0, 0, &startup, &process)) + stdstring gitCmd = _T(" /command:"); + gitCmd += _T("properties /pathfile:\""); + gitCmd += retFilePath.c_str(); + gitCmd += _T("\""); + gitCmd += _T(" /deletepathfile"); + if (CreateProcess(((stdstring)tortoiseProcPath).c_str(), const_cast(gitCmd.c_str()), NULL, NULL, FALSE, 0, 0, 0, &startup, &process)) { CloseHandle(process.hThread); CloseHandle(process.hProcess); diff --git a/src/TortoiseShell/SVNPropertyPage.h b/src/TortoiseShell/GITPropertyPage.h similarity index 100% rename from src/TortoiseShell/SVNPropertyPage.h rename to src/TortoiseShell/GITPropertyPage.h diff --git a/src/TortoiseShell/Globals.h b/src/TortoiseShell/Globals.h index 9a614f3d7..4a612e3e4 100644 --- a/src/TortoiseShell/Globals.h +++ b/src/TortoiseShell/Globals.h @@ -98,10 +98,10 @@ enum FileState #define ITEMIS_ONLYONE 0x00000001 #define ITEMIS_EXTENDED 0x00000002 -#define ITEMIS_INSVN 0x00000004 +#define ITEMIS_INGIT 0x00000004 #define ITEMIS_CONFLICTED 0x00000008 #define ITEMIS_FOLDER 0x00000010 -#define ITEMIS_FOLDERINSVN 0x00000020 +#define ITEMIS_FOLDERINGIT 0x00000020 #define ITEMIS_NORMAL 0x00000040 #define ITEMIS_IGNORED 0x00000080 #define ITEMIS_INVERSIONEDFOLDER 0x00000100 diff --git a/src/TortoiseShell/IconOverlay.cpp b/src/TortoiseShell/IconOverlay.cpp index 35a0942e7..cb02bcae5 100644 --- a/src/TortoiseShell/IconOverlay.cpp +++ b/src/TortoiseShell/IconOverlay.cpp @@ -126,7 +126,7 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/) int drivenumber = -1; if ((m_State == FileStateVersioned) && g_ShellCache.ShowExcludedAsNormal() && ((drivenumber=PathGetDriveNumber(pPath))!=0)&&(drivenumber!=1) && - PathIsDirectory(pPath) && g_ShellCache.HasSVNAdminDir(pPath, true)) + PathIsDirectory(pPath) && g_ShellCache.HasGITAdminDir(pPath, true)) { return S_OK; } @@ -148,7 +148,7 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/) status = git_wc_status_none; break; } - TSVNCacheResponse itemStatus; + TGITCacheResponse itemStatus; SecureZeroMemory(&itemStatus, sizeof(itemStatus)); if (m_remoteCacheLink.GetStatusFromRemoteCache(tpath, &itemStatus, true)) { @@ -178,7 +178,7 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/) // we have to check if the path is a folder ourselves :( if (PathIsDirectory(pPath)) { - if (g_ShellCache.HasSVNAdminDir(pPath, TRUE)) + if (g_ShellCache.HasGITAdminDir(pPath, TRUE)) { if ((!g_ShellCache.IsRecursive()) && (!g_ShellCache.IsFolderOverlay())) { @@ -226,7 +226,7 @@ STDMETHODIMP CShellExt::IsMemberOf(LPCWSTR pwszPath, DWORD /*dwAttrib*/) // with an admin directory if (PathIsDirectory(pPath)) { - if (g_ShellCache.HasSVNAdminDir(pPath, TRUE)) + if (g_ShellCache.HasGITAdminDir(pPath, TRUE)) { status = git_wc_status_normal; } diff --git a/src/TortoiseShell/MenuInfo.cpp b/src/TortoiseShell/MenuInfo.cpp index b5e985125..7a764f589 100644 --- a/src/TortoiseShell/MenuInfo.cpp +++ b/src/TortoiseShell/MenuInfo.cpp @@ -25,152 +25,152 @@ MenuInfo menuInfo[] = { { ShellMenuClone, MENUCLONE, IDI_CLONE, IDS_MENUCLONE, IDS_MENUDESCCLONE, - ITEMIS_FOLDER, ITEMIS_INSVN|ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDER, ITEMIS_INGIT|ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0, 0 }, { ShellMenuPull, MENUPULL, IDI_PULL, IDS_MENUPULL, IDS_MENUDESCPULL, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuFetch, MENUFETCH, IDI_PULL, IDS_MENUFETCH, IDS_MENUDESCFETCH, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuPush, MENUPUSH, IDI_PUSH, IDS_MENUPUSH, IDS_MENUDESCPUSH, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuSync, MENUSYNC, IDI_RELOCATE, IDS_MENUSYNC, IDS_MENUDESCSYNC, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, // { ShellMenuUpdate, MENUSUBUPDATE, IDI_UPDATE, IDS_MENUUPDATE, IDS_MENUDESCUPDATE, -// ITEMIS_INSVN, 0, ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0 }, +// ITEMIS_INGIT, 0, ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0 }, { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, { ShellMenuCommit, MENUCOMMIT, IDI_COMMIT, IDS_MENUCOMMIT, IDS_MENUDESCCOMMIT, - ITEMIS_INSVN, 0, ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT, 0, ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0 }, { ShellMenuGitSVNDCommit, MENUSVNDCOMMIT, IDI_COMMIT, IDS_MENUSVNDCOMMIT, IDS_MENUSVNDCOMMIT_DESC, - ITEMIS_INSVN|ITEMIS_GITSVN, 0, ITEMIS_FOLDERINSVN|ITEMIS_GITSVN, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT|ITEMIS_GITSVN, 0, ITEMIS_FOLDERINGIT|ITEMIS_GITSVN, 0, 0, 0, 0, 0 }, { ShellMenuGitSVNRebase, MENUSVNREBASE, IDI_REBASE, IDS_MENUSVNREBASE, IDS_MENUSVNREBASE_DESC, - ITEMIS_FOLDERINSVN|ITEMIS_GITSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0}, + ITEMIS_FOLDERINGIT|ITEMIS_GITSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0}, { ShellMenuGitSVNIgnore, MENUSVNIGNORE, IDI_IGNORE, IDS_MENUSVNIGNORE, IDS_MENUSVNIGNORE_DESC, - ITEMIS_INSVN|ITEMIS_GITSVN, 0, ITEMIS_FOLDERINSVN|ITEMIS_GITSVN, 0, 0, 0, 0, 0}, + ITEMIS_INGIT|ITEMIS_GITSVN, 0, ITEMIS_FOLDERINGIT|ITEMIS_GITSVN, 0, 0, 0, 0, 0}, { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, { ShellMenuDiff, MENUDIFF, IDI_DIFF, IDS_MENUDIFF, IDS_MENUDESCDIFF, - ITEMIS_INSVN|ITEMIS_ONLYONE, 0, ITEMIS_TWO, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT|ITEMIS_ONLYONE, 0, ITEMIS_TWO, 0, 0, 0, 0, 0 }, { ShellMenuPrevDiff, MENUPREVDIFF, IDI_DIFF, IDS_MENUPREVDIFF, IDS_MENUDESCPREVDIFF, - ITEMIS_INSVN|ITEMIS_ONLYONE, ITEMIS_ADDED, 0, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT|ITEMIS_ONLYONE, ITEMIS_ADDED, 0, 0, 0, 0, 0, 0 }, { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, { ShellMenuLog, MENULOG, IDI_LOG, IDS_MENULOG, IDS_MENUDESCLOG, - ITEMIS_INSVN|ITEMIS_ONLYONE, ITEMIS_ADDED, ITEMIS_FOLDER|ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, ITEMIS_ADDED, ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, ITEMIS_ADDED, 0, 0 }, + ITEMIS_INGIT|ITEMIS_ONLYONE, ITEMIS_ADDED, ITEMIS_FOLDER|ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, ITEMIS_ADDED, ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, ITEMIS_ADDED, 0, 0 }, { ShellMenuRefLog, MENUREFLOG, IDI_LOG, IDS_MENUREFLOG, IDS_MENUDESCREFLOG, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuRefBrowse, MENUREFBROWSE, IDI_REPOBROWSE, IDS_MENUREFBROWSE, IDS_MENUDESCREFBROWSE, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, // { ShellMenuRepoBrowse, MENUREPOBROWSE, IDI_REPOBROWSE, IDS_MENUREPOBROWSE, IDS_MENUDESCREPOBROWSE, -// ITEMIS_ONLYONE, 0, ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0 }, +// ITEMIS_ONLYONE, 0, ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0 }, { ShellMenuShowChanged, MENUSHOWCHANGED, IDI_SHOWCHANGED, IDS_MENUSHOWCHANGED, IDS_MENUDESCSHOWCHANGED, - ITEMIS_INSVN, 0, ITEMIS_FOLDER|ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0}, + ITEMIS_INGIT, 0, ITEMIS_FOLDER|ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0}, { ShellMenuRebase, MENUREBASE, IDI_REBASE, IDS_MENUREBASE, IDS_MENUREBASE, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0}, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0}, { ShellMenuStashSave, MENUSTASHSAVE, IDI_COMMIT, IDS_MENUSTASHSAVE, IDS_MENUSTASHSAVE, - ITEMIS_INSVN, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuStashApply, MENUSTASHAPPLY, IDI_RELOCATE, IDS_MENUSTASHAPPLY, IDS_MENUSTASHAPPLY, - ITEMIS_FOLDERINSVN|ITEMIS_STASH, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_STASH, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuStashPop, MENUSTASHPOP, IDI_RELOCATE, IDS_MENUSTASHPOP, IDS_MENUSTASHPOP, - ITEMIS_FOLDERINSVN|ITEMIS_STASH, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_STASH, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuStashList, MENUSTASHAPPLY, IDI_LOG, IDS_MENUSTASHLIST, IDS_MENUSTASHLIST, - ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0, 0, 0 }, { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, { ShellMenuBisectStart, MENUBISECTSTART, 0, IDS_MENUBISECTSTART, IDS_MENUDESCBISECTSTART, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, ITEMIS_BISECT, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, ITEMIS_BISECT, 0, 0, 0, 0, 0, 0 }, { ShellMenuBisectGood, MENUBISECTGOOD, IDI_THUMB_UP, IDS_MENUBISECTGOOD, IDS_MENUDESCBISECTGOOD, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE|ITEMIS_BISECT, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE|ITEMIS_BISECT, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuBisectBad, MENUBISECTBAD, IDI_THUMB_DOWN, IDS_MENUBISECTBAD, IDS_MENUDESCBISECTBAD, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE|ITEMIS_BISECT, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE|ITEMIS_BISECT, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuBisectReset, MENUBISECTRESET, 0, IDS_MENUBISECTRESET, IDS_MENUDESCBISECTRESET, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE|ITEMIS_BISECT, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE|ITEMIS_BISECT, 0, 0, 0, 0, 0, 0, 0 }, { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, { ShellMenuConflictEditor, MENUCONFLICTEDITOR, IDI_CONFLICT, IDS_MENUCONFLICT, IDS_MENUDESCCONFLICT, - ITEMIS_INSVN|ITEMIS_CONFLICTED, ITEMIS_FOLDER, 0, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT|ITEMIS_CONFLICTED, ITEMIS_FOLDER, 0, 0, 0, 0, 0, 0 }, { ShellMenuResolve, MENURESOLVE, IDI_RESOLVE, IDS_MENURESOLVE, IDS_MENUDESCRESOLVE, - ITEMIS_INSVN|ITEMIS_CONFLICTED, 0, ITEMIS_INSVN|ITEMIS_FOLDER, 0, ITEMIS_FOLDERINSVN, 0, 0, 0 }, + ITEMIS_INGIT|ITEMIS_CONFLICTED, 0, ITEMIS_INGIT|ITEMIS_FOLDER, 0, ITEMIS_FOLDERINGIT, 0, 0, 0 }, { ShellMenuRename, MENURENAME, IDI_RENAME, IDS_MENURENAME, IDS_MENUDESCRENAME, - ITEMIS_INSVN|ITEMIS_ONLYONE|ITEMIS_INVERSIONEDFOLDER, ITEMIS_ADDED|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT|ITEMIS_ONLYONE|ITEMIS_INVERSIONEDFOLDER, ITEMIS_ADDED|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, { ShellMenuRemove, MENUREMOVE, IDI_DELETE, IDS_MENUREMOVE, IDS_MENUDESCREMOVE, - ITEMIS_INSVN|ITEMIS_INVERSIONEDFOLDER, ITEMIS_ADDED|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT|ITEMIS_INVERSIONEDFOLDER, ITEMIS_ADDED|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, { ShellMenuRemoveKeep, MENUREMOVEKEEP, IDI_DELETE, IDS_MENUREMOVEKEEP, IDS_MENUDESCREMOVEKEEP, - ITEMIS_INSVN|ITEMIS_INVERSIONEDFOLDER, ITEMIS_ADDED|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT|ITEMIS_INVERSIONEDFOLDER, ITEMIS_ADDED|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, { ShellMenuRevert, MENUREVERT, IDI_REVERT, IDS_MENUREVERT, IDS_MENUDESCREVERT, - ITEMIS_INSVN, ITEMIS_NORMAL, ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT, ITEMIS_NORMAL, ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0 }, { ShellMenuCleanup, MENUCLEANUP, IDI_CLEANUP, IDS_MENUCLEANUP, IDS_MENUDESCCLEANUP, - ITEMIS_FOLDERINSVN|ITEMIS_FOLDER, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_FOLDER, 0, 0, 0, 0, 0, 0, 0 }, { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, // { ShellMenuCopy, MENUCOPY, IDI_COPY, IDS_MENUBRANCH, IDS_MENUDESCCOPY, -// ITEMIS_INSVN|ITEMIS_ONLYONE, ITEMIS_ADDED, ITEMIS_FOLDER|ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0 }, +// ITEMIS_INGIT|ITEMIS_ONLYONE, ITEMIS_ADDED, ITEMIS_FOLDER|ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0 }, { ShellMenuSwitch, MENUSWITCH, IDI_SWITCH, IDS_MENUSWITCH, IDS_MENUDESCSWITCH, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuMerge, MENUMERGE, IDI_MERGE, IDS_MENUMERGE, IDS_MENUDESCMERGE, - ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuBranch, MENUCOPY, IDI_COPY, IDS_MENUBRANCH, IDS_MENUDESCCOPY, - ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuTag, MENUTAG, IDI_TAG, IDS_MENUTAG, IDS_MENUDESCCOPY, - ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuExport, MENUEXPORT, IDI_EXPORT, IDS_MENUEXPORT, IDS_MENUDESCEXPORT, - ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0, 0, 0 }, { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, { ShellMenuCreateRepos, MENUCREATEREPOS, IDI_CREATEREPOS, IDS_MENUCREATEREPOS, IDS_MENUDESCCREATEREPOS, - ITEMIS_FOLDER, ITEMIS_INSVN|ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDER, ITEMIS_INGIT|ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0, 0 }, { ShellMenuAdd, MENUADD, IDI_ADD, IDS_MENUADD, IDS_MENUDESCADD, - ITEMIS_INVERSIONEDFOLDER, ITEMIS_INSVN, ITEMIS_INSVN|ITEMIS_FOLDER, 0, ITEMIS_IGNORED, 0, ITEMIS_DELETED, ITEMIS_FOLDER|ITEMIS_ONLYONE }, + ITEMIS_INVERSIONEDFOLDER, ITEMIS_INGIT, ITEMIS_INGIT|ITEMIS_FOLDER, 0, ITEMIS_IGNORED, 0, ITEMIS_DELETED, ITEMIS_FOLDER|ITEMIS_ONLYONE }, // { ShellMenuAddAsReplacement, MENUADD, IDI_ADD, IDS_MENUADDASREPLACEMENT, IDS_MENUADDASREPLACEMENT, // ITEMIS_DELETED|ITEMIS_ONLYONE, ITEMIS_FOLDER, 0, 0, 0, 0, 0, 0 }, { ShellMenuBlame, MENUBLAME, IDI_BLAME, IDS_MENUBLAME, IDS_MENUDESCBLAME, - ITEMIS_INSVN|ITEMIS_ONLYONE, ITEMIS_FOLDER|ITEMIS_ADDED, 0, 0, 0, 0, 0, 0 }, + ITEMIS_INGIT|ITEMIS_ONLYONE, ITEMIS_FOLDER|ITEMIS_ADDED, 0, 0, 0, 0, 0, 0 }, { ShellMenuIgnoreSub, MENUIGNORE, IDI_IGNORE, IDS_MENUIGNORE, IDS_MENUDESCIGNORE, - ITEMIS_INVERSIONEDFOLDER, ITEMIS_IGNORED|ITEMIS_INSVN|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, + ITEMIS_INVERSIONEDFOLDER, ITEMIS_IGNORED|ITEMIS_INGIT|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, { ShellMenuDeleteIgnoreSub, MENUIGNORE, IDI_IGNORE, IDS_MENUDELETEIGNORE, IDS_MENUDESCDELETEIGNORE, - ITEMIS_INVERSIONEDFOLDER|ITEMIS_INSVN, ITEMIS_IGNORED|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, + ITEMIS_INVERSIONEDFOLDER|ITEMIS_INGIT, ITEMIS_IGNORED|ITEMIS_WCROOT, 0, 0, 0, 0, 0, 0 }, // no support for this atm since we do not use "ignoredprops"-vector in ContextMenu.cpp // { ShellMenuUnIgnoreSub, MENUIGNORE, IDI_IGNORE, IDS_MENUUNIGNORE, IDS_MENUDESCUNIGNORE, @@ -179,31 +179,31 @@ MenuInfo menuInfo[] = { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, { ShellMenuSubAdd, MENUSUBADD, IDI_ADD, IDS_MENUSUBADD, IDS_MENUSUBADD, - ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuUpdateExt, MENUUPDATEEXT, IDI_UPDATE, IDS_MENUUPDATEEXT, IDS_MENUDESCUPDATEEXT, - ITEMIS_FOLDERINSVN|ITEMIS_SUBMODULECONTAINER, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_SUBMODULECONTAINER, 0, 0, 0, 0, 0, 0, 0 }, { ShellMenuSubSync, MENUSUBSYNC, IDI_MENUSYNC, IDS_MENUSUBSYNC, IDS_MENUSUBSYNC, - ITEMIS_FOLDERINSVN|ITEMIS_SUBMODULECONTAINER, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT|ITEMIS_SUBMODULECONTAINER, 0, 0, 0, 0, 0, 0, 0 }, { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, // { ShellMenuCherryPick, MENUCHERRYPICK, IDI_CREATEPATCH, IDS_MENUCHERRYPICK, IDS_MENUDESCCREATEPATCH, -// ITEMIS_INSVN, ITEMIS_NORMAL, ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0 }, +// ITEMIS_INGIT, ITEMIS_NORMAL, ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0 }, { ShellMenuFormatPatch, MENUFORMATPATCH, IDI_CREATEPATCH, IDS_MENUFORMATPATCH, IDS_MENUDESCCREATEPATCH, - ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0, 0, 0 }, + ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0, 0, 0 }, // Really apply patch { ShellMenuImportPatch, MENUIMPORTPATCH, IDI_PATCH, IDS_MENUIMPORTPATCH, IDS_MENUDESCIMPORTPATCH, - ITEMIS_PATCHFILE, 0, ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0 }, + ITEMIS_PATCHFILE, 0, ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0 }, // { ShellMenuCreatePatch, MENUCREATEPATCH, IDI_CREATEPATCH, IDS_MENUCREATEPATCH, IDS_MENUDESCCREATEPATCH, -// ITEMIS_INSVN, ITEMIS_NORMAL, ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0 }, +// ITEMIS_INGIT, ITEMIS_NORMAL, ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0 }, // Review Patch { ShellMenuApplyPatch, MENUAPPLYPATCH, IDI_PATCH, IDS_MENUAPPLYPATCH, IDS_MENUDESCAPPLYPATCH, @@ -213,12 +213,12 @@ MenuInfo menuInfo[] = ITEMIS_PATCHFILE, 0, ITEMIS_EXTENDED, ITEMIS_FOLDER, 0, 0, 0, 0 }, // { ShellMenuProperties, MENUPROPERTIES, IDI_PROPERTIES, IDS_MENUPROPERTIES, IDS_MENUDESCPROPERTIES, -// ITEMIS_INSVN, 0, ITEMIS_FOLDERINSVN, 0, 0, 0, 0, 0 }, +// ITEMIS_INGIT, 0, ITEMIS_FOLDERINGIT, 0, 0, 0, 0, 0 }, // we do not support paste atm // { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, // { ShellMenuClipPaste, MENUCLIPPASTE, IDI_CLIPPASTE, IDS_MENUCLIPPASTE, IDS_MENUDESCCLIPPASTE, -// ITEMIS_INSVN|ITEMIS_FOLDER|ITEMIS_PATHINCLIPBOARD, 0, 0, 0, 0, 0, 0, 0 }, +// ITEMIS_INGIT|ITEMIS_FOLDER|ITEMIS_PATHINCLIPBOARD, 0, 0, 0, 0, 0, 0, 0 }, { ShellSeparator, 0, 0, 0, 0, 0, 0, 0, 0}, diff --git a/src/TortoiseShell/RemoteCacheLink.cpp b/src/TortoiseShell/RemoteCacheLink.cpp index 21d6bca9c..a66f70ac9 100644 --- a/src/TortoiseShell/RemoteCacheLink.cpp +++ b/src/TortoiseShell/RemoteCacheLink.cpp @@ -193,9 +193,9 @@ void CRemoteCacheLink::CloseCommandPipe() { // now tell the cache we don't need it's command thread anymore DWORD cbWritten; - TSVNCacheCommand cmd; - SecureZeroMemory(&cmd, sizeof(TSVNCacheCommand)); - cmd.command = TSVNCACHECOMMAND_END; + TGITCacheCommand cmd; + SecureZeroMemory(&cmd, sizeof(TGITCacheCommand)); + cmd.command = TGITCACHECOMMAND_END; WriteFile( m_hCommandPipe, // handle to pipe &cmd, // buffer to write from @@ -208,7 +208,7 @@ void CRemoteCacheLink::CloseCommandPipe() } } -bool CRemoteCacheLink::GetStatusFromRemoteCache(const CTGitPath& Path, TSVNCacheResponse* pReturnedStatus, bool bRecursive) +bool CRemoteCacheLink::GetStatusFromRemoteCache(const CTGitPath& Path, TGITCacheResponse* pReturnedStatus, bool bRecursive) { if(!EnsurePipeOpen()) { @@ -242,9 +242,9 @@ bool CRemoteCacheLink::GetStatusFromRemoteCache(const CTGitPath& Path, TSVNCache } if (bIsWow64) { - CRegString tsvninstalled64 = CRegString(_T("Software\\TortoiseGit\\CachePath"), _T(""), false, HKEY_LOCAL_MACHINE, KEY_WOW64_64KEY); - if (!CString(tsvninstalled64).IsEmpty()) - sCachePath = tsvninstalled64; + CRegString tgitinstalled64 = CRegString(_T("Software\\TortoiseGit\\CachePath"), _T(""), false, HKEY_LOCAL_MACHINE, KEY_WOW64_64KEY); + if (!CString(tgitinstalled64).IsEmpty()) + sCachePath = tgitinstalled64; } } if (!CCreateProcessHelper::CreateProcessDetached(sCachePath, NULL)) @@ -285,11 +285,11 @@ bool CRemoteCacheLink::GetStatusFromRemoteCache(const CTGitPath& Path, TSVNCache AutoLocker lock(m_critSec); DWORD nBytesRead; - TSVNCacheRequest request; - request.flags = TSVNCACHE_FLAGS_NONOTIFICATIONS; + TGITCacheRequest request; + request.flags = TGITCACHE_FLAGS_NONOTIFICATIONS; if(bRecursive) { - request.flags |= TSVNCACHE_FLAGS_RECUSIVE_STATUS; + request.flags |= TGITCACHE_FLAGS_RECUSIVE_STATUS; } wcsncpy_s(request.path, MAX_PATH+1, Path.GetWinPath(), MAX_PATH); SecureZeroMemory(&m_Overlapped, sizeof(OVERLAPPED)); @@ -350,9 +350,9 @@ bool CRemoteCacheLink::ReleaseLockForPath(const CTGitPath& path) if (m_hCommandPipe != INVALID_HANDLE_VALUE) { DWORD cbWritten; - TSVNCacheCommand cmd; - SecureZeroMemory(&cmd, sizeof(TSVNCacheCommand)); - cmd.command = TSVNCACHECOMMAND_RELEASE; + TGITCacheCommand cmd; + SecureZeroMemory(&cmd, sizeof(TGITCacheCommand)); + cmd.command = TGITCACHECOMMAND_RELEASE; wcsncpy_s(cmd.path, MAX_PATH+1, path.GetDirectory().GetWinPath(), MAX_PATH); BOOL fSuccess = WriteFile( m_hCommandPipe, // handle to pipe diff --git a/src/TortoiseShell/RemoteCacheLink.h b/src/TortoiseShell/RemoteCacheLink.h index c4b7956c6..919582204 100644 --- a/src/TortoiseShell/RemoteCacheLink.h +++ b/src/TortoiseShell/RemoteCacheLink.h @@ -18,7 +18,7 @@ // #pragma once -struct TSVNCacheResponse; +struct TGITCacheResponse; class CTGitPath; #include "GitStatus.h" @@ -34,7 +34,7 @@ public: ~CRemoteCacheLink(void); public: - bool GetStatusFromRemoteCache(const CTGitPath& Path, TSVNCacheResponse* pReturnedStatus, bool bRecursive); + bool GetStatusFromRemoteCache(const CTGitPath& Path, TGITCacheResponse* pReturnedStatus, bool bRecursive); bool ReleaseLockForPath(const CTGitPath& path); private: diff --git a/src/TortoiseShell/ShellCache.h b/src/TortoiseShell/ShellCache.h index 283311356..e78a2b79d 100644 --- a/src/TortoiseShell/ShellCache.h +++ b/src/TortoiseShell/ShellCache.h @@ -470,7 +470,7 @@ public: } return &columnrevformat; } - BOOL HasSVNAdminDir(LPCTSTR path, BOOL bIsDir, CString *ProjectTopDir = NULL) + BOOL HasGITAdminDir(LPCTSTR path, BOOL bIsDir, CString *ProjectTopDir = NULL) { size_t len = _tcslen(path); TCHAR * buf = new TCHAR[len+1]; diff --git a/src/TortoiseShell/ShellExt.cpp b/src/TortoiseShell/ShellExt.cpp index f38b76b65..aeefb10b3 100644 --- a/src/TortoiseShell/ShellExt.cpp +++ b/src/TortoiseShell/ShellExt.cpp @@ -28,7 +28,7 @@ //#include "..\version.h" //#include "libintl.h" #undef swprintf -#include "SVNPropertyPage.h" +#include "GitPropertyPage.h" std::set g_exts; diff --git a/src/TortoiseShell/TortoiseSVN.cpp b/src/TortoiseShell/TortoiseGIT.cpp similarity index 100% rename from src/TortoiseShell/TortoiseSVN.cpp rename to src/TortoiseShell/TortoiseGIT.cpp diff --git a/src/TortoiseShell/TortoiseShell.vcproj b/src/TortoiseShell/TortoiseShell.vcproj index f4c31c6c5..e9bee9aee 100644 --- a/src/TortoiseShell/TortoiseShell.vcproj +++ b/src/TortoiseShell/TortoiseShell.vcproj @@ -464,6 +464,10 @@ > + + @@ -556,10 +560,6 @@ - - @@ -568,7 +568,7 @@ > + + @@ -633,10 +637,6 @@ > - - diff --git a/src/Utils/ShellUpdater.cpp b/src/Utils/ShellUpdater.cpp index bbd8492e6..12bbd2385 100644 --- a/src/Utils/ShellUpdater.cpp +++ b/src/Utils/ShellUpdater.cpp @@ -125,8 +125,8 @@ void CShellUpdater::UpdateShell() SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, path.GetWinPath(), NULL); } DWORD cbWritten; - TSVNCacheCommand cmd; - cmd.command = TSVNCACHECOMMAND_CRAWL; + TGITCacheCommand cmd; + cmd.command = TGITCACHECOMMAND_CRAWL; wcsncpy_s(cmd.path, MAX_PATH+1, path.GetDirectory().GetWinPath(), MAX_PATH); BOOL fSuccess = WriteFile( hPipe, // handle to pipe @@ -147,8 +147,8 @@ void CShellUpdater::UpdateShell() { // now tell the cache we don't need it's command thread anymore DWORD cbWritten; - TSVNCacheCommand cmd; - cmd.command = TSVNCACHECOMMAND_END; + TGITCacheCommand cmd; + cmd.command = TGITCACHECOMMAND_END; WriteFile( hPipe, // handle to pipe &cmd, // buffer to write from diff --git a/src/version.h b/src/version.h index a3cc8df99..2614d4dfc 100644 --- a/src/version.h +++ b/src/version.h @@ -3,16 +3,16 @@ #define STRFILEVER "1, 7, 5, 0\0" #define STRPRODUCTVER "1, 7, 5, 0\0" -#define TSVN_VERMAJOR 1 -#define TSVN_VERMINOR 7 -#define TSVN_VERMICRO 5 -#define TSVN_VERBUILD 0 -#define TSVN_VERDATE __DATE__ +#define TGIT_VERMAJOR 1 +#define TGIT_VERMINOR 7 +#define TGIT_VERMICRO 5 +#define TGIT_VERBUILD 0 +#define TGIT_VERDATE __DATE__ #ifdef _WIN64 -#define TSVN_PLATFORM "64 Bit" +#define TGIT_PLATFORM "64 Bit" #else -#define TSVN_PLATFORM "32 Bit" +#define TGIT_PLATFORM "32 Bit" #endif diff --git a/test/Cache/CacheDlg.cpp b/test/Cache/CacheDlg.cpp index 4368f1d78..fa93431be 100644 --- a/test/Cache/CacheDlg.cpp +++ b/test/Cache/CacheDlg.cpp @@ -247,7 +247,7 @@ bool CCacheDlg::GetStatusFromRemoteCache(const CTGitPath& Path, bool bRecursive) startup.cb = sizeof(startup); memset(&process, 0, sizeof(process)); - CString sCachePath = _T("TSVNCache.exe"); + CString sCachePath = _T("TGitCache.exe"); if (CreateProcess(sCachePath.GetBuffer(sCachePath.GetLength()+1), _T(""), NULL, NULL, FALSE, 0, 0, 0, &startup, &process)==0) { // It's not appropriate to do a message box here, because there may be hundreds of calls @@ -270,11 +270,11 @@ bool CCacheDlg::GetStatusFromRemoteCache(const CTGitPath& Path, bool bRecursive) DWORD nBytesRead; - TSVNCacheRequest request; - request.flags = TSVNCACHE_FLAGS_NONOTIFICATIONS; + TGITCacheRequest request; + request.flags = TGITCACHE_FLAGS_NONOTIFICATIONS; if(bRecursive) { - request.flags |= TSVNCACHE_FLAGS_RECUSIVE_STATUS; + request.flags |= TGITCACHE_FLAGS_RECUSIVE_STATUS; } wcsncpy(request.path, Path.GetWinPath(), MAX_PATH); ZeroMemory(&m_Overlapped, sizeof(OVERLAPPED)); @@ -291,7 +291,7 @@ bool CCacheDlg::GetStatusFromRemoteCache(const CTGitPath& Path, bool bRecursive) // so that users still recognize that something might be wrong and // report back to us so we can investigate further. - TSVNCacheResponse ReturnedStatus; + TGITCacheResponse ReturnedStatus; BOOL fSuccess = TransactNamedPipe(m_hPipe, &request, sizeof(request), &ReturnedStatus, sizeof(ReturnedStatus), @@ -349,8 +349,8 @@ void CCacheDlg::RemoveFromCache(const CString& path) NULL)) // don't set maximum time { DWORD cbWritten; - TSVNCacheCommand cmd; - cmd.command = TSVNCACHECOMMAND_CRAWL; + TGITCacheCommand cmd; + cmd.command = TGITCACHECOMMAND_CRAWL; wcsncpy(cmd.path, path, MAX_PATH); BOOL fSuccess = WriteFile( hPipe, // handle to pipe @@ -369,8 +369,8 @@ void CCacheDlg::RemoveFromCache(const CString& path) { // now tell the cache we don't need it's command thread anymore DWORD cbWritten; - TSVNCacheCommand cmd; - cmd.command = TSVNCACHECOMMAND_END; + TGITCacheCommand cmd; + cmd.command = TGITCACHECOMMAND_END; WriteFile( hPipe, // handle to pipe &cmd, // buffer to write from -- 2.11.4.GIT