|
Introduction
IntroductionSVNPlot generates graphs similar to StatSVN. The difference is in how the graphs are generated. SVNPlot generates these graphs in two steps. First it converts the Subversion logs into a 'sqlite3' database. Then it uses sql queries to extract the data from the database and then uses excellent Matplotlib plotting library to plot the graphs. I believe using SQL queries to query the necessary data results in great flexibility in data extraction. Also since the sqlite3 is quite fast, it is possible to generate these graphs on demand. InstallationYou will need following additional libraries for using SVNPlot If you are going to use Javascript canvas based graphs (svnplot-js.py), then you will need,
If you want to use Matplotlib based SVNPlot (svnplot.py), then you will need
Quick Start1. First generate the sqlite database for your project. svnlog2sqlite.py [options] <svnrepo url> <sqlitedbpath> <svnrepo url> can be any repository format supported by Subverson. If you are using the local repositories on windows use the file:///d:/... format. NOTE : This is URL of repository root. For example, updating the SVN graphs for SVNPlot project use http://svnplot.googlecode.com/svn/. Using other urls like http://svnplot.googlecode.com/svn/trunk/ will result in error. (Upto version 0.5.4. This issue is fixed version 0.5.5, now svnrepo_url can be any url inside the repository) <sqlitedbpath> is sqlite database file path. Its a path on your local machine Options :
2. Now generate the graphs. svnplot.py [options] <svnsqlitedbpath> <graphdir> OR svnplot-js.py [options] <svnsqlitedbpath> <output directory> <graphdir> is local directory on your machine. All the graphs will placed in this directory. For svnplot-js.py, by default necessary jqplot JavaScript files are also copied to this directory. Following addition options are useful
For svnplot-js.py,
3. Generating Graph with your own report template You can use your own report template for the generated graphs. One example of report template is available in 'svnplot-long.tmpl'. This template directly embed the generated graphs images in the report and doesnot use thumbnails. It is useful to get a printed report. For example, svnplot.py -v --dpi 70 -p svnplot-long.tmpl -n "MyRepo" <sqlitedb path> <output directory> OR svnplot-js.py [options] <svnsqlitedbpath> <output directory> TIP - Use 70 pixesl per inch resolution for better results with svnplot-long.tmpl template. IMPORTANT NOTE for migrating from 0.5.x to 0.6SVNPlot ver 0.6 sqlite database schema is different than 0.5.x schema. Hence for migrating from 0.5.x to 0.6 you will need to regenerate the sqlite database. |
Please fix a broken link to "Matplotlib" - from http://matplotlib.sourforge.net/ to http://matplotlib.sourceforge.net/.
Matplotlib path corrected. Thanks for pointing it out.
Sqlite3 may need to be manually installed, if it does the package goes by the name 'pysqlite'
What exactly is the motication for this project? is it different from svnstat? if so how?
Motivations for this project can be read in the Why Svnplot article.
You should specify a step by step guide for using this product on Windows. I ran the installer. Now what? C:\Users\Jacob>python svnlog2sqlite.py python: can't open file 'svnlog2sqlite.py': 2? No such file or directory
I may have to politely agree with the previous poster about having instructions on how to use this. Also, it would be cool if there were demos or screenshots on what this tool does. Maybe there is, and I'm not just finding it. If that's the case, then it should very easy to get this. Also, I don't get a warm and fuzzy feeling with pointing a script at our repository's root. What exactly is svnlog2sqlite doing? How do I know it's not modifying our repository? (maybe it is, i don't know). Anyway, that's my 2 cents. Keep up the good work!
@gray: you can be certain it won't modify your repository by having it connect over the network, and authenticating itself as a user with read-only access.
Alternatively, you can read the source. Or you could see what a Google search turns up.
It doesn't say so on this page nor in the usage message but you can provide a start and stop date.
svnlog2sqlite.py options? <svnrepo url> <sqlitedbpath> stopdate?
Both dates have to be provided and must be in the format 'year-month-day'. The year can be two or four digits and the whole thing may be enclosed in {} like an SVN date.
Useful if you have a large repository.
Very usefull It will be nice if user can specify some params by args like date range for drawing stats or determine author or extension. Thanks a lot
need to correct some code dor calculating added and deleted lines not obligatory to unicode all content of diff file It cause MemoryError?? for huge commits(about several billion of lines) Need to fix makeunicode and getDiffLineCountDict methods by using loop at first and try...except in second one
I never used Pyton before and I can't make stop 1 work right