Changeset 834


Ignore:
Timestamp:
Nov 7, 2009, 9:50:15 PM (12 years ago)
Author:
Peter Johansson
Message:

fixes #397. get latest rev from SVNinfo instead of SVNlog

Location:
trunk/lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r827 r834  
    106106  {
    107107    return name() + "/index.html";
     108  }
     109
     110
     111  svn_revnum_t Directory::last_changed_rev(void) const
     112  {
     113    svn_revnum_t res = svn_info().last_changed_rev();
     114    for (NodeConstIterator i=daughters_.begin(); i!=daughters_.end(); ++i)
     115      res = std::max(res, (*i)->last_changed_rev());
     116    return res;
    108117  }
    109118
  • trunk/lib/Directory.h

    r757 r834  
    7171
    7272    /**
     73       \brief Get the revision number of the latest commit.
     74
     75       Does not only check this directory but also daughter nodes.
     76    */
     77    svn_revnum_t last_changed_rev(void) const;
     78
     79    /**
    7380       @return The explicit string "directory", nothing else.
    7481    */
  • trunk/lib/File.cc

    r831 r834  
    171171  {
    172172    return name()+".html";
     173  }
     174
     175
     176  svn_revnum_t File::last_changed_rev(void) const
     177  {
     178    return svn_info().last_changed_rev();
    173179  }
    174180
  • trunk/lib/File.h

    r757 r834  
    4747    */
    4848    std::string href(void) const;
     49
     50    /**
     51       \brief Get the revision number of the latest commit.
     52    */
     53    svn_revnum_t last_changed_rev(void) const;
    4954
    5055    /**
  • trunk/lib/Node.cc

    r828 r834  
    138138       << "<td>" << author() << "</td>\n"
    139139       << "</tr>\n";
    140   }
    141 
    142 
    143   svn_revnum_t Node::last_changed_rev(void) const
    144   {
    145     if (ignore())
    146       return svninfo_.last_changed_rev();
    147     assert(log().commits().size());
    148     return log().latest_commit().revision();
    149140  }
    150141
  • trunk/lib/Node.h

    r757 r834  
    110110    /// @brief Get the revision number of the latest commit.
    111111    ///
    112     svn_revnum_t last_changed_rev(void) const;
     112    virtual svn_revnum_t last_changed_rev(void) const=0;
    113113
    114114    /**
     
    204204    ///
    205205    void path_anchor(std::ostream& os) const;
     206
     207    inline const SVNinfo& svn_info(void) const { return svninfo_; }
    206208
    207209    unsigned int level_;
Note: See TracChangeset for help on using the changeset viewer.