1 |
|
|
/** |
2 |
|
|
* This file is part of the CernVM File System. |
3 |
|
|
*/ |
4 |
|
|
|
5 |
|
|
#ifndef CVMFS_SWISSKNIFE_DIFF_H_ |
6 |
|
|
#define CVMFS_SWISSKNIFE_DIFF_H_ |
7 |
|
|
|
8 |
|
|
#include <stdint.h> |
9 |
|
|
|
10 |
|
|
#include <string> |
11 |
|
|
|
12 |
|
|
#include "history.h" |
13 |
|
|
#include "shortstring.h" |
14 |
|
|
#include "swissknife.h" |
15 |
|
|
#include "util/pointer.h" |
16 |
|
|
|
17 |
|
|
namespace catalog { |
18 |
|
|
class SimpleCatalogManager; |
19 |
|
|
} |
20 |
|
|
|
21 |
|
|
namespace swissknife { |
22 |
|
|
|
23 |
|
|
class CommandDiff : public Command { |
24 |
|
|
public: |
25 |
|
|
CommandDiff() {} |
26 |
|
|
~CommandDiff(); |
27 |
|
|
virtual std::string GetName() const { return "diff"; } |
28 |
|
|
virtual std::string GetDescription() const { |
29 |
|
|
return "Show changes between two revisions"; |
30 |
|
|
} |
31 |
|
|
ParameterList GetParams() const; |
32 |
|
|
int Main(const ArgumentList &args); |
33 |
|
|
|
34 |
|
|
private: |
35 |
|
|
/** |
36 |
|
|
* Tag names beginning with @ are interpreted as raw hashes |
37 |
|
|
*/ |
38 |
|
|
static const char kRawHashSymbol = '@'; |
39 |
|
|
|
40 |
|
|
history::History::Tag GetTag(const std::string &tag_name); |
41 |
|
|
|
42 |
|
|
UniquePtr<history::History> history_; |
43 |
|
|
}; // class CommandDiff |
44 |
|
|
|
45 |
|
|
} // namespace swissknife |
46 |
|
|
|
47 |
|
|
#endif // CVMFS_SWISSKNIFE_DIFF_H_ |