feedback: Use task identifiers instead of IDs

During construction of a feedback string for a dependency change,
a list of IDs of the dependencies was used. However, if the tasks
being referred to are already deleted / completed, their respective
IDs are all 0s.

Use shortened UUIDs in such case.
This commit is contained in:
Tomas Babej 2016-04-03 11:05:32 +02:00 committed by Paul Beckingham
parent 1ebc8034b4
commit 084383a644
3 changed files with 45 additions and 22 deletions

View file

@ -1177,6 +1177,22 @@ void Task::getDependencies (std::vector <std::string>& all) const
all.clear ();
split (all, get ("depends"), ',');
}
////////////////////////////////////////////////////////////////////////////////
void Task::getDependencies (std::vector <Task>& all) const
{
std::vector <std::string> deps;
split (deps, get ("depends"), ',');
all.clear ();
for (auto& dep : deps)
{
Task task;
context.tdb2.get (dep, task);
all.push_back (task);
}
}
#endif
////////////////////////////////////////////////////////////////////////////////