Changeset 395
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/File.cc
r381 r395 81 81 82 82 83 void File::print_blame(std::ofstream& os ) const83 void File::print_blame(std::ofstream& os, const SVNlog& log) const 84 84 { 85 85 os << "<br><h3>Blame Information</h3>"; … … 96 96 HtmlStream hs(os); 97 97 SVNblame blame(path_); 98 assert(log.date().size()); 99 time_t last = Date(log.date().back()).seconds(); 100 // color is calculated linearly on time, c = kt + m 101 // brightest color (for oldest rev in log) is set to 192. 102 double k = 192.0/(Date(log.date()[0]).seconds()-last); 103 double m = -last*k; 98 104 while (blame.valid()) { 99 os << "<tr>\n<td class=\"number\">" << blame.revision() 100 << "</td>\n<td class=\"date\">" << Date(blame.date())("%e %b %y") 105 std::string color(hex(static_cast<int>(k*Date(blame.date()).seconds()+m), 106 2)); 107 os << "<tr>\n<td class=\"number\"><font color=\"#" << color 108 << color << color << "\">" << blame.revision() 109 << "</td>\n<td class=\"date\"><font color=\"#" << color 110 << color << color << "\">" << Date(blame.date())("%e %b %y") 101 111 << "</td>\n<td class=\"author\">"; 102 112 hs << blame.author(); … … 251 261 os << "</p>\n"; 252 262 253 print_blame(os );263 print_blame(os, log); 254 264 255 265 print_footer(os); -
trunk/lib/File.h
r380 r395 83 83 84 84 /** 85 @brief Print blame output 85 @brief Print blame output 86 86 */ 87 void print_blame(std::ofstream& ) const;87 void print_blame(std::ofstream& os, const SVNlog& log) const; 88 88 89 89 void print_core(bool verbose=false) const; -
trunk/lib/SVNblame.h
r381 r395 60 60 61 61 /** 62 @brief Retrieve the blame datefor the current line.62 @brief Retrieve the author for the current line. 63 63 64 64 If current line is outside blame entries the behaviour is 65 65 undefined. 66 66 67 @return The date.67 @return The author. 68 68 */ 69 69 std::string author(void);
Note: See TracChangeset
for help on using the changeset viewer.