Changeset 1280


Ignore:
Timestamp:
Nov 6, 2010, 3:45:23 PM (12 years ago)
Author:
Peter Johansson
Message:

merged release 0.9 in to trunk

Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/NEWS

    r1270 r1280  
    1111    http://dev.thep.lu.se/svndigest/svn/branches/0.9-stable
    1212
    13 Version 0.9 (released NOT YET)
     13Version 0.9 (released 6 November 2010)
    1414  - It is now possible to override svn_props in config file (ticket #326)
    1515  - New configuration option 'copyright-string' (ticket #393)
     
    1717  - New configuration option 'blame-information' (ticket #330)
    1818  - New configuration option 'tab-size' (ticket #229)
     19  - svncopyright now respects property svncopyright:ignore (ticket #245)
     20  - Memory usage heavily reduced (ticket #296)
    1921
    2022  A complete list of closed tickets can be found here [[br]]
  • trunk/bin/svndigest.cc

    r1267 r1280  
    4444#include "yat/OptionArg.h"
    4545
     46#include <algorithm>
    4647#include <cassert>
    4748#include <cstdlib>
     
    205206void set_dates(const svndigest::SVNlog& log)
    206207{
    207   assert(!log.commits().empty());
    208   // all plots uses the same xmin
    209   Graph::rev_min(log.commits().begin()->revision());
    210 
    211   /*
    212      Fill in dates for revisions in log. Revisions not seen in log
    213      should not be used and left equal to 0.
    214    */
     208  // Fill in dates for revisions in log.
    215209  std::vector<time_t> dates(log.latest_commit().revision()+1, 0);
    216210  for (SVNlog::container::const_iterator iter=log.commits().begin();
     
    218212    assert(iter->revision()<static_cast<svn_revnum_t>(dates.size()));
    219213    dates[iter->revision()] = Date(iter->date()).seconds();
     214  }
     215  // Fill in dates for revs not seen in log
     216  time_t prev = dates[log.commits().begin()->revision()];
     217  for (size_t i=0; i<dates.size(); ++i) {
     218    if (dates[i]==0)
     219      dates[i] = prev;
     220    else
     221      prev = dates[i];
    220222  }
    221223
     
    235237  }
    236238 
     239  if (option.verbose())
     240    std::cout << "Retrieving log information" << std::endl;
     241  assert(!tree.log().commits().empty());
     242  Graph::rev_min(tree.log().commits().begin()->revision());
     243  Graph::rev_max(tree.log().latest_commit().revision());
    237244  if (!option.revisions()) {
    238     if (option.verbose())
    239       std::cout << "Retrieving dates" << std::endl;
    240245    set_dates(tree.log());
    241246  }
  • trunk/doc/readme.txt

    r1258 r1280  
    211211an organization rather than to individual developers.
    212212
     213Files and directories that have `svndigest:ignore` or
     214`svncopyright:ignore` set are excluded from the copyright update.
     215
    213216= About svndigest-copy-cache =
    214217
  • trunk/lib/AddStats.cc

    r1194 r1280  
    103103  unsigned int AddStats::max_element(const SumVector& v) const
    104104  {
    105     assert(v.size());
     105    if (v.size()==0)
     106      return 0;
    106107    return v.back();
    107108  }
  • trunk/lib/ClassicStats.cc

    r1194 r1280  
    8181  ClassicStats::max_element(const SumVector& v) const
    8282  {
    83     assert(v.size());
     83    if (v.size()==0)
     84      return 0;
    8485    return v.back();
    8586  }
  • trunk/lib/Graph.cc

    r1267 r1280  
    3232namespace svndigest {
    3333
     34  svn_revnum_t Graph::rev_max_=0;
    3435  svn_revnum_t Graph::rev_min_=0;
    3536  std::vector<time_t> Graph::xticks_;
     
    9394      assert(!date_xticks() || rev_min_<xticks_.size());
    9495      assert(!date_xticks() || xticks_[rev_min_]);
    95       xmin_= date_xticks() ? xticks_[rev_min_] : 0;
    96       xmax_= date_xticks() ? xticks_.back() : y.size();
     96      assert(rev_min_<xticks_.size() || !date_xticks());
     97      xmin_= date_xticks() ? xticks_[rev_min_] : rev_min_;
     98      assert(rev_max_<xticks_.size() || !date_xticks());
     99      xmax_= date_xticks() ? xticks_[rev_max_] : rev_max_;
    97100      xrange_=xmax_-xmin_;
    98101      yrange_=ymax_-ymin_;
     
    126129      y0 = iter->second;
    127130    }
    128     staircase(x0, y0, y.size()-1, y0);
     131    staircase(x0, y0, rev_max_, y0);
    129132
    130133    legend_data legend;
     
    164167
    165168
     169  void Graph::rev_max(svn_revnum_t rev)
     170  {
     171    rev_max_ = rev;
     172  }
     173
     174
    166175  void Graph::rev_min(svn_revnum_t rev)
    167176  {
  • trunk/lib/Graph.h

    r1255 r1280  
    100100
    101101    /**
     102       Sets the right end of xrange to correspond to revision \a rev.
     103     */
     104    static void rev_max(svn_revnum_t rev);
     105
     106    /**
    102107       Sets the left end of xrange to correspond to revision \a rev.
    103108     */
     
    152157    plstream pls_;
    153158    static svn_revnum_t rev_min_;
     159    static svn_revnum_t rev_max_;
    154160    std::string timeformat_;
    155161    std::string title_;
  • trunk/lib/Node.h

    r1264 r1280  
    207207    std::string url(void) const;
    208208   
     209    inline const SVNinfo& svn_info(void) const { return svninfo_; }
     210
    209211  protected:
    210212    ///
     
    212214    ///
    213215    void path_anchor(std::ostream& os) const;
    214 
    215     inline const SVNinfo& svn_info(void) const { return svninfo_; }
    216216
    217217    unsigned int level_;
  • trunk/lib/Stats.cc

    r1255 r1280  
    440440    assert(stat->size());
    441441    assert(stat->find("all")!=stat->end());
    442     // FIXME: try keep a const& to avoid copying
    443     SumVector total=get_vector(*stat, "all");   
    444     total.resize(revision()+1);
     442    const SumVector& total=get_vector(*stat, "all");   
    445443    double yrange_max=1.03 * max_element(total) +1.0;
    446444    gp.ymax(yrange_max);
     
    452450         i != authors_.end(); ++i) {
    453451      assert(stat->find(*i)!=stat->end());
    454       // FIXME: avoid this copying?
    455       SumVector vec = get_vector(*stat,*i);
    456       vec.resize(revision()+1);
     452      const SumVector& vec = get_vector(*stat,*i);
    457453      if (max_element(vec)) {
    458454        author_cont.push_back(std::make_pair(*i,vec));
  • trunk/m4/apache_LICENSE-2.0.txt

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • trunk/m4/ax_cxx_check_flag.m4

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • trunk/m4/ax_cxxcpp_check_flag.m4

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • trunk/m4/ax_ld_check_flag.m4

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • trunk/m4/find_apr.m4

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • trunk/m4/pkg.m4

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • trunk/m4/version.m4

  • trunk/m4/yat_add_flag.m4

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • trunk/test/init.sh.in

    r1220 r1280  
    5353test -z "$SVNCOPYRIGHT" && SVNCOPYRIGHT="${abs_top_builddir}/bin/svncopyright";
    5454test -z "$srcdir" && srcdir="@srcdir@";
    55 test -z "$SVN" && SVN=svn;
     55test -z "$SVN" && SVN="svn --non-interactive";
    5656test -z "$GREP" && GREP=@GREP@;
    5757
  • trunk/test/option.cc

    r1266 r1280  
    5454{
    5555  suite.out() << "test --root ROOT\n";
    56   test_root(suite, ".", test::abs_builddir()+"/testSubDir/option.test",
    57             "option.test");
    58   test_root(suite, "..", test::abs_builddir()+"/testSubDir","testSubDir");
    59   test_root(suite, "../..", test::abs_builddir(), "test");
     56  test_root(suite, ".", "*/test/testSubDir/option.test", "option.test");
     57  test_root(suite, "..", "*/test/testSubDir","testSubDir");
     58  test_root(suite, "../..", "*/test", "test");
    6059  // test with absolute path
    61   test_root(suite, test::abs_builddir(), test::abs_builddir(), "test");
     60  test_root(suite, test::abs_builddir(), "*/test", "test");
    6261  // test with symbolic link
    6362  if (!node_exist("symlink")) {
     
    6766    }
    6867  }
    69   test_root(suite, "symlink",
    70             test::abs_builddir()+"/testSubDir/option.test", "symlink");
    71   test_root(suite, "symlink/.",
    72             test::abs_builddir()+"/testSubDir/option.test","option.test");
    73   test_root(suite, "symlink/..",
    74             test::abs_builddir()+"/testSubDir", "testSubDir");
     68  test_root(suite, "symlink", "*/test/testSubDir/option.test", "symlink");
     69  test_root(suite, "symlink/.", "*/test/testSubDir/option.test","option.test");
     70  test_root(suite, "symlink/..", "*/test/testSubDir", "testSubDir");
    7571  test_root(suite, test::abs_builddir()+"/testSubDir/option.test/symlink/..",
    76             test::abs_builddir()+"/testSubDir", "testSubDir");
     72            "*/test/testSubDir", "testSubDir");
    7773  test_root(suite, test::abs_builddir()+"/testSubDir/option.test/symlink",
    78             test::abs_builddir()+"/testSubDir/option.test", "symlink");
     74            "*/test/testSubDir/option.test", "symlink");
    7975 
    8076  try {
    81     test_root(suite, "../../Makefile", test::abs_builddir()+"/Makefile",
    82               "Makefile");
     77    test_root(suite, "../../Makefile", "*/Makefile", "Makefile");
    8378    suite.add(false);
    8479    suite.out() << "error: no exception thrown\n --root ../../Makefile\n";
     
    9994  argv.push_back(arg);
    10095  parse(option, argv);
    101   if (option.root() != root) {
     96
     97  if (!theplu::svndigest::fnmatch(root, option.root())) {
    10298    suite.add(false);
     99    suite.out() << "error:\n";
    103100    for (size_t i=0; i<argv.size(); ++i)
    104101      suite.out() << argv[i] << " ";
    105102    suite.out() << "\n";
    106103    suite.out() << "root: `" << option.root() << "'\n";
    107     suite.out() << "expected: `" << root << "'\n";
     104    suite.out() << "expected pattern: `" << root << "'\n\n";
    108105  }
    109106  if (option.root_basename() != root_basename) {
    110107    suite.add(false);
     108    suite.out() << "error\n";
    111109    for (size_t i=0; i<argv.size(); ++i)
    112110      suite.out() << argv[i] << " ";
    113111    suite.out() << "\n";
    114112    suite.out() << "root: `" << option.root_basename() << "'\n";
    115     suite.out() << "expected: `" << root_basename << "'\n";
     113    suite.out() << "expected: `" << root_basename << "'\n\n";
    116114  }
    117115}
  • trunk/test/svn_update.sh.in

    r1094 r1280  
    2222# along with svndigest. If not, see <http://www.gnu.org/licenses/>.
    2323
    24 test -z "$SVN" && SVN=svn
     24test -z "$SVN" && SVN="svn --non-interactive"
    2525rootdir=toy_project
    2626
Note: See TracChangeset for help on using the changeset viewer.