Changeset 814 for trunk


Ignore:
Timestamp:
Aug 8, 2009, 7:49:27 PM (12 years ago)
Author:
Peter Johansson
Message:

fixes #374

The problem was in the map year2rev that maps from a year to the last
revision of that year. We got that information from an SVNlog(ROOT)
object. When ROOT was yat/yat the problem (we've seen before)
occured. The problem is that if we follow the log of yat/yat we
realize it was created in 2005, so the map wouldn't cover for year
2004 and 2003. And there are many files, for example
yat/yat/Makefile.am, that were created in 2003 and 2004.

I could see two obvious solutions to the problem. Either call get the
log from repos_root_url or call NODE::log. The latter gives the union
of the logs of nodes in the directory (and below), which should be
sufficient. That, however, also implies that a log call is needed for
every file, which makes this slow in particular since ROOT often is
quite high the files structure. I therefore went with a log call to
repos_root_url, which is fast since it only involves one call to svn
server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Node.cc

    r759 r814  
    317317    // map with last rev for every year
    318318    std::map<int, svn_revnum_t> year2rev;
    319     SVNlog log(path());
     319    // get log for entire project
     320    SVNlog log(SVNinfo(path()).repos_root_url());
    320321    typedef SVNlog::container::const_iterator LogIterator;
    321322    for (LogIterator i=log.commits().begin(); i!=log.commits().end(); ++i){
Note: See TracChangeset for help on using the changeset viewer.