1 // TortoiseSVN - a Windows shell extension for easy version control
\r
3 // Copyright (C) 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
20 #include "ShowCompareCommand.h"
\r
21 #include "SVNDiff.h"
\r
24 bool ShowCompareCommand::Execute()
\r
27 SVNDiff diff(NULL, hwndExplorer);
\r
34 CTSVNPath url1 = CTSVNPath(parser.GetVal(_T("url1")));
\r
35 CTSVNPath url2 = CTSVNPath(parser.GetVal(_T("url2")));
\r
36 bool ignoreancestry = !!parser.HasKey(_T("ignoreancestry"));
\r
37 bool blame = !!parser.HasKey(_T("blame"));
\r
38 bool unified = !!parser.HasKey(_T("unified"));
\r
40 if (parser.HasVal(_T("revision1")))
\r
41 rev1 = SVNRev(parser.GetVal(_T("revision1")));
\r
42 if (parser.HasVal(_T("revision2")))
\r
43 rev2 = SVNRev(parser.GetVal(_T("revision2")));
\r
44 if (parser.HasVal(_T("pegrevision")))
\r
45 pegrev = SVNRev(parser.GetVal(_T("pegrevision")));
\r
46 if (parser.HasVal(_T("headpegrevision")))
\r
47 diff.SetHEADPeg(SVNRev(parser.GetVal(_T("headpegrevision"))));
\r
48 diff.SetAlternativeTool(!!parser.HasKey(_T("alternatediff")));
\r
51 bRet = diff.ShowUnifiedDiff(url1, rev1, url2, rev2, pegrev, ignoreancestry);
\r
53 bRet = diff.ShowCompare(url1, rev1, url2, rev2, pegrev, ignoreancestry, blame);
\r