GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/publish/cmd_abort.h
Date: 2024-04-28 02:33:07
Exec Total Coverage
Lines: 0 15 0.0%
Branches: 0 20 0.0%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5 #ifndef CVMFS_PUBLISH_CMD_ABORT_H_
6 #define CVMFS_PUBLISH_CMD_ABORT_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "publish/command.h"
12
13 namespace publish {
14
15 class CmdAbort : public Command {
16 public:
17 virtual std::string GetName() const { return "abort"; }
18 virtual std::string GetBrief() const {
19 return "Abort the currently open transaction";
20 }
21 virtual std::string GetDescription() const {
22 return "Returns to the state before the current transaction was opened. "
23 "All changes staged in the current transaction are discarded. "
24 "Repositories attached to a gateway return their lease.";
25 }
26 virtual std::string GetUsage() const {
27 return "[options] <repository name>";
28 }
29 virtual std::vector<std::string> DoGetExamples() const {
30 std::vector<std::string> e;
31 e.push_back("-f myrepo.cvmfs.io "
32 "# abort without asking for confirmation");
33 return e;
34 }
35 virtual ParameterList GetParams() const {
36 ParameterList p;
37 p.push_back(Parameter::Switch("force", 'f',
38 "Do not ask for confirmation"));
39 return p;
40 }
41
42 virtual int Main(const Options &options);
43 }; // class CmdAbort
44
45 } // namespace publish
46
47 #endif // CVMFS_PUBLISH_CMD_ABORT_H_
48