| 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 { return "[options] <repository name>"; } |
| 27 |
|
✗ |
virtual std::vector<std::string> DoGetExamples() const { |
| 28 |
|
✗ |
std::vector<std::string> e; |
| 29 |
|
✗ |
e.push_back("-f myrepo.cvmfs.io " |
| 30 |
|
|
"# abort without asking for confirmation"); |
| 31 |
|
✗ |
return e; |
| 32 |
|
|
} |
| 33 |
|
✗ |
virtual ParameterList GetParams() const { |
| 34 |
|
✗ |
ParameterList p; |
| 35 |
|
✗ |
p.push_back(Parameter::Switch("force", 'f', "Do not ask for confirmation")); |
| 36 |
|
✗ |
return p; |
| 37 |
|
|
} |
| 38 |
|
|
|
| 39 |
|
|
virtual int Main(const Options &options); |
| 40 |
|
|
}; // class CmdAbort |
| 41 |
|
|
|
| 42 |
|
|
} // namespace publish |
| 43 |
|
|
|
| 44 |
|
|
#endif // CVMFS_PUBLISH_CMD_ABORT_H_ |
| 45 |
|
|
|