GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/publish/cmd_tag.h
Date: 2026-06-28 02:36:10
Exec Total Coverage
Lines: 0 14 0.0%
Branches: 0 38 0.0%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5 #ifndef CVMFS_PUBLISH_CMD_TAG_H_
6 #define CVMFS_PUBLISH_CMD_TAG_H_
7
8 #include <string>
9
10 #include "publish/command.h"
11
12 namespace publish {
13
14 class CmdTag : public Command {
15 public:
16 virtual std::string GetName() const { return "tag"; }
17 virtual std::string GetBrief() const {
18 return "Add or remove named snapshots (tags) of a gateway repository";
19 }
20 virtual std::string GetDescription() const {
21 return "Edits the tag database of a repository connected to a CernVM-FS "
22 "gateway. As the publisher has no direct write access to the "
23 "storage, a lease is acquired and the change is applied by the "
24 "gateway receiver in a single commit. The repository catalog is "
25 "left unchanged. This command is used internally by "
26 "'cvmfs_server tag' for gateway repositories.";
27 }
28 virtual std::string GetUsage() const {
29 return "[options] <repository name>";
30 }
31 virtual ParameterList GetParams() const {
32 ParameterList p;
33 p.push_back(Parameter::Optional("add", 'a', "tag name",
34 "Name of the tag to add for the current "
35 "repository revision"));
36 p.push_back(Parameter::Optional("description", 'D', "description",
37 "Description of the tag to add"));
38 p.push_back(Parameter::Optional("remove", 'd', "tag names",
39 "Space-separated list of tags to remove"));
40 return p;
41 }
42 virtual unsigned GetMinPlainArgs() const { return 1; }
43
44 virtual int Main(const Options &options);
45 }; // class CmdTag
46
47 } // namespace publish
48
49 #endif // CVMFS_PUBLISH_CMD_TAG_H_
50