[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: Andreas Nicolai <Andreas.Nicolai_at_gmx.net>
Date: 2007-09-30 23:06:45 CEST

Hi Simon,

> Not sure this is going to work. The log dialog fetches the last 100
> revisions from the repository, and then gets more on request. There is
> no guarantee that the revisions from the same period in the first
> repository you loaded will be in those first 100 revisions.

Well, independent of the commit dates, I see the revision log statistics
still as revision based stats. So even if only a partial revision log is
loaded, this data could still be shown in chronological order.

> Unfortunately you do need VS.NET2005 to build, it can't be done with
> free tools.

Got that.

> If you are looking to contribute you might also want to think about
> fixing this problem at source, ie a way to import multiple dumpfiles,
> interleaving revisions into correct date order. That would be part of
> the core subversion project.

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?

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?

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.

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?

Bye,
Andreas

-- 
Andreas Nicolai                         anicolai@syr.edu
PhD Candidate, M.A.M.E                  (315) 443-2641
Syracuse University
151 Link Hall
Syracuse, NY, 13244
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sun Sep 30 23:06:57 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.