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
35 SVNRev revstart = val.IsEmpty() ? SVNRev() : SVNRev(val);
\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
42 SVNRev revend = val.IsEmpty() ? SVNRev() : SVNRev(val);
\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
51 SVNRev pegrev = val.IsEmpty() ? SVNRev() : SVNRev(val);
\r
52 if (!revstart.IsValid())
\r
53 revstart = SVNRev::REV_HEAD;
\r
54 if (!revend.IsValid())
\r
59 CRegDWORD reg = CRegDWORD(_T("Software\\TortoiseSVN\\NumberOfLogs"), 100);
\r
60 limit = (int)(LONG)reg;
\r
62 BOOL bStrict = (DWORD)CRegDWORD(_T("Software\\TortoiseSVN\\LastLogStrict"), FALSE);
\r
63 if (parser.HasKey(_T("strict")))
\r
69 if(pathList.GetCount()>0)
\r
70 g_Git.m_CurrentDir=pathList[0].GetWinPathString();
\r
73 theApp.m_pMainWnd = &dlg;
\r
74 // dlg.SetParams(cmdLinePath, pegrev, revstart, revend, limit, bStrict);
\r
75 // dlg.SetIncludeMerge(!!parser.HasKey(_T("merge")));
\r
76 // val = parser.GetVal(_T("propspath"));
\r
77 // if (!val.IsEmpty())
\r
78 // dlg.SetProjectPropertiesPath(CTSVNPath(val));
\r