OSDN Git Service

Merge git://github.com/Jopie64/tortoisegit master
authorFrank Li <lznuaa@gmail.com>
Thu, 4 Jun 2009 11:26:35 +0000 (19:26 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 4 Jun 2009 11:26:35 +0000 (19:26 +0800)
src/Git/GitStatusListCtrl.cpp
src/Resources/TortoiseProcENG.rc
src/TortoiseProc/BrowseRefsDlg.cpp
src/TortoiseProc/BrowseRefsDlg.h
src/TortoiseProc/GitLogListAction.cpp
src/TortoiseProc/ProjectProperties.h
src/TortoiseProc/resource.h

index e538bac..f6acf62 100644 (file)
@@ -5125,7 +5125,7 @@ bool CGitStatusListCtrl::PrepareGroups(bool bForce /* = false */)
 \r
                //if(m_UnRevFileList.GetCount()>0)\r
                {\r
-                       _tcsncpy_s(groupname, 1024, (LPCTSTR)_T("No Version Control"), 1023);\r
+                       _tcsncpy_s(groupname, 1024, (LPCTSTR)_T("Not Versioned"), 1023);\r
                        grp.pszHeader = groupname;\r
                        grp.iGroupId = groupindex;\r
                        grp.uAlign = LVGA_HEADER_LEFT;\r
@@ -5134,7 +5134,7 @@ bool CGitStatusListCtrl::PrepareGroups(bool bForce /* = false */)
 \r
                //if(m_IgnoreFileList.GetCount()>0)\r
                {\r
-                       _tcsncpy_s(groupname, 1024, (LPCTSTR)_T("Ignored File"), 1023);\r
+                       _tcsncpy_s(groupname, 1024, (LPCTSTR)_T("Ignored"), 1023);\r
                        grp.pszHeader = groupname;\r
                        grp.iGroupId = groupindex;\r
                        grp.uAlign = LVGA_HEADER_LEFT;\r
index a58b2fd..666eb93 100644 (file)
Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ
index 05d046c..ab3d3f7 100644 (file)
@@ -10,6 +10,7 @@
 #include "Settings\SettingGitRemote.h"\r
 #include "SinglePropSheetDlg.h"\r
 #include "MessageBox.h"\r
+#include "RefLogDlg.h"\r
 \r
 void SetSortArrow(CListCtrl * control, int nColumn, bool bAscending)\r
 {\r
@@ -509,11 +510,27 @@ void CBrowseRefsDlg::ShowContextMenu(CPoint point, HTREEITEM hTreePos, VectorPSh
 \r
        if(selectedLeafs.size()==1)\r
        {\r
+               bool bShowReflogOption = false;\r
                popupMenu.AppendMenu(MF_STRING,eCmd_ViewLog,L"View log");\r
                if(selectedLeafs[0]->IsFrom(L"refs/heads"))\r
+               {\r
                        popupMenu.AppendMenu(MF_STRING,eCmd_DeleteBranch,L"Delete Branch");\r
+                       bShowReflogOption = true;\r
+               }\r
+               else if(selectedLeafs[0]->IsFrom(L"refs/remotes"))\r
+               {\r
+                       bShowReflogOption = true;\r
+               }\r
                else if(selectedLeafs[0]->IsFrom(L"refs/tags"))\r
+               {\r
                        popupMenu.AppendMenu(MF_STRING,eCmd_DeleteTag,L"Delete Tag");\r
+               }\r
+\r
+               if(bShowReflogOption)\r
+                       popupMenu.AppendMenu(MF_STRING, eCmd_ShowReflog, L"Show Reflog");\r
+\r
+\r
+\r
 \r
 //             CShadowTree* pTree = (CShadowTree*)m_ListRefLeafs.GetItemData(pNMHDR->idFrom);\r
 //             if(pTree==NULL)\r
@@ -560,6 +577,13 @@ void CBrowseRefsDlg::ShowContextMenu(CPoint point, HTREEITEM hTreePos, VectorPSh
                        Refresh();\r
                }\r
                break;\r
+       case eCmd_ShowReflog:\r
+               {\r
+                       CRefLogDlg refLogDlg(this);\r
+                       refLogDlg.m_CurrentBranch = selectedLeafs[0]->GetRefName();\r
+                       refLogDlg.DoModal();\r
+               }\r
+               break;\r
        case eCmd_AddRemote:\r
                {\r
                        CAddRemoteDlg(this).DoModal();\r
index 16391be..5bfa067 100644 (file)
@@ -65,7 +65,8 @@ public:
                eCmd_CreateBranch,\r
                eCmd_CreateTag,\r
                eCmd_DeleteBranch,\r
-               eCmd_DeleteTag\r
+               eCmd_DeleteTag,\r
+               eCmd_ShowReflog\r
        };\r
 \r
        enum eCol\r
index 5b04435..258b197 100644 (file)
@@ -424,7 +424,7 @@ void CGitLogList::ContextMenuAction(int cmd,int FirstSelect, int LastSelect)
                case ID_REFLOG_DEL:\r
                        {       \r
                                CString str;\r
-                               str.Format(_T("Warning: %s will be deleted. It can <ct=0x0000FF><b>NOT</b></ct> recovered,\r\n \r\n Are you sure delete these?"),pSelLogEntry->m_Ref);\r
+                               str.Format(_T("Warning: %s will be permanently deleted. It can <ct=0x0000FF><b>NOT</b></ct> be recovered!\r\n \r\n Are you sure you want to continue?"),pSelLogEntry->m_Ref);\r
                                if(CMessageBox::Show(NULL,str,_T("TortoiseGit"),MB_YESNO|MB_ICONWARNING) == IDYES)\r
                                {\r
                                        CString cmd,out;\r
index ad21796..fdb6736 100644 (file)
@@ -19,6 +19,7 @@
 #pragma once\r
 #include <iostream>\r
 #include <string>\r
+#include <set>\r
 #include "TGitPath.h"\r
 using namespace std;\r
 \r
index e50ec80..bf74599 100644 (file)
Binary files a/src/TortoiseProc/resource.h and b/src/TortoiseProc/resource.h differ