Better reporting
[vng.git] / UnRecord.cpp
blob83b36294c4e1724391c2373c88a61203f810f1c1
1 /*
2 * This file is part of the vng project
3 * Copyright (C) 2008 Thomas Zander <tzander@trolltech.com>
4 * Copyright (C) 2003-2005 David Roundy
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "UnRecord.h"
21 // #include "CommandLineParser.h"
22 #include "Interview.h"
23 // #include "GitRunner.h"
24 #include "Logger.h"
25 #include "commits/Commit.h"
26 #include "commits/CommitsCursor.h"
28 #include <QDebug>
30 UnRecord::UnRecord()
31 :AbstractCommand("unrecord")
35 QString UnRecord::argumentDescription() const
37 return QString();
40 QString UnRecord::commandDescription() const
42 return "UnRecord does the opposite of record in that it makes the changes from\n"
43 "patches active changes again which you may record or revert later. The\n"
44 "working copy itself will not change.\n";
47 AbstractCommand::ReturnCodes UnRecord::run()
49 if (! checkInRepository())
50 return NotInRepo;
51 //CommandLineParser *args = CommandLineParser::instance();
53 CommitsCursor cursor;
54 Interview interview(cursor, name());
55 interview.setUsePager(shouldUsePager());
56 if (! interview.start()) {
57 Logger::info() << "unrecord cancelled." << endl;
58 return Ok;
61 return Ok;