Standardized journal messages

- Made journal messages more consistent with one another
This commit is contained in:
Cory Donnelly 2011-03-23 17:28:55 -04:00
parent 4dfa6d3648
commit 437bb95f01

View file

@ -375,7 +375,7 @@ std::string taskDifferences (const Task& before, const Task& after)
std::stringstream out; std::stringstream out;
foreach (name, beforeOnly) foreach (name, beforeOnly)
out << " - " out << " - "
<< *name << ucFirst(*name)
<< " will be deleted.\n"; << " will be deleted.\n";
foreach (name, afterOnly) foreach (name, afterOnly)
@ -385,17 +385,17 @@ std::string taskDifferences (const Task& before, const Task& after)
std::vector <int> deps_after; std::vector <int> deps_after;
after.getDependencies (deps_after); after.getDependencies (deps_after);
std::string to; std::string to;
join (to, ",", deps_after); join (to, ", ", deps_after);
out << " - " out << " - "
<< *name << "Dependencies"
<< " will be set to '" << " will be set to '"
<< to << to
<< "'.\n"; << "'.\n";
} }
else else
out << " - " out << " - "
<< *name << ucFirst(*name)
<< " will be set to '" << " will be set to '"
<< renderAttribute (*name, after.get (*name)) << renderAttribute (*name, after.get (*name))
<< "'.\n"; << "'.\n";
@ -410,15 +410,15 @@ std::string taskDifferences (const Task& before, const Task& after)
std::vector <int> deps_before; std::vector <int> deps_before;
before.getDependencies (deps_before); before.getDependencies (deps_before);
std::string from; std::string from;
join (from, ",", deps_before); join (from, ", ", deps_before);
std::vector <int> deps_after; std::vector <int> deps_after;
after.getDependencies (deps_after); after.getDependencies (deps_after);
std::string to; std::string to;
join (to, ",", deps_after); join (to, ", ", deps_after);
out << " - " out << " - "
<< *name << "Dependencies"
<< " will be changed from '" << " will be changed from '"
<< from << from
<< "' to '" << "' to '"
@ -427,7 +427,7 @@ std::string taskDifferences (const Task& before, const Task& after)
} }
else else
out << " - " out << " - "
<< *name << ucFirst(*name)
<< " will be changed from '" << " will be changed from '"
<< renderAttribute (*name, before.get (*name)) << renderAttribute (*name, before.get (*name))
<< "' to '" << "' to '"
@ -469,7 +469,7 @@ std::string taskInfoDifferences (const Task& before, const Task& after)
std::vector <int> deps_before; std::vector <int> deps_before;
before.getDependencies (deps_before); before.getDependencies (deps_before);
std::string from; std::string from;
join (from, ",", deps_before); join (from, ", ", deps_before);
out << "Dependencies '" out << "Dependencies '"
<< from << from
@ -495,9 +495,9 @@ std::string taskInfoDifferences (const Task& before, const Task& after)
std::vector <int> deps_after; std::vector <int> deps_after;
after.getDependencies (deps_after); after.getDependencies (deps_after);
std::string to; std::string to;
join (to, ",", deps_after); join (to, ", ", deps_after);
out << ucFirst(*name) out << "Dependencies"
<< " set to '" << " set to '"
<< to << to
<< "'.\n"; << "'.\n";
@ -525,14 +525,14 @@ std::string taskInfoDifferences (const Task& before, const Task& after)
std::vector <int> deps_before; std::vector <int> deps_before;
before.getDependencies (deps_before); before.getDependencies (deps_before);
std::string from; std::string from;
join (from, ",", deps_before); join (from, ", ", deps_before);
std::vector <int> deps_after; std::vector <int> deps_after;
after.getDependencies (deps_after); after.getDependencies (deps_after);
std::string to; std::string to;
join (to, ",", deps_after); join (to, ", ", deps_after);
out << ucFirst(*name) out << "Dependencies"
<< " changed from '" << " changed from '"
<< from << from
<< "' to '" << "' to '"
@ -554,7 +554,6 @@ std::string taskInfoDifferences (const Task& before, const Task& after)
<< "'.\n"; << "'.\n";
} }
// Shouldn't just say nothing. // Shouldn't just say nothing.
if (out.str ().length () == 0) if (out.str ().length () == 0)
out << "No changes made.\n"; out << "No changes made.\n";