1 // TortoiseSVN - a Windows shell extension for easy version control
\r
3 // Copyright (C) 2007-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 "LogCommand.h"
\r
24 bool LogCommand::Execute()
\r
26 //the log command line looks like this:
\r
27 //command:log path:<path_to_file_or_directory_to_show_the_log_messages> [startrev:<startrevision>] [endrev:<endrevision>]
\r
29 CString val = parser.GetVal(_T("startrev"));
\r
30 if ( val.IsEmpty() )
\r
32 // support deprecated parameter prior 1.5.0
\r
33 val = parser.GetVal(_T("revstart"));
\r
36 val = parser.GetVal(_T("endrev"));
\r
37 if ( val.IsEmpty() )
\r
39 // support deprecated parameter prior 1.5.0
\r
40 val = parser.GetVal(_T("revend"));
\r
43 val = parser.GetVal(_T("limit"));
\r
44 int limit = _tstoi(val);
\r
45 val = parser.GetVal(_T("pegrev"));
\r
46 if ( val.IsEmpty() )
\r
48 // support deprecated parameter prior 1.5.0
\r
49 val = parser.GetVal(_T("revpeg"));
\r
55 SVNRev pegrev = val.IsEmpty() ? SVNRev() : SVNRev(val);
\r
56 if (!revstart.IsValid())
\r
57 revstart = SVNRev::REV_HEAD;
\r
58 if (!revend.IsValid())
\r
64 CRegDWORD reg = CRegDWORD(_T("Software\\TortoiseGit\\NumberOfLogs"), 100);
\r
65 limit = (int)(LONG)reg;
\r
69 theApp.m_pMainWnd = &dlg;
\r
70 //dlg.SetParams(cmdLinePath);
\r
71 dlg.SetParams(cmdLinePath, pegrev, revstart, revend, limit);
\r
72 // dlg.SetIncludeMerge(!!parser.HasKey(_T("merge")));
\r
73 // val = parser.GetVal(_T("propspath"));
\r
74 // if (!val.IsEmpty())
\r
75 // dlg.SetProjectPropertiesPath(CTSVNPath(val));
\r