Dash Project/Commits Explorer/SVN

From Eclipsepedia

< Dash Project‎ | Commits Explorer
Revision as of 16:30, 20 December 2010 by Wayne.eclipse.org (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Several Perl scripts collaborate together to collect the data into this form. The first script, svn-extract.pl extracts the data from SVN; that data is piped to svn-parse.pl which converts the SVN-specific output into tabular form for consumption by a script that dumps the output into the Dash database.

For example, the following invocation of these scripts:

echo -e "technology.gef3d\t/svnroot/technology/org.eclipse.gef3d/" | ./svn-extract.pl | ./svn-parse.pl

Results in the following output (in part):

.#DATE     YEAR YEARMONTH YEARMONTHDAY TOPPROJECT PROJECT          FILENAME                                                                                                         FILETYPE REVISION CHANGE_SIZE MESSAGE_SIZE LOGIN       COMPANY 
2010/12/14 2010 201012    20101214     technology technology.gef3d /trunk/org.eclipse.gef3d.examples.graph/src/java/org/eclipse/gef3d/examples/graph/editor/wizard/GraphWizard.java java     526      1           93           jvonpilgrim unknown 
2010/11/15 2010 201011    20101115     technology technology.gef3d /trunk/org.eclipse.draw3d.lwjgl/src/java/org/eclipse/draw3d/graphics3d/lwjgl/Graphics3DLwjgl.java                java     525      1           129          jvonpilgrim unknown 
2010/11/15 2010 201011    20101115     technology technology.gef3d /trunk/org.eclipse.draw3d.lwjgl/src/java/org/eclipse/draw3d/graphics3d/lwjgl/font/LwjglFont.java                 java     525      1           129          jvonpilgrim unknown 
2010/11/15 2010 201011    20101115     technology technology.gef3d /trunk/org.eclipse.draw3d.lwjgl/src/java/org/eclipse/draw3d/graphics3d/lwjgl/util/ConstantChecker.java           java     525      1           129          jvonpilgrim unknown
...

The svn-extract.pl script expects that data be provided in the form "[project-name]<tab>[directory]". The [directory] is expected to be a valid SVN directory on dev.eclipse.org.

Note that the .# at the beginning of the header line is significant to the insert processor. Entries on each line are separated by a single tab character (the output above has been hand-formated to make it easier to read). The FILETYPE is generally the extension from the FILENAME. An extension of 'htm' is rendered as 'html'; an extension of 'jpg' is rendered as 'jpeg'. CHANGE_SIZE is (according to a comment in the svn-extract.pl script, not provided).