OSDN Git Service

Fix setup will launch old version msi to remove old version.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / Blame.cpp
index 2eaab88..33658f9 100644 (file)
@@ -20,7 +20,7 @@
 #include "TortoiseProc.h"\r
 #include "Blame.h"\r
 #include "ProgressDlg.h"\r
-#include "TSVNPath.h"\r
+#include "TGitPath.h"\r
 #include "Registry.h"\r
 #include "UnicodeUtils.h"\r
 #include "TempFile.h"\r
@@ -36,16 +36,18 @@ CBlame::CBlame()
 }\r
 CBlame::~CBlame()\r
 {\r
-       m_progressDlg.Stop();\r
+//     m_progressDlg.Stop();\r
 }\r
 \r
-BOOL CBlame::BlameCallback(LONG linenumber, svn_revnum_t revision, const CString& author, const CString& date,\r
-                                                  svn_revnum_t merged_revision, const CString& merged_author, const CString& merged_date, const CString& merged_path,\r
+BOOL CBlame::BlameCallback(LONG linenumber, git_revnum_t revision, const CString& author, const CString& date,\r
+                                                  git_revnum_t merged_revision, const CString& merged_author, const CString& merged_date, const CString& merged_path,\r
                                                   const CStringA& line)\r
 {\r
+\r
+#if 0\r
        CStringA infolineA;\r
        CStringA fulllineA;\r
-       svn_revnum_t origrev = revision;\r
+       git_revnum_t origrev = revision;\r
 \r
        if (((m_lowestrev < 0)||(m_lowestrev > revision))&&(revision >= 0))\r
                m_lowestrev = revision;\r
@@ -90,10 +92,12 @@ BOOL CBlame::BlameCallback(LONG linenumber, svn_revnum_t revision, const CString
        }\r
        else\r
                return FALSE;\r
+#endif\r
        return TRUE;\r
 }\r
 \r
-BOOL CBlame::Log(svn_revnum_t revision, const CString& /*author*/, const CString& /*date*/, const CString& message, LogChangedPathArray * /*cpaths*/, apr_time_t /*time*/, int /*filechanges*/, BOOL /*copies*/, DWORD /*actions*/, BOOL /*children*/)\r
+#if 0\r
+BOOL CBlame::Log(git_revnum_t revision, const CString& /*author*/, const CString& /*date*/, const CString& message, LogChangedPathArray * /*cpaths*/, apr_time_t /*time*/, int /*filechanges*/, BOOL /*copies*/, DWORD /*actions*/, BOOL /*children*/)\r
 {\r
        m_progressDlg.SetProgress(m_highestrev - revision, m_highestrev);\r
        if (m_saveLog.m_hFile != INVALID_HANDLE_VALUE)\r
@@ -106,22 +110,24 @@ BOOL CBlame::Log(svn_revnum_t revision, const CString& /*author*/, const CString
        }\r
        return TRUE;\r
 }\r
+#endif\r
 \r
 BOOL CBlame::Cancel()\r
 {\r
-       if (m_progressDlg.HasUserCancelled())\r
-               m_bCancelled = TRUE;\r
+//     if (m_progressDlg.HasUserCancelled())\r
+//             m_bCancelled = TRUE;\r
        return m_bCancelled;\r
 }\r
 \r
-CString CBlame::BlameToTempFile(const CTSVNPath& path, SVNRev startrev, SVNRev endrev, SVNRev pegrev, \r
+CString CBlame::BlameToTempFile(const CTGitPath& path, GitRev startrev, GitRev endrev, GitRev pegrev, \r
                                                                CString& logfile, const CString& options, BOOL includemerge, \r
                                                                BOOL showprogress, BOOL ignoremimetype)\r
 {\r
+#if 0\r
        // if the user specified to use another tool to show the blames, there's no\r
        // need to fetch the log later: only TortoiseBlame uses those logs to give \r
        // the user additional information for the blame.\r
-       BOOL extBlame = CRegDWORD(_T("Software\\TortoiseSVN\\TextBlame"), FALSE);\r
+       BOOL extBlame = CRegDWORD(_T("Software\\TortoiseGit\\TextBlame"), FALSE);\r
 \r
        CString temp;\r
        m_sSavePath = CTempFiles::Instance().GetTempFilePath(false).GetWinPathString();\r
@@ -180,7 +186,7 @@ CString CBlame::BlameToTempFile(const CTSVNPath& path, SVNRev startrev, SVNRev e
                        logfile.Empty();\r
                        return m_sSavePath;\r
                }\r
-               BOOL bRet = ReceiveLog(CTSVNPathList(path), pegrev, m_nHeadRev, m_lowestrev, 0, FALSE, m_bHasMerges, false);\r
+               BOOL bRet = ReceiveLog(CTGitPathList(path), pegrev, m_nHeadRev, m_lowestrev, 0, FALSE, m_bHasMerges, false);\r
                if (!bRet)\r
                {\r
                        m_saveLog.Close();\r
@@ -195,10 +201,11 @@ CString CBlame::BlameToTempFile(const CTSVNPath& path, SVNRev startrev, SVNRev e
        m_progressDlg.Stop();\r
        if (m_saveFile.m_hFile != INVALID_HANDLE_VALUE)\r
                m_saveFile.Close();\r
-\r
+#endif;\r
        return m_sSavePath;\r
 }\r
-BOOL CBlame::Notify(const CTSVNPath& /*path*/, svn_wc_notify_action_t /*action*/, \r
+#if 0\r
+BOOL CBlame::Notify(const CTGitPath& /*path*/, svn_wc_notify_action_t /*action*/, \r
                                        svn_node_kind_t /*kind*/, const CString& /*mime_type*/, \r
                                        svn_wc_notify_state_t /*content_state*/, \r
                                        svn_wc_notify_state_t /*prop_state*/, LONG rev,\r
@@ -209,9 +216,9 @@ BOOL CBlame::Notify(const CTSVNPath& /*path*/, svn_wc_notify_action_t /*action*/
        m_progressDlg.SetProgress(rev, m_nHeadRev);\r
        return TRUE;\r
 }\r
-\r
-bool CBlame::BlameToFile(const CTSVNPath& path, SVNRev startrev, SVNRev endrev, SVNRev peg, \r
-                                                const CTSVNPath& tofile, const CString& options, BOOL ignoremimetype, BOOL includemerge)\r
+#endif\r
+bool CBlame::BlameToFile(const CTGitPath& path, GitRev startrev, GitRev endrev, GitRev peg, \r
+                                                const CTGitPath& tofile, const CString& options, BOOL ignoremimetype, BOOL includemerge)\r
 {\r
        CString temp;\r
        if (!m_saveFile.Open(tofile.GetWinPathString(), CFile::typeText | CFile::modeReadWrite | CFile::modeCreate))\r