1 // TortoiseMerge - a Diff/Patch program
\r
3 // Copyright (C) 2006-2008 - TortoiseSVN
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
21 #include "svn_diff.h"
\r
22 #include "apr_pools.h"
\r
23 #include "FileTextLines.h"
\r
24 #include "Registry.h"
\r
25 #include "WorkingFile.h"
\r
26 #include "ViewData.h"
\r
30 #define DIFF_EMPTYLINENUMBER ((DWORD)-1)
\r
32 * \ingroup TortoiseMerge
\r
33 * Main class for handling diffs.
\r
39 virtual ~CDiffData(void);
\r
43 void SetBlame(bool bBlame = true) {m_bBlame = bBlame;}
\r
45 int GetLineActualLength(int index);
\r
46 LPCTSTR GetLineChars(int index);
\r
47 CString GetError() const {return m_sError;}
\r
49 bool IsBaseFileInUse() const { return m_baseFile.InUse(); }
\r
50 bool IsTheirFileInUse() const { return m_theirFile.InUse(); }
\r
51 bool IsYourFileInUse() const { return m_yourFile.InUse(); }
\r
54 bool DoTwoWayDiff(const CString& sBaseFilename, const CString& sYourFilename, DWORD dwIgnoreWS, bool bIgnoreEOL, apr_pool_t * pool);
\r
55 bool DoThreeWayDiff(const CString& sBaseFilename, const CString& sYourFilename, const CString& sTheirFilename, DWORD dwIgnoreWS, bool bIgnoreEOL, bool bIgnoreCase,apr_pool_t * pool);
\r
59 CWorkingFile m_baseFile;
\r
60 CWorkingFile m_theirFile;
\r
61 CWorkingFile m_yourFile;
\r
62 CWorkingFile m_mergedFile;
\r
64 CString m_sDiffFile;
\r
65 CString m_sPatchPath;
\r
66 CString m_sPatchOriginal;
\r
67 CString m_sPatchPatched;
\r
70 CFileTextLines m_arBaseFile;
\r
71 CFileTextLines m_arTheirFile;
\r
72 CFileTextLines m_arYourFile;
\r
74 CViewData m_YourBaseBoth; ///< one-pane view, diff between 'yours' and 'base' (in three-pane view: right view)
\r
75 CViewData m_YourBaseLeft; ///< two-pane view, diff between 'yours' and 'base', left view
\r
76 CViewData m_YourBaseRight; ///< two-pane view, diff between 'yours' and 'base', right view
\r
78 CViewData m_TheirBaseBoth; ///< one-pane view, diff between 'theirs' and 'base' (in three-pane view: left view)
\r
79 CViewData m_TheirBaseLeft; ///< two-pane view, diff between 'theirs' and 'base', left view
\r
80 CViewData m_TheirBaseRight; ///< two-pane view, diff between 'theirs' and 'base', right view
\r
82 CViewData m_Diff3; ///< thee-pane view, bottom pane
\r
84 // the following three arrays are used to check for conflicts even in case the
\r
85 // user has ignored spaces/eols.
\r
86 CStdDWORDArray m_arDiff3LinesBase;
\r
87 CStdDWORDArray m_arDiff3LinesYour;
\r
88 CStdDWORDArray m_arDiff3LinesTheir;
\r
92 static int abort_on_pool_failure (int retcode);
\r