OSDN Git Service

Use ACP replace OEMCP.
authorFrank Li <lznuaa@gmail.com>
Fri, 3 Apr 2009 02:43:16 +0000 (10:43 +0800)
committerFrank Li <lznuaa@gmail.com>
Fri, 3 Apr 2009 02:43:16 +0000 (10:43 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
13 files changed:
src/Git/Git.cpp
src/Git/GitStatusListCtrl.cpp
src/Git/TGitPath.cpp
src/TortoiseProc/Commands/AddCommand.cpp
src/TortoiseProc/Commands/DropMoveCommand.cpp
src/TortoiseProc/Commands/FormatPatchCommand.cpp
src/TortoiseProc/Commands/ImportPatchCommand.cpp
src/TortoiseProc/Commands/MergeCommand.cpp
src/TortoiseProc/Commands/RemoveCommand.cpp
src/TortoiseProc/Commands/RenameCommand.cpp
src/TortoiseProc/Commands/RevertCommand.cpp
src/TortoiseProc/CommitDlg.cpp
src/TortoiseProc/SVNProgressDlg.cpp

index 2ec2733..b1eefc7 100644 (file)
@@ -1062,23 +1062,23 @@ int CGit::Revert(CTGitPath &path,bool keep)
        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
+               if(g_Git.Run(cmd,&out,CP_ACP))\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
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                        return -1;\r
                \r
                cmd.Format(_T("git.exe checkout HEAD -f -- \"%s\""),path.GetGitOldPathString());\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                        return -1;\r
        }\r
        else\r
        {\r
                cmd.Format(_T("git.exe checkout HEAD -f -- \"%s\""),path.GetGitPathString());\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                        return -1;\r
        }\r
        return 0;\r
index aadb314..40de313 100644 (file)
@@ -2694,7 +2694,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                                                CString cmd;\r
                                                cmd.Format(_T("git.exe add %s"),path->GetGitPathString());\r
                                                CString output;\r
