Changeset 768 for trunk/lib


Ignore:
Timestamp:
Jan 31, 2009, 10:30:37 PM (13 years ago)
Author:
Peter Johansson
Message:

Merged patch release 0.6.7 to trunk. Delta 0.6.7 - 0.6.6

Location:
trunk/lib
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Alias.cc

    r693 r768  
    22
    33/*
    4   Copyright (C) 2007 Peter Johansson
     4  Copyright (C) 2007, 2008 Peter Johansson
    55
    66  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Alias.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/ColumnStream.cc

    r693 r768  
    22
    33/*
    4   Copyright (C) 2007 Peter Johansson
     4  Copyright (C) 2007, 2008 Peter Johansson
    55
    66  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/ColumnStream.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88  Copyright (C) 2008 Jari Häkkinen
    99
  • trunk/lib/Commitment.cc

    r693 r768  
    22
    33/*
    4   Copyright (C) 2007 Peter Johansson
     4  Copyright (C) 2007, 2008 Peter Johansson
    55
    66  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Commitment.h

    r756 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Configuration.cc

    r745 r768  
    22
    33/*
    4   Copyright (C) 2007 Peter Johansson
     4  Copyright (C) 2007, 2008 Peter Johansson
    55  Copyright (C) 2008 Jari Häkkinen
    66
  • trunk/lib/Configuration.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Date.cc

    r754 r768  
    33/*
    44  Copyright (C) 2007 Peter Johansson
    5   Copyright (C) 2008 Jari Häkkinen
     5  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    66  Copyright (C) 2009 Peter Johansson
    77
  • trunk/lib/Date.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Gnuplot.h

    r693 r768  
    66/*
    77  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2007, 2008 Peter Johansson
    89
    910  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/GnuplotFE.cc

    r693 r768  
    44  Copyright (C) 2006 Jari Häkkinen
    55  Copyright (C) 2007 Peter Johansson
    6   Copyright (C) 2008 Jari Häkkinen
     6  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    77
    88  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/GnuplotFE.h

    r693 r768  
    77  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    88  Copyright (C) 2007 Peter Johansson
    9   Copyright (C) 2008 Jari Häkkinen
     9  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    1010
    1111  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/HtmlStream.cc

    r693 r768  
    33/*
    44  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2008 Peter Johansson
    56
    67  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/HtmlStream.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Makefile.am

    r746 r768  
    55# Copyright (C) 2005 Jari Häkkinen
    66# Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    7 # Copyright (C) 2007 Peter Johansson
     7# Copyright (C) 2007, 2008 Peter Johansson
    88# Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    99# Copyright (C) 2009 Peter Johansson
  • trunk/lib/SVNblame.cc

    r693 r768  
    44  Copyright (C) 2006 Jari Häkkinen
    55  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     6  Copyright (C) 2008 Peter Johansson
    67
    78  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNblame.h

    r693 r768  
    77  Copyright (C) 2006 Jari Häkkinen
    88  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     9  Copyright (C) 2008 Peter Johansson
    910
    1011  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNinfo.cc

    r693 r768  
    44  Copyright (C) 2006 Jari Häkkinen
    55  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     6  Copyright (C) 2008 Peter Johansson
    67
    78  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNinfo.h

    r693 r768  
    77  Copyright (C) 2006 Jari Häkkinen
    88  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     9  Copyright (C) 2008 Peter Johansson
    910
    1011  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNlog.cc

    r759 r768  
    22
    33/*
    4   Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     4  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    55
    66  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNlog.h

    r759 r768  
    66/*
    77  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2008 Peter Johansson
    89
    910  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNproperty.cc

    r693 r768  
    33/*
    44  Copyright (C) 2006 Jari Häkkinen
     5  Copyright (C) 2007, 2008 Peter Johansson
    56
    67  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/SVNproperty.h

    r693 r768  
    66/*
    77  Copyright (C) 2006 Jari Häkkinen
     8  Copyright (C) 2007, 2008 Peter Johansson
    89
    910  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Stats.cc

    r704 r768  
    44  Copyright (C) 2005 Peter Johansson
    55  Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
     6  Copyright (C) 2008 Peter Johansson
    67
    78  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Stats.h

    r704 r768  
    77  Copyright (C) 2005 Peter Johansson
    88  Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    9   Copyright (C) 2007 Peter Johansson
     9  Copyright (C) 2007, 2008 Peter Johansson
    1010
    1111  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/Trac.cc

    r693 r768  
    33/*
    44  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2008, 2009 Peter Johansson
    56
    67  This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    4849
    4950
    50   bool Trac::changeset(std::string::const_iterator& first,
     51  bool Trac::changeset(const std::string::const_iterator& first,
     52                       std::string::const_iterator& iter,
    5153                       const std::string::const_iterator& last,
    5254                       const std::string::const_iterator& last_trunc)
    5355  {
    54     if (changeset1(first, last, last_trunc))
    55       return true;
    56     if (changeset2(first, last, last_trunc))
    57       return true;
    58     if (changeset3(first, last, last_trunc))
     56    if (changeset1(first, iter, last, last_trunc))
     57      return true;
     58    if (changeset2(iter, last, last_trunc))
     59      return true;
     60    if (changeset3(iter, last, last_trunc))
    5961      return true;
    6062    return false;
     
    6264
    6365
    64   bool Trac::changeset1(std::string::const_iterator& first,
     66  bool Trac::changeset1(const std::string::const_iterator& first,
     67                        std::string::const_iterator& iter,
    6568                        const std::string::const_iterator& last,
    6669                        const std::string::const_iterator& last_trunc)
    6770  {
    68     if (first==last)
    69       return false;
    70     if (*first != 'r')
    71       return false;
    72     const std::string::const_iterator first_orig(first);
    73     ++first;
    74     std::string rev = match(first, last, Digit());
    75     if (rev.empty()){
    76       first = first_orig;
     71    if (iter==last)
     72      return false;
     73    if (*iter != 'r')
     74      return false;
     75    if (iter!=first && isalnum(*(iter-1)))
     76      return false;
     77    const std::string::const_iterator iter_orig(iter);
     78    ++iter;
     79    std::string rev = match(iter, last, Digit());
     80    if (rev.empty() || (iter!=last && (std::isalnum(*iter) || *iter==':')) ){
     81      iter = iter_orig;
    7782      return false;
    7883    }
    7984    std::string href(Configuration::instance().trac_root()+"changeset/"+rev);
    80     hs_.stream() << anchor(href, anchor_text(first_orig, first, last_trunc));
     85    hs_.stream() << anchor(href, anchor_text(iter_orig, iter, last_trunc));
    8186    return true;
    8287  }
     
    288293
    289294
    290   bool Trac::log(std::string::const_iterator& first,
     295  bool Trac::log(const std::string::const_iterator& first,
     296                 std::string::const_iterator& iter,
    291297                 const std::string::const_iterator& last,
    292298                 const std::string::const_iterator& last_trunc)
    293299  {
    294     if (log1(first, last, last_trunc))
    295       return true;
    296     if (log2(first, last, last_trunc))
    297       return true;
    298     if (log3(first, last, last_trunc))
     300    if (log1(first, iter, last, last_trunc))
     301      return true;
     302    if (log2(iter, last, last_trunc))
     303      return true;
     304    if (log3(iter, last, last_trunc))
    299305      return true;
    300306    return false;
     
    302308
    303309
    304   bool Trac::log1(std::string::const_iterator& first,
     310  bool Trac::log1(const std::string::const_iterator& first,
     311                  std::string::const_iterator& iter,
    305312                  const std::string::const_iterator& last,
    306313                  const std::string::const_iterator& last_trunc)
    307314  {
    308     if (first==last)
    309       return false;
    310 
    311     const std::string::const_iterator first_orig(first);
    312     if (*first != 'r')
    313       return false;
    314     ++first;
    315 
    316     std::string stop_rev = match(first, last, AlNum());
    317     if (stop_rev.empty() || first == last || *first != ':') {
    318       first = first_orig;
    319       return false;
    320     }
    321     ++first;
    322     std::string rev = match(first, last, AlNum());
    323     if (rev.empty() ) {
    324       first = first_orig;
     315    if (iter==last)
     316      return false;
     317
     318    const std::string::const_iterator iter_orig(iter);
     319    if (*iter != 'r')
     320      return false;
     321    if (iter!=first && isalnum(*(iter-1)))
     322      return false;
     323    ++iter;
     324
     325    std::string stop_rev = match(iter, last, Digit());
     326    if (stop_rev.empty() || iter == last || *iter != ':') {
     327      iter = iter_orig;
     328      return false;
     329    }
     330    ++iter;
     331    std::string rev = match(iter, last, Digit());
     332    if (rev.empty() || (iter!=last && std::isalnum(*iter) ) ){
     333      iter = iter_orig;
    325334      return false;
    326335    }
    327336    std::string href(Configuration::instance().trac_root()+"log/?rev="+
    328337                     rev+"&amp;stop_rev="+stop_rev);
    329     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     338    hs_.stream() << anchor(href, anchor_text(iter_orig,iter, last_trunc));
    330339    return true;
    331340  }
     
    445454      last_trunc = first+width;
    446455    while (first<last_trunc) {
    447       if (log(first, str.end(), last_trunc))
     456      if (log(str.begin(), first, str.end(), last_trunc))
    448457        continue;
    449458      if (comment(first, str.end(), last_trunc))
     
    451460      if (ticket(first, str.end(), last_trunc))
    452461        continue;
    453       if (changeset(first, str.end(), last_trunc))
     462      if (changeset(str.begin(), first, str.end(), last_trunc))
    454463        continue;
    455464      if (diff(first, str.end(), last_trunc))
  • trunk/lib/Trac.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2007, 2008, 2009 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    5858    /// @return true if any of changesetX returns true
    5959    ///
    60     bool changeset(std::string::const_iterator& first,
     60    bool changeset(const std::string::const_iterator& first,
     61                   std::string::const_iterator& iter,
    6162                   const std::string::const_iterator& last,
    6263                   const std::string::const_iterator& last_trunc);
     
    6667    ///
    6768    /// Search in range [\a first, \a last) for expression
    68     /// /r(\d+)/. If expression is found an anchor to
    69     /// trac-root/changeset/123, displaying expression, and first is
    70     /// pointing to character after expression.
    71     ///
    72     /// @return true if expression is found
    73     ///
    74     bool changeset1(std::string::const_iterator& first,
     69    /// /r(\d+)/. In addition character before cannot be
     70    /// alpha-numeric, and character after expression cannot be
     71    /// alpha-numeric or ':' (beginning/end of string is allowed). If
     72    /// expression is found an anchor to trac-root/changeset/123,
     73    /// displaying expression, and first is pointing to character
     74    /// after expression.
     75    ///
     76    /// @return true if expression is found
     77    ///
     78    bool changeset1(const std::string::const_iterator& first,
     79                    std::string::const_iterator& iter,
    7580                    const std::string::const_iterator& last,
    7681                    const std::string::const_iterator& last_trunc);
     
    187192    /// @return true if any of logX returns true
    188193    ///
    189     bool log(std::string::const_iterator& first,
     194    bool log(const std::string::const_iterator& first,
     195             std::string::const_iterator& iter,
    190196             const std::string::const_iterator& last,
    191197             const std::string::const_iterator& last_trunc);
     
    195201    ///
    196202    /// Search in range [\a first, \a last) for expression
    197     /// /r(\w+):(\w+)/. If expression is found an
    198     /// anchor is created, displaying the expression, and first is
    199     /// pointing to character after expression.
     203    /// /r(\d+):(\d+)/. In addition character before and after
     204    /// expression cannot be alpha-numeric (beginning/end of string is
     205    /// allowed). If expression is found an anchor is created,
     206    /// displaying the expression, and iter is pointing to character
     207    /// after expression.
    200208    ///
    201209    /// The created anchor goes to trac-root/log/?rev=236&stop_rev=123
     
    203211    /// @return true if expression is found
    204212    ///
    205     bool log1(std::string::const_iterator& first,
     213    bool log1(const std::string::const_iterator& first,
     214              std::string::const_iterator& iter,
    206215              const std::string::const_iterator& last,
    207216              const std::string::const_iterator& last_trunc);
  • trunk/lib/css.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2006, 2007 Peter Johansson
     7  Copyright (C) 2006, 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/first_page.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2006, 2007 Peter Johansson
     7  Copyright (C) 2006, 2007, 2008 Peter Johansson
    88
    99  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/html_utility.h

    r750 r768  
    66/*
    77  Copyright (C) 2006 Peter Johansson
    8   Copyright (C) 2007 Jari Häkkinen, Peter Johansson
    9   Copyright (C) 2008 Jari Häkkinen
     8  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    109  Copyright (C) 2008 Peter Johansson
    1110
  • trunk/lib/rmdirhier.cc

    r693 r768  
    22
    33/*
    4   Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    5   Copyright (C) 2008 Peter Johansson
     4  Copyright (C) 2006 Jari Häkkinen
     5  Copyright (C) 2007, 2008 Peter Johansson
    66
    77  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/rmdirhier.h

    r693 r768  
    55
    66/*
    7   Copyright (C) 2006 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2007 Peter Johansson
     7  Copyright (C) 2006 Jari Häkkinen
     8  Copyright (C) 2007, 2008 Peter Johansson
    99
    1010  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/utility.cc

    r755 r768  
    33/*
    44  Copyright (C) 2006, 2007, 2009 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2008 Peter Johansson
    56
    67  This file is part of svndigest, http://dev.thep.lu.se/svndigest
  • trunk/lib/utility.h

    r727 r768  
    55
    66/*
    7   Copyright (C) 2005, 2006, 2007 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2008 Jari Häkkinen
     7  Copyright (C) 2005 Peter Johansson
     8  Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    99
    1010  This file is part of svndigest, http://dev.thep.lu.se/svndigest
Note: See TracChangeset for help on using the changeset viewer.