OSDN Git Service

Delete: Don't ask user about if keep local copy.
authorFrank Li <lznuaa@gmail.com>
Sun, 22 Feb 2009 08:24:34 +0000 (16:24 +0800)
committerFrank Li <lznuaa@gmail.com>
Sun, 22 Feb 2009 08:24:34 +0000 (16:24 +0800)
because there are command "Delete(keep local copy)" at explore context menu

Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Resources/TortoiseProcENG.rc
src/TortoiseProc/Commands/RemoveCommand.cpp
src/TortoiseProc/GitLogListBase.cpp

index 1894e07..7088bc5 100644 (file)
Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ
index 3e07246..c57cfa8 100644 (file)
@@ -116,16 +116,22 @@ bool RemoveCommand::Execute()
        if (bRet)\r
                CShellUpdater::Instance().AddPathsForUpdate(pathList);\r
 #endif\r
-       int key=CMessageBox::Show(hwndExplorer, _T("File will removed from version control\r\n Do you want to keep local copy"), _T("TortoiseGit"), MB_ICONINFORMATION|MB_YESNOCANCEL);\r
-       if(key == IDCANCEL)\r
-               return FALSE;\r
+\r
+       //we don't ask user about if keep local copy. \r
+       //because there are command "Delete(keep local copy)" at explore context menu \r
+       //int key=CMessageBox::Show(hwndExplorer, _T("File will removed from version control\r\n Do you want to keep local copy"), _T("TortoiseGit"), MB_ICONINFORMATION|MB_YESNOCANCEL);\r
+       //if(key == IDCANCEL)\r
+       int key;\r
 \r
        CString format;\r
-       if(key == IDNO)\r
-               format=_T("git.exe rm -r -f \"%s\"");\r
 \r
-       if(key == IDYES)\r
+       if(parser.HasKey(_T("keep")))\r
+       {\r
                format= _T("git.exe update-index --force-remove -- \"%s\"");\r
+       }else\r
+       {\r
+               format=_T("git.exe rm -r -f \"%s\"");\r
+       }\r
 \r
        CString output;\r
        CString cmd;\r
index 9e1f9e7..80f4d47 100644 (file)
@@ -1115,7 +1115,7 @@ void CGitLogListBase::OnContextMenu(CWnd* pWnd, CPoint point)
                if (GetSelectedCount() == 1)\r
                {\r
                        CString str;\r
-                       str.Format(_T("Rebase %s to this"),g_Git.GetCurrentBranch());\r
+                       str.Format(_T("*Rebase %s to this"),g_Git.GetCurrentBranch());\r
 \r
                        if(pSelLogEntry->m_CommitHash != m_HeadHash)\r
                                if(m_ContextMenuMask&GetContextMenuBit(ID_REBASE_TO_VERSION))\r
@@ -1154,7 +1154,7 @@ void CGitLogListBase::OnContextMenu(CWnd* pWnd, CPoint point)
                                        hash=hash.Left(40);\r
                                        GitRev* pLastEntry = reinterpret_cast<GitRev*>(m_arShownList.GetAt(LastSelect));\r
                                        if(pLastEntry->m_CommitHash == hash)\r
-                                               popup.AppendMenuIcon(ID_COMBINE_COMMIT,_T("Combine to one commit"),IDI_MERGE);\r
+                                               popup.AppendMenuIcon(ID_COMBINE_COMMIT,_T("*Combine to one commit"),IDI_MERGE);\r
                                }\r
                        }\r
                        if (m_hasWC)\r