[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Log statistics chart fix for imported dumpfiles

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2007-10-03 18:09:52 CEST

Andreas Nicolai wrote:
> This may take actually quite a bit more effort than I have time (at
> least currently).
> About the code change: I plan on just changing part of the code in
> CStatGraphDlg::ShowCommitsByDate():
> 1. find out the real last and first date:
> So, replacing line:
> CTime
> lasttime((__time64_t)m_parDates->GetAt(m_parDates->GetCount()-1));
> with a min/max search for the date.
> Now the way I see it from the code, the CDWordArray class used for
> storing all the revision data is not STL compatible, so I cannot use any
> algorithms. Does the framework used by TortoiseSVN include some
> algorithms (i.e. for finding min/max values in the range) that work on
> CDWordArray? Or do I really have to write a plain min/max search function?

You could replace the CDWordArray with an std::vector<DWORD> (or better
yet, std::vector<__time64_t>).

> 2. next I need to define the granuarity of the chart - I would like to
> add an option for the user to define weekly/monthly or yearly granularity.
> How would I do this best?

That would require some controls added to the dialog where the user can
select the granularity. But do you really want that? The graph will look
really ugly if too much is shown.

> 3. I would create a loop over all data points (like there is right now)
> and create a map of a map:
> std::map<int, std::map<stdstring, LONG> >
> The key for the map indicates the time in the selected granularity, and
> the value is a map of the commits that each author made at this time/in
> this time interval.
> In this loop I also create a set of authornames that have committed
> something.

More complicated than I like things, but if you can make it work, go ahead!

> 4. Having created that map, I then loop over all author names in the set
> and create a graphseries object
> 4.1 then I loop over all time points in the time point range determined
> in (1) and add data series for the current author to the graphseries
> Does this sound like a plan?
> In the current implementation, where does the threshold filter come in?

Just don't forget that there are repositories out there with > 50'000
revisions and the stat dialog should not take minutes to show up.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Oct 3 18:10:03 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.