26 using parser::ParseException;
35 static std::map<std::string,HistoryActionID::ID>
_table;
40 const HistoryActionID HistoryActionID::REPO_ADD(HistoryActionID::REPO_ADD_e);
41 const HistoryActionID HistoryActionID::REPO_REMOVE(HistoryActionID::REPO_REMOVE_e);
42 const HistoryActionID HistoryActionID::REPO_CHANGE_ALIAS(HistoryActionID::REPO_CHANGE_ALIAS_e);
43 const HistoryActionID HistoryActionID::REPO_CHANGE_URL(HistoryActionID::REPO_CHANGE_URL_e);
45 HistoryActionID::HistoryActionID(
const std::string & strval_r)
46 : _id(parse(strval_r))
63 std::map<std::string,HistoryActionID::ID>::const_iterator it =
67 WAR <<
"Unknown history action ID '" + strval_r +
"'";
75 static std::map<ID, std::string>
_table;
89 return _table[
_id].append(7 - _table[
_id].size(),
' ');
94 {
return str <<
id.asString(); }
107 if (fields.size() <= 2)
109 str::form(
"Bad number of fields. Got %zd, expected more than %d.",
137 if (fields.size() != 8)
139 str::form(
"Bad number of fields. Got %zu, expected %u.",
178 if (fields.size() != 6)
180 str::form(
"Bad number of fields. Got %zu, expected %u.",
215 if (fields.size() != 4)
217 str::form(
"Bad number of fields. Got %zu, expected %u.",
248 if (fields.size() != 3)
250 str::form(
"Bad number of fields. Got %zu, expected %u.",
278 if (fields.size() != 4)
280 str::form(
"Bad number of fields. Got %zu, expected %u.",
309 if (fields.size() != 4)
311 str::form(
"Bad number of fields. Got %zu, expected %u.",