Changeset 288 for trunk


Ignore:
Timestamp:
May 7, 2007, 6:22:33 PM (14 years ago)
Author:
Peter Johansson
Message:

declaring more functions in Trac class. refs #178 and #180.

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Trac.cc

    r287 r288  
    3939    std::string::const_iterator first(str.begin());
    4040    while (first!=str.end()) {
    41       std::string::const_iterator begin(first);
     41      if (log(first, str.end()))
     42        continue;
    4243      if (ticket(first, str.end()))
    4344        continue;
     
    7071  }
    7172
     73
     74  bool Trac::log(std::string::const_iterator& first,
     75                 const std::string::const_iterator& last)
     76  {
     77    if (first==last)
     78      return false;
     79
     80    const std::string::const_iterator first_orig(first);
     81    if (*first != '#')
     82      return false;
     83    ++first;
     84    std::string ticket;
     85    for (;first!=last && isdigit(*first); ++first)
     86      ticket.append(1,*first);
     87
     88    if (ticket.empty())
     89      return false;
     90
     91    Configuration* conf = Configuration::instance();
     92    hs_.stream() << anchor(conf->trac_ticket()+ticket,"#"+ticket);
     93    return true;
     94  }
     95
    7296}} // end of namespace svndigest and namespace theplu
  • trunk/lib/Trac.h

    r286 r288  
    5050
    5151  private:
     52    bool changeset(std::string::const_iterator& first,
     53                   const std::string::const_iterator& last);
     54
     55    bool comment(std::string::const_iterator& first,
     56                 const std::string::const_iterator& last);
     57
     58    bool log(std::string::const_iterator& first,
     59             const std::string::const_iterator& last);
     60
     61    bool milestone(std::string::const_iterator& first,
     62                   const std::string::const_iterator& last);
     63
     64    bool source(std::string::const_iterator& first,
     65                const std::string::const_iterator& last);
     66
    5267    /// if range (first, last) starts with /#[:digit:]*/ a ticket link
    5368    /// is written;
Note: See TracChangeset for help on using the changeset viewer.