Opened 10 years ago

Closed 10 years ago

#476 closed task (fixed)

Parse and write report for one file at a time (rather than first do all parsing and then the report)

Reported by: Peter Johansson Owned by: Peter Johansson
Priority: major Milestone: svndigest 0.9
Component: core Version: trunk
Keywords: Cc:

Description

Daughter of #296

Process files sequentially. Currently all files are first parsed and then output for all files are printed. Instead parse and print one file, and there is no need for storing the stats for more than one file, except that the stats are propagated up to the mother Node.

Part of this is that we need to clear data when it is no longer useful. Without any deeper analysis, I think data is only needed in itself and in the mother. If so, we could have a function that clear data in grand children.

Change History (15)

comment:1 Changed 10 years ago by Peter Johansson

While rewriting this I think we should use the HierarchicalVisitorPattern. It seems like a good idea to separate the file structure from the action. In that way one can set up the Visitor what he should do during his visit rather than passing around all parameters such as: are we verbose? are we generating output? And then we can create a special copyright update visitor when implementing faster copyright (#385). Also it will easy to fix that svncopyright is linked against plplot (#457) because only the visitor needs to know about plplot, i.e., Node and Stats have no connection with the Graph class. The visitor just access data from Node/Stats? and send it to the Graph class to generate the plots.

comment:2 Changed 10 years ago by Peter Johansson

(In [1212]) branch for implementing Visitor Pattern. refs #476

comment:3 Changed 10 years ago by Peter Johansson

Status: newassigned

comment:4 Changed 10 years ago by Peter Johansson

The full blown stats is used only when plotting the curves, i.e., it is only used internally. The mother needs to know some stats about here daughters in order to create the tables in the output. These data corresponds to only the head rev, so perhaps we should split Stats into one full blown object and one class that only holds the stats for head rev. The full blown can then be deleted after the plotting is done, well after passing it up to the mother that accumulates the full blown stats from her daughters.

comment:5 Changed 10 years ago by Peter Johansson

(In [1223]) refs #476: Base class for Visitors

comment:6 Changed 10 years ago by Peter Johansson

(In [1224]) refs #476. Functions in Node structure that interacts with visitors.

comment:7 Changed 10 years ago by Peter Johansson

(In [1225]) refs #476. Inital version of a CopyrightVisitor?.

comment:8 Changed 10 years ago by Peter Johansson

(In [1226]) refs #476 and #385. Remove --copyright switch in svndigest program.

comment:9 Changed 10 years ago by Peter Johansson

(In [1227]) refs #476 and #385. Move parsing to CopyrightVisitor?. Only parse Files because Directories have no copyrigt to update.

comment:10 Changed 10 years ago by Peter Johansson

(In [1229]) refs #476 avoid updating copyright in files with ignore property.

comment:11 Changed 10 years ago by Peter Johansson

(In [1230]) refs #476. New Visitor class doing the work in svndigest binary.

comment:12 Changed 10 years ago by Peter Johansson

(In [1232]) refs #476. Reset stats when it's no longer needed (to save memory). Added a new class TinyStats? that holds information about the latest revision and is created from the CollectionStats?.

comment:13 Changed 10 years ago by Peter Johansson

(In [1234]) refs #476. Merged visitor branch into trunk. Used 'svn merge /branches/visitor' because --reintegrate did (currently) not work on our repo. Since I could not merge as suggested in subversion manual, I reverted all mergeinfo properties to avoid future confusion by svn-client. This means (I think) that there will be no connection about this commit and the visitor branch, but to svn-client this will look like a large changeset (just like a merge in the old days).

comment:14 Changed 10 years ago by Peter Johansson

(In [1235]) #refs #476. remove branch for ticket 476

comment:15 Changed 10 years ago by Peter Johansson

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.