Changeset 1287


Ignore:
Timestamp:
Nov 9, 2010, 4:47:22 AM (13 years ago)
Author:
Peter Johansson
Message:

use same range of revisions in blame output colors as in plots

Location:
trunk/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/File.cc

    r1286 r1287  
    161161    if (!Graph::date_xticks()) {
    162162      using_dates=false;
    163       last = stats_["classic"].revision();
     163      first = Graph::rev_min();
     164      last = Graph::rev_max();
    164165    }
    165166    else {
    166       last = Graph::xticks().back();
    167       // earliest date corresponds either to revision 0 or revision 1
    168       first = std::min(Graph::xticks()[0],Graph::xticks()[1]);
    169     }
     167      first = Graph::xticks()[Graph::rev_min()];
     168      assert(Graph::rev_max()<Graph::xticks().size());
     169      last = Graph::xticks()[Graph::rev_max()];
     170    }
     171    assert(last>first);
    170172    // color is calculated linearly on time, c = kt + m
    171173    // brightest color (for oldest rev in log) is set to 192.
  • trunk/lib/Graph.cc

    r1280 r1287  
    173173
    174174
     175  svn_revnum_t Graph::rev_max(void)
     176  {
     177    return rev_max_;
     178  }
     179
     180
    175181  void Graph::rev_min(svn_revnum_t rev)
    176182  {
    177183    rev_min_ = rev;
     184  }
     185
     186
     187  svn_revnum_t Graph::rev_min(void)
     188  {
     189    return rev_min_;
    178190  }
    179191
  • trunk/lib/Graph.h

    r1280 r1287  
    105105
    106106    /**
     107       Gets the right end of xrange to correspond to revision \a rev.
     108     */
     109    static svn_revnum_t rev_max(void);
     110
     111    /**
    107112       Sets the left end of xrange to correspond to revision \a rev.
    108113     */
    109114    static void rev_min(svn_revnum_t rev);
     115
     116    /**
     117       Gets the left end of xrange to correspond to revision \a rev.
     118     */
     119    static svn_revnum_t rev_min(void);
    110120
    111121    /**
Note: See TracChangeset for help on using the changeset viewer.