-                                               if(!g_Git.Run(cmd,&output,CP_OEMCP))\r
+                                               if(!g_Git.Run(cmd,&output,CP_ACP))\r
                                                {\r
                                                        path->m_Action = CTGitPath::LOGACTIONS_ADDED;\r
                                                        SetEntryCheck(path,index,true);\r
@@ -2751,7 +2751,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                                                {\r
                                                        CString cmd,output;\r
                                                        cmd.Format(_T("git.exe add \"%s\""),fentry->GetGitPathString());\r
-                                                       if(g_Git.Run(cmd,&output,CP_OEMCP))\r
+                                                       if(g_Git.Run(cmd,&output,CP_ACP))\r
                                                        {\r
                                                                CMessageBox::Show(m_hWnd, output, _T("TortoiseSVN"), MB_ICONERROR);\r
                                                        }else\r
index c74f16d..94846fc 100644 (file)
@@ -890,7 +890,7 @@ int CTGitPathList::ParserFromLsFile(BYTE_VECTOR &out,bool staged)
                one.Empty();\r
                path.Reset();\r
 \r
-               g_Git.StringAppend(&one,&out[pos],CP_OEMCP);\r
+               g_Git.StringAppend(&one,&out[pos],CP_ACP);\r
                int tabstart=0;\r
                path.m_Action=path.ParserAction(out[pos]);\r
                one.Tokenize(_T("\t"),tabstart); \r
@@ -957,7 +957,7 @@ int CTGitPathList::FillUnRev(int action,CTGitPathList *list)
                while( pos>=0 && pos<out.size())\r
                {\r
                        one.Empty();\r
-                       g_Git.StringAppend(&one,&out[pos],CP_OEMCP);\r
+                       g_Git.StringAppend(&one,&out[pos],CP_ACP);\r
                        if(!one.IsEmpty())\r
                        {\r
                                //SetFromGit will clear all status\r
@@ -1025,9 +1025,9 @@ int CTGitPathList::ParserFromLog(BYTE_VECTOR &log)
                        CString pathname2;\r
 \r
                        if( file1>=0 )\r
-                               g_Git.StringAppend(&pathname1,&log[file1],CP_OEMCP);\r
+                               g_Git.StringAppend(&pathname1,&log[file1],CP_ACP);\r
                        if( file2>=0 )\r
-                               g_Git.StringAppend(&pathname2,&log[file2],CP_OEMCP);\r
+                               g_Git.StringAppend(&pathname2,&log[file2],CP_ACP);\r
 \r
                        CTGitPath *GitPath=LookForGitPath(pathname1);\r
 \r
@@ -1076,18 +1076,18 @@ int CTGitPathList::ParserFromLog(BYTE_VECTOR &log)
                        if(log[pos] == 0) //rename\r
                        {\r
                                pos++;\r
-                               g_Git.StringAppend(&file2,&log[pos],CP_OEMCP);\r
+                               g_Git.StringAppend(&file2,&log[pos],CP_ACP);\r
                                int sec=log.find(0,pos);\r
                                if(sec>=0)\r
                                {\r
                                        sec++;\r
-                                       g_Git.StringAppend(&file1,&log[sec],CP_OEMCP);\r
+                                       g_Git.StringAppend(&file1,&log[sec],CP_ACP);\r
                                }\r
                                pos=sec;\r
 \r
                        }else\r
                        {\r
-                               g_Git.StringAppend(&file1,&log[pos],CP_OEMCP);\r
+                               g_Git.StringAppend(&file1,&log[pos],CP_ACP);\r
                        }\r
                        path.SetFromGit(file1,&file2);\r
        \r
index 984a377..bce2411 100644 (file)
@@ -61,7 +61,7 @@ bool AddCommand::Execute()
                                for(int i=0;i<dlg.m_pathList.GetCount();i++)\r
                                {\r
                                        cmd.Format(_T("git.exe add \"%s\""),dlg.m_pathList[i].GetGitPathString());\r
-                                       if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+                                       if(g_Git.Run(cmd,&out,CP_ACP))\r
                                        {\r
                                                CMessageBox::Show(NULL,out,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
                                        }\r
index 84415cd..61adaf9 100644 (file)
@@ -93,7 +93,7 @@ bool DropMoveCommand::Execute()
                CString cmd,out;\r
                \r
                cmd.Format(_T("git.exe mv \"%s\" \"%s\""),pathList[nPath].GetGitPathString(),destPath.GetGitPathString());\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                {\r
                        if (CMessageBox::Show(hwndExplorer, out, _T("TortoiseGit"), MB_YESNO)==IDYES)\r
                        {\r
index 2756b32..05bf75f 100644 (file)
@@ -54,7 +54,7 @@ bool FormatPatchCommand::Execute()
                        );\r
 \r
                CString out;\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                {\r
                        CMessageBox::Show(NULL,out,_T("TortoiseGit"),MB_OK);\r
                }\r
index 91a35fe..2737153 100644 (file)
@@ -38,7 +38,7 @@ bool ImportPatchCommand::Execute()
                {                       \r
                        cmd.Format(_T("git.exe am \"%s\""),dlg.m_PathList[i].GetGitPathString());\r
                        \r
-                       if(g_Git.Run(cmd,&output,CP_OEMCP))\r
+                       if(g_Git.Run(cmd,&output,CP_ACP))\r
                        {\r
                                CMessageBox::Show(NULL,output,_T("TortoiseGit"),MB_OK);\r
                                return FALSE;\r
index 2b35fcc..ff5a530 100644 (file)
@@ -43,7 +43,7 @@ bool MergeCommand::Execute()
                        dlg.m_VersionName);\r
 \r
                CString output;\r
-               g_Git.Run(cmd,&output,CP_OEMCP);\r
+               g_Git.Run(cmd,&output,CP_ACP);\r
 \r
                CMessageBox::Show(NULL,output,_T("TortoiseGit"),MB_OK);\r
        }\r
index c57cfa8..fd61d80 100644 (file)
@@ -140,7 +140,7 @@ bool RemoveCommand::Execute()
        {\r
 \r
                cmd.Format(format,pathList[nPath].GetGitPathString());\r
-               if(g_Git.Run(cmd,&output,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&output,CP_ACP))\r
                {\r
                        key=CMessageBox::Show(hwndExplorer, output, _T("TortoiseGit"), MB_ICONERROR|MB_OKCANCEL);\r
                        if(key == IDCANCEL)\r
index b4a4e6d..e39479d 100644 (file)
@@ -56,7 +56,7 @@ bool RenameCommand::Execute()
                                        cmdLinePath.GetGitPathString(),\r
                                        sNewName);\r
                                                                        \r
-       if(g_Git.Run(cmd,&output,CP_OEMCP))\r
+       if(g_Git.Run(cmd,&output,CP_ACP))\r
        {\r
                CMessageBox::Show(hwndExplorer, output, _T("TortoiseGit"), MB_OK);\r
        }\r
index 62b9a73..32827c7 100644 (file)
@@ -37,7 +37,7 @@ bool RevertCommand::Execute()
                for(int i=0;i< dlg.m_selectedPathList.GetCount() ;i++)\r
                {\r
                        cmd.Format(_T("git.exe checkout -f -- \"%s\""),dlg.m_selectedPathList[i].GetGitPathString());\r
-                       if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+                       if(g_Git.Run(cmd,&out,CP_ACP))\r
                        {\r
                                CMessageBox::Show(NULL,out,_T("TortoiseGit"),MB_OK);\r
                        }\r
index 0ad7345..b9f792a 100644 (file)
@@ -406,7 +406,7 @@ void CCommitDlg::OnOK()
                        else\r
                                cmd.Format(_T("git.exe update-index  -- \"%s\""),entry->GetGitPathString());\r
 \r
-                       g_Git.Run(cmd,&out,CP_OEMCP);\r
+                       g_Git.Run(cmd,&out,CP_ACP);\r
                        nchecked++;\r
 \r
                        //checkedLists.insert(entry->GetGitPathString());\r
@@ -418,12 +418,12 @@ void CCommitDlg::OnOK()
                        if(entry->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\""),entry->GetGitPathString());\r
-                               g_Git.Run(cmd,&out,CP_OEMCP);   \r
+                               g_Git.Run(cmd,&out,CP_ACP);     \r
                        }\r
                        else\r
                        {\r
                                cmd.Format(_T("git.exe reset -- %s"),entry->GetGitPathString());\r
-                               g_Git.Run(cmd,&out,CP_OEMCP);\r
+                               g_Git.Run(cmd,&out,CP_ACP);\r
                        }\r
 \r
                //      uncheckedfiles += _T("\"")+entry->GetGitPathString()+_T("\" ");\r
index 00c7a38..1db965e 100644 (file)
@@ -1778,7 +1778,7 @@ bool CGitProgressDlg::CmdAdd(CString& sWindowTitle, bool& localoperation)
        {\r
                CString cmd,out;\r
                cmd.Format(_T("git.exe add -f \"%s\""),m_targetPathList[i].GetGitPathString());\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                {\r
                        CMessageBox::Show(NULL,out,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
                        m_bErrorsOccurred=true;\r
@@ -2329,7 +2329,7 @@ bool CGitProgressDlg::CmdResolve(CString& sWindowTitle, bool& localoperation)
        {\r
                CString cmd,out,tempmergefile;\r
                cmd.Format(_T("git.exe add -f \"%s\""),m_targetPathList[i].GetGitPathString());\r
-               if(g_Git.Run(cmd,&out,CP_OEMCP))\r
+               if(g_Git.Run(cmd,&out,CP_ACP))\r
                {\r
                        CMessageBox::Show(NULL,out,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
                        m_bErrorsOccurred=true;\r