OSDN Git Service

Add context menu item "Revert" at Commit File List
authorFrank Li <lznuaa@gmail.com>
Sat, 21 Feb 2009 07:52:46 +0000 (15:52 +0800)
committerFrank Li <lznuaa@gmail.com>
Sat, 21 Feb 2009 07:52:46 +0000 (15:52 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Git/Git.cpp
src/Git/Git.h
src/Git/GitStatusListCtrl.cpp
src/TortoiseProc/LogDlg.cpp
src/TortoiseProc/TortoiseProc.vcproj

index 6208576..024d6bd 100644 (file)
@@ -120,27 +120,6 @@ CGit g_Git;
 static LPTSTR l_processEnv = NULL;\r
 \r
 \r
-BOOL CGit::IsVista()\r
-{\r
-\r
-       if( CRegStdWORD(_T("Software\\TortoiseGit\\CacheType") ) == 0)\r
-       {\r
-               return TRUE;\r
-       }\r
-\r
-       OSVERSIONINFO osvi;\r
-    BOOL bIsWindowsXPorLater;\r
-\r
-    ZeroMemory(&osvi, sizeof(OSVERSIONINFO));\r
-    osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);\r
-\r
-    GetVersionEx(&osvi);\r
-       \r
-       if(osvi.dwMajorVersion >= 6)\r
-               return TRUE;\r
-       else\r
-               return FALSE;\r
-}\r
 \r
 CGit::CGit(void)\r
 {\r
@@ -957,6 +936,44 @@ BOOL CGit::CheckCleanWorkTree()
 \r
        return TRUE;\r
 }\r
