Changeset 256 for trunk/lib/SVNlog.cc


Ignore:
Timestamp:
Apr 30, 2007, 1:17:36 PM (14 years ago)
Author:
Peter Johansson
Message:

reimplementing some part of print_main_page using Commitment class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SVNlog.cc

    r234 r256  
    2323
    2424#include "SVNlog.h"
     25
     26#include "Commitment.h"
    2527#include "SVN.h"
    2628
     
    4850  }
    4951
     52 
     53  Commitment SVNlog::latest_commit(std::string name) const
     54  {
     55    std::vector<std::string>::const_reverse_iterator iter =
     56      find(author().rbegin(), author().rend(), name);
     57    size_t dist(std::distance(iter, author().rend()));
     58    if (!dist) {
     59      Commitment c;
     60      return c;
     61    }
     62    return Commitment(author()[dist-1], Date(date()[dist-1]),
     63                      message()[dist-1], revision()[dist-1]);
     64                                             
     65  }
    5066
    5167}} // end of namespace svndigest and namespace theplu
Note: See TracChangeset for help on using the changeset viewer.