+int CGit::Revert(CTGitPathList &list,bool keep)\r
+{\r
+       int ret;\r
+       for(int i=0;i<list.GetCount();i++)\r
+       {       \r
+               ret = Revert((CTGitPath&)list[i],keep);\r
+               if(ret)\r
+                       return ret;\r
+       }\r
+       return 0;\r
+}\r
+int CGit::Revert(CTGitPath &path,bool keep)\r
+{\r
+       CString cmd, out;\r
+       if(path.m_Action & CTGitPath::LOGACTIONS_ADDED)\r
+       {       //To init git repository, there are not HEAD, so we can use git reset command\r
+               cmd.Format(_T("git.exe rm --cache -- \"%s\""),path.GetGitPathString());\r
+               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+                       return -1;\r
+       }\r
+       else if(path.m_Action & CTGitPath::LOGACTIONS_REPLACED )\r
+       {\r
+               cmd.Format(_T("git.exe mv \"%s\" \"%s\""),path.GetGitPathString(),path.GetGitOldPathString());\r
+               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+                       return -1;\r
+               \r
+               cmd.Format(_T("git.exe checkout -f -- \"%s\""),path.GetGitOldPathString());\r
+               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+                       return -1;\r
+       }\r
+       else\r
+       {\r
+               cmd.Format(_T("git.exe checkout -f -- \"%s\""),path.GetGitPathString());\r
+               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+                       return -1;\r
+       }\r
+       return 0;\r
+}\r
 \r
 int CGit::ListConflictFile(CTGitPathList &list,CTGitPath *path)\r
 {\r
index 856c71c..a65abc1 100644 (file)
@@ -48,6 +48,8 @@ public:
        CString GetUserEmail(void);\r
        CString GetCurrentBranch(void);\r
        BOOL CheckCleanWorkTree();\r
+       int Revert(CTGitPath &path,bool keep=true);\r
+       int Revert(CTGitPathList &list,bool keep=true);\r
 \r
        bool SetCurrentDir(CString path)\r
        {\r
@@ -99,7 +101,6 @@ public:
        static void StringAppend(CString *str,BYTE *p,int code=CP_UTF8,int length=-1);\r
 \r
        BOOL IsInitRepos();\r
-       static BOOL IsVista();\r
        int ListConflictFile(CTGitPathList &list,CTGitPath *path=NULL);\r
        \r
 };\r
index 719f775..0884469 100644 (file)
@@ -2431,6 +2431,15 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                        //              }\r
                        //      }\r
                        //}\r
+\r
+                       if ( (GetSelectedCount() >0 ) && (!(wcStatus & CTGitPath::LOGACTIONS_UNVER)))\r
+                       {\r
+                               if (m_dwContextMenus & SVNSLC_POPREVERT)\r
+                               {\r
+                                       popup.AppendMenuIcon(IDSVNLC_REVERT, IDS_MENUREVERT, IDI_REVERT);\r
+                               }\r
+                       }\r
+\r
                        if ((GetSelectedCount() == 1)&&(!(wcStatus & CTGitPath::LOGACTIONS_UNVER))\r
                                &&(!(wcStatus & CTGitPath::LOGACTIONS_IGNORE)))\r
                        {\r
@@ -3144,49 +3153,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
 #endif\r
                                break;\r
                        \r
-#if 0\r
-                       case IDSVNLC_COPY:\r
-                               CopySelectedEntriesToClipboard(0);\r
-                               break;\r
-                       case IDSVNLC_COPYEXT:\r
-                               CopySelectedEntriesToClipboard((DWORD)-1);\r
-                               break;\r
-                       case IDSVNLC_PROPERTIES:\r
-                               {\r
-                                       CTSVNPathList targetList;\r
-                                       FillListOfSelectedItemPaths(targetList);\r
-                                       CEditPropertiesDlg dlg;\r
-                                       dlg.SetPathList(targetList);\r
-                                       dlg.DoModal();\r
-                                       if (dlg.HasChanged())\r
-                                       {\r
-                                               // since the user might have changed/removed/added\r
-                                               // properties recursively, we don't really know\r
-                                               // which items have changed their status.\r
-                                               // So tell the parent to do a refresh.\r
-                                               CWnd* pParent = GetParent();\r
-                                               if (NULL != pParent && NULL != pParent->GetSafeHwnd())\r
-                                               {\r
-                                                       pParent->SendMessage(SVNSLNM_NEEDSREFRESH);\r
-                                               }\r
-                                       }\r
-                               }\r
-                               break;\r
-                       case IDSVNLC_COMMIT:\r
-                               {\r
-                                       CTSVNPathList targetList;\r
-                                       FillListOfSelectedItemPaths(targetList);\r
-                                       CTSVNPath tempFile = CTempFiles::Instance().GetTempFilePath(false);\r
-                                       VERIFY(targetList.WriteToFile(tempFile.GetWinPathString()));\r
-                                       CString commandline = CPathUtils::GetAppDirectory();\r
-                                       commandline += _T("TortoiseProc.exe /command:commit /pathfile:\"");\r
-                                       commandline += tempFile.GetWinPathString();\r
-                                       commandline += _T("\"");\r
-                                       commandline += _T(" /deletepathfile");\r
-                                       CAppUtils::LaunchApplication(commandline, NULL, false);\r
-                               }\r
-                               break;\r
-                       case IDSVNLC_REVERT:\r
+                               case IDSVNLC_REVERT:\r
                                {\r
                                        // If at least one item is not in the status "added"\r
                                        // we ask for a confirmation\r
@@ -3195,8 +3162,9 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                                        int index;\r
                                        while ((index = GetNextSelectedItem(pos)) >= 0)\r
                                        {\r
-                                               FileEntry * fentry = GetListEntry(index);\r
-                                               if (fentry->textstatus != git_wc_status_added)\r
+                                               //FileEntry * fentry = GetListEntry(index);\r
+                                               CTGitPath *fentry=(CTGitPath*)GetItemData(index);\r
+                                               if(fentry && fentry->m_Action &CTGitPath::LOGACTIONS_MODIFIED )\r
                                                {\r
                                                        bConfirm = TRUE;\r
                                                        break;\r
@@ -3208,94 +3176,45 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
 \r
                                        if (!bConfirm || CMessageBox::Show(this->m_hWnd, str, _T("TortoiseSVN"), MB_YESNO | MB_ICONQUESTION)==IDYES)\r
                                        {\r
-                                               CTSVNPathList targetList;\r
+                                               CTGitPathList targetList;\r
                                                FillListOfSelectedItemPaths(targetList);\r
 \r
                                                // make sure that the list is reverse sorted, so that\r
                                                // children are removed before any parents\r
                                                targetList.SortByPathname(true);\r
 \r
-                                               SVN git;\r
-\r
                                                // put all reverted files in the trashbin, except the ones with 'added'\r
                                                // status because they are not restored by the revert.\r
-                                               CTSVNPathList delList;\r
+                                               CTGitPathList delList;\r
                                                POSITION pos = GetFirstSelectedItemPosition();\r
                                                int index;\r
                                                while ((index = GetNextSelectedItem(pos)) >= 0)\r
                                                {\r
-                                                       FileEntry * entry = GetListEntry(index);\r
-                                                       if (entry->status != git_wc_status_added)\r
-                                                               delList.AddPath(entry->GetPath());\r
+                                                       CTGitPath *entry=(CTGitPath *)GetItemData(index);\r
+                                                       if (entry&&(!(entry->m_Action& CTGitPath::LOGACTIONS_ADDED)))\r
+                                                               delList.AddPath(*entry);\r
                                                }\r
                                                if (DWORD(CRegDWORD(_T("Software\\TortoiseGit\\RevertWithRecycleBin"), TRUE)))\r
                                                        delList.DeleteAllFiles(true);\r
 \r
-                                               if (!git.Revert(targetList, CStringArray(), FALSE))\r
+                                               if (g_Git.Revert(targetList))\r
                                                {\r
-                                                       CMessageBox::Show(this->m_hWnd, git.GetLastErrorMessage(), _T("TortoiseSVN"), MB_ICONERROR);\r
+                                                       CMessageBox::Show(this->m_hWnd, _T("Revert Fail"), _T("TortoiseSVN"), MB_ICONERROR);\r
                                                }\r
                                                else\r
                                                {\r
-                                                       // since the entries got reverted we need to remove\r
-                                                       // them from the list too, if no remote changes are shown,\r
-                                                       // if the unmodified files are not shown\r
-                                                       // and if the item is not part of a changelist\r
-                                                       POSITION pos;\r
-                                                       SetRedraw(FALSE);\r
-                                                       while ((pos = GetFirstSelectedItemPosition())!=0)\r
-                                                       {\r
-                                                               int index;\r
-                                                               index = GetNextSelectedItem(pos);\r
-                                                               FileEntry * fentry = m_arStatusArray[m_arListArray[index]];\r
-                                                               if ( fentry->IsFolder() )\r
-                                                               {\r
-                                                                       // refresh!\r
-                                                                       CWnd* pParent = GetParent();\r
-                                                                       if (NULL != pParent && NULL != pParent->GetSafeHwnd())\r
-                                                                       {\r
-                                                                               pParent->SendMessage(SVNSLNM_NEEDSREFRESH);\r
-                                                                       }\r
-                                                                       break;\r
-                                                               }\r
-\r
-                                                               BOOL bAdded = (fentry->textstatus == git_wc_status_added);\r
-                                                               fentry->status = git_wc_status_normal;\r
-                                                               fentry->propstatus = git_wc_status_normal;\r
-                                                               fentry->textstatus = git_wc_status_normal;\r
-                                                               fentry->copied = false;\r
-                                                               fentry->isConflicted = false;\r
-                                                               if ((fentry->GetChangeList().IsEmpty()&&(fentry->remotestatus <= git_wc_status_normal))||(m_dwShow & SVNSLC_SHOWNORMAL))\r
+                                                       for(int i=0;i<targetList.GetCount();i++)\r
+                                                       {       \r
+                                                               int nListboxEntries = GetItemCount();\r
+                                                               for (int nItem=0; nItem<nListboxEntries; ++nItem)\r
                                                                {\r
-                                                                       if ( bAdded )\r
-                                                                       {\r
-                                                                               // reverting added items makes them unversioned, not 'normal'\r
-                                                                               if (fentry->IsFolder())\r
-                                                                                       fentry->propstatus = git_wc_status_none;\r
-                                                                               else\r
-                                                                                       fentry->propstatus = git_wc_status_unversioned;\r
-                                                                               fentry->status = git_wc_status_unversioned;\r
-                                                                               fentry->textstatus = git_wc_status_unversioned;\r
-                                                                               SetItemState(index, 0, LVIS_SELECTED);\r
-                                                                               SetEntryCheck(fentry, index, false);\r
-                                                                       }\r
-                                                                       else if ((fentry->switched)||(m_dwShow & SVNSLC_SHOWNORMAL))\r
-                                                                       {\r
-                                                                               SetItemState(index, 0, LVIS_SELECTED);\r
-                                                                       }\r
-                                                                       else\r
+                                                                       CTGitPath *path=(CTGitPath*)GetItemData(nItem);\r
+                                                                       if (path->GetGitPathString()==targetList[i].GetGitPathString())\r
                                                                        {\r
-                                                                               m_nTotal--;\r
-                                                                               if (GetCheck(index))\r
-                                                                                       m_nSelected--;\r
-                                                                               RemoveListEntry(index);\r
-                                                                               Invalidate();\r
+                                                                               RemoveListEntry(nItem);\r
+                                                                               break;\r
                                                                        }\r
                                                                }\r
-                                                               else\r
-                                                               {\r
-                                                                       SetItemState(index, 0, LVIS_SELECTED);\r
-                                                               }\r
                                                        }\r
                                                        SetRedraw(TRUE);\r
                                                        SaveColumnWidths();\r
@@ -3305,6 +3224,49 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                                        }\r
                                }\r
                                break;\r
+#if 0\r
+                       case IDSVNLC_COPY:\r
+                               CopySelectedEntriesToClipboard(0);\r
+                               break;\r
+                       case IDSVNLC_COPYEXT:\r
+                               CopySelectedEntriesToClipboard((DWORD)-1);\r
+                               break;\r
+                       case IDSVNLC_PROPERTIES:\r
+                               {\r
+                                       CTSVNPathList targetList;\r
+                                       FillListOfSelectedItemPaths(targetList);\r
+                                       CEditPropertiesDlg dlg;\r
+                                       dlg.SetPathList(targetList);\r
+                                       dlg.DoModal();\r
+                                       if (dlg.HasChanged())\r
+                                       {\r
+                                               // since the user might have changed/removed/added\r
+                                               // properties recursively, we don't really know\r
+                                               // which items have changed their status.\r
+                                               // So tell the parent to do a refresh.\r
+                                               CWnd* pParent = GetParent();\r
+                                               if (NULL != pParent && NULL != pParent->GetSafeHwnd())\r
+                                               {\r
+                                                       pParent->SendMessage(SVNSLNM_NEEDSREFRESH);\r
+                                               }\r
+                                       }\r
+                               }\r
+                               break;\r
+                       case IDSVNLC_COMMIT:\r
+                               {\r
+                                       CTSVNPathList targetList;\r
+                                       FillListOfSelectedItemPaths(targetList);\r
+                                       CTSVNPath tempFile = CTempFiles::Instance().GetTempFilePath(false);\r
+                                       VERIFY(targetList.WriteToFile(tempFile.GetWinPathString()));\r
+                                       CString commandline = CPathUtils::GetAppDirectory();\r
+                                       commandline += _T("TortoiseProc.exe /command:commit /pathfile:\"");\r
+                                       commandline += tempFile.GetWinPathString();\r
+                                       commandline += _T("\"");\r
+                                       commandline += _T(" /deletepathfile");\r
+                                       CAppUtils::LaunchApplication(commandline, NULL, false);\r
+                               }\r
+                               break;\r
+               \r
                        case IDSVNLC_COMPARE:\r
                                {\r
                                        POSITION pos = GetFirstSelectedItemPosition();\r
index 39c984c..cc09e5e 100644 (file)
@@ -210,7 +210,7 @@ BOOL CLogDlg::OnInitDialog()
        m_LogList.DeleteAllItems();\r
        m_LogList.InsertGitColumn();\r
 \r
-       m_ChangedFileListCtrl.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS |IDS_STATUSLIST_COLADD|IDS_STATUSLIST_COLDEL , _T("LogDlg"),(SVNSLC_POPALL ^ SVNSLC_POPCOMMIT),false);\r
+       m_ChangedFileListCtrl.Init(SVNSLC_COLEXT | SVNSLC_COLSTATUS |IDS_STATUSLIST_COLADD|IDS_STATUSLIST_COLDEL , _T("LogDlg"),(SVNSLC_POPALL ^ (SVNSLC_POPCOMMIT|SVNSLC_POPREVERT)),false);\r
 \r
        GetDlgItem(IDC_LOGLIST)->UpdateData(FALSE);\r
 \r
index 264fdd8..376f8c1 100644 (file)
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Debug|x64"\r
-                       OutputDirectory="..\..\bin\Debug64\bin"\r
-                       IntermediateDirectory="..\..\obj\TortoiseProc\Debug64"\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseProc\$(ConfigurationName)"\r
                        ConfigurationType="1"\r
                        UseOfMFC="2"\r
-                       UseOfATL="0"\r
                        CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
+                               PreprocessorDefinitions="NDEBUG"\r
                                MkTypLibCompatible="false"\r
-                               TargetEnvironment="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
+                               Optimization="1"\r
+                               InlineFunctionExpansion="1"\r
+                               FavorSizeOrSpeed="2"\r
                                AdditionalIncludeDirectories="..\TortoiseProc;..\Resources;&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph;..\TortoiseShell"\r
-                               PreprocessorDefinitions="WIN64;_WINDOWS;_DEBUG;SVN_DEBUG;ENABLE_NLS;THESAURUS"\r
-                               MinimalRebuild="true"\r
+                               PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;THESAURUS"\r
+                               StringPooling="true"\r
+                               MinimalRebuild="false"\r
                                ExceptionHandling="2"\r
-                               RuntimeLibrary="3"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
                                TreatWChar_tAsBuiltInType="true"\r
                                ForceConformanceInForLoopScope="true"\r
                                RuntimeTypeInfo="true"\r
                                UsePrecompiledHeader="2"\r
                                WarningLevel="4"\r
                                DebugInformationFormat="3"\r
+                               DisableSpecificWarnings="4996,4018"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
+                               PreprocessorDefinitions="NDEBUG"\r
                                Culture="1033"\r
                                AdditionalIncludeDirectories="&quot;$(IntDir)&quot;;..\TortoiseShell"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib"\r
-                               LinkIncremental="2"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="../../ext/wingit"\r
                                IgnoreDefaultLibraryNames="libcd.lib;libc;shell32;LIBCMT"\r
                                DelayLoadDLLs="gdiplus.dll"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               OptimizeForWindows98="0"\r
                                RandomizedBaseAddress="1"\r
                                DataExecutionPrevention="0"\r
-                               TargetMachine="17"\r
+                               TargetMachine="1"\r
+                               Profile="true"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                        />\r
                </Configuration>\r
                <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="..\..\bin\$(ConfigurationName)\bin"\r
-                       IntermediateDirectory="..\..\obj\TortoiseProc\$(ConfigurationName)"\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="..\..\bin\Debug64\bin"\r
+                       IntermediateDirectory="..\..\obj\TortoiseProc\Debug64"\r
                        ConfigurationType="1"\r
                        UseOfMFC="2"\r
+                       UseOfATL="0"\r
                        CharacterSet="1"\r
-                       WholeProgramOptimization="1"\r
                        >\r
                        <Tool\r
                                Name="VCPreBuildEventTool"\r
                        />\r
                        <Tool\r
                                Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
+                               PreprocessorDefinitions="_DEBUG"\r
                                MkTypLibCompatible="false"\r
+                               TargetEnvironment="3"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               Optimization="1"\r
-                               InlineFunctionExpansion="1"\r
-                               FavorSizeOrSpeed="2"\r
+                               Optimization="0"\r
                                AdditionalIncludeDirectories="..\TortoiseProc;..\Resources;&quot;$InputDir&quot;;../../ext/ResizableLib;../Git;&quot;../../ext/apr-util/include&quot;;&quot;../../ext/apr-util/xml/expat/lib&quot;;../../ext/Subversion/subversion/include;../../ext/Subversion/subversion/libsvn_client;../../ext/apr/include;../../ext/boost;..\Utils;..\SVN;..\..\ext\ResizableLib;..\crashrpt;&quot;..\..\ext\libintl\libintl3-win32\inc&quot;;..\..\ext\hunspell;..\..\ext\scintilla\include;..\Utils\TreePropSheet;..\Utils\ColourPickerXP;..\Utils\NewMenu;..\Utils\MiscUI;..\LogCache;&quot;../../ext/cyrus-sasl/include&quot;;../../../common/openssl/inc32;.\RevisionGraph;..\TortoiseShell"\r
-                               PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;THESAURUS"\r
-                               StringPooling="true"\r
-                               MinimalRebuild="false"\r
+                               PreprocessorDefinitions="WIN64;_WINDOWS;_DEBUG;SVN_DEBUG;ENABLE_NLS;THESAURUS"\r
+                               MinimalRebuild="true"\r
                                ExceptionHandling="2"\r
-                               RuntimeLibrary="2"\r
-                               BufferSecurityCheck="false"\r
+                               RuntimeLibrary="3"\r
                                TreatWChar_tAsBuiltInType="true"\r
                                ForceConformanceInForLoopScope="true"\r
                                RuntimeTypeInfo="true"\r
                                UsePrecompiledHeader="2"\r
                                WarningLevel="4"\r
                                DebugInformationFormat="3"\r
-                               DisableSpecificWarnings="4996,4018"\r
                        />\r
                        <Tool\r
                                Name="VCManagedResourceCompilerTool"\r
                        />\r
                        <Tool\r
                                Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
+                               PreprocessorDefinitions="_DEBUG"\r
                                Culture="1033"\r
                                AdditionalIncludeDirectories="&quot;$(IntDir)&quot;;..\TortoiseShell"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="Crypt32.lib gdiplus.lib shfolder.lib shell32.lib comctl32.lib ws2_32.lib rpcrt4.lib shlwapi.lib wininet.lib version.lib"\r
-                               LinkIncremental="1"\r
-                               AdditionalLibraryDirectories="../../ext/wingit"\r
+                               LinkIncremental="2"\r
                                IgnoreDefaultLibraryNames="libcd.lib;libc;shell32;LIBCMT"\r
                                DelayLoadDLLs="gdiplus.dll"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
-                               OptimizeReferences="2"\r
-                               EnableCOMDATFolding="2"\r
-                               OptimizeForWindows98="0"\r
                                RandomizedBaseAddress="1"\r
                                DataExecutionPrevention="0"\r
-                               TargetMachine="1"\r
-                               Profile="true"\r
+                               TargetMachine="17"\r
                        />\r
                        <Tool\r
                                Name="VCALinkTool"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\explorer.ico"\r
+                               RelativePath=".\explorer.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\explorer.ico"\r
+                               RelativePath="..\Resources\explorer.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\newfolder.ico"\r
+                               RelativePath=".\newfolder.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\newfolder.ico"\r
+                               RelativePath="..\Resources\newfolder.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\open.ico"\r
+                               RelativePath=".\open.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\open.ico"\r
+                               RelativePath="..\Resources\open.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\save.ico"\r
+                               RelativePath=".\save.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\save.ico"\r
+                               RelativePath="..\Resources\save.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\saveas.ico"\r
+                               RelativePath=".\saveas.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\saveas.ico"\r
+                               RelativePath="..\Resources\saveas.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath="..\Resources\up.ico"\r
+                               RelativePath=".\up.ico"\r
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\up.ico"\r
+                               RelativePath="..\Resources\up.ico"\r
                                >\r
                        </File>\r
                        <File\r
                                </File>\r
                        </Filter>\r
                        <Filter\r
-                               Name="ReposStatus"\r
-                               >\r
-                               <File\r
-                                       RelativePath=".\Commands\RepoStatusCommand.cpp"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath=".\Commands\RepoStatusCommand.h"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-                       <Filter\r
                                Name="Remove"\r
                                >\r
                                <File\r
                                        >\r
                                </File>\r
                        </Filter>\r
+                       <Filter\r
+                               Name="ReposStatus"\r
+                               >\r
+                               <File\r
+                                       RelativePath=".\Commands\RepoStatusCommand.cpp"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath=".\Commands\RepoStatusCommand.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
                </Filter>\r
                <Filter\r
                        Name="Utility Dialogs"\r
                                />\r
                        </FileConfiguration>\r
                        <FileConfiguration\r
-                               Name="Debug|x64"\r
+                               Name="Release|Win32"\r
                                >\r
                                <Tool\r
                                        Name="VCCLCompilerTool"\r
                                />\r
                        </FileConfiguration>\r
                        <FileConfiguration\r
-                               Name="Release|Win32"\r
+                               Name="Debug|x64"\r
                                >\r
                                <Tool\r
                                        Name="VCCLCompilerTool"\r