mIRCStats Forums

State-of-the-Art IRC Channel Statistics
It is currently Tue Nov 21, 2017 3:34 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Oct 07, 2015 8:30 pm 
Offline
mIRCStats Author
User avatar

Joined: Sat Feb 03, 2007 10:56 am
Posts: 563
mIRCStats for version control repository statistics

Examples:

Step-by-Step instructions:

0) Install mIRCStats

To get started, follow this tutorial to install mIRCStats: http://forum.mircstats.net/viewtopic.php?f=11&t=834

1) Install "mIRCStats for Version Control" extra files
Different version control systems log commit history usually in multi-line format that must be ran through a converter to be suitable for mIRCStats.

You can get converter(s) and other required files by installing http://mircstats.net/tools/mIRCStatsForVersionControl.zip into your mIRCStats installation directory. This extracts required files to proper sub-directories under mIRCStats.

2) Install Python

Git and Subversion (svn) log converters are Python applications so you should install Python first from https://www.python.org/downloads/windows/.

By default it's installed to C:\Python[version] directory.

You can execute Python applications in Windows command prompt (or a .bat file) with:
Code:
python <path-to-app>/<applicationname>.py

If this is not working, Python installation directory is not in your path. In this case you can either add it to PATH environment variable (see your Windows version specific help from Google) or run python with absolute path like this:
Code:
<path-to-python>/python <path-to-app>/<applicationname>.py

3) Generate commit log for your repository

3a) Generate git repository commit log

- If not yet installed, install "git for Windows" from https://git-scm.com/download/win
-- During the install, in "Adjusting your PATH environment" select "Use Git from Windows command prompt"
-- Restart open command prompts after install

- In command prompt, clone the git repository to local drive with
Code:
git clone <repository-url>

- cd to the repository directory
- Generate the log with
Code:
python <path-to-mircstats>/LogConverter/gitlogconverter.py > gitlog.log

This outputs git repository commits to "gitlog.log" (in your repository directory)

4b) Generate svn repository commit log

- If not yet installed, install an svn command line client, for example SlikSvn from https://sliksvn.com/download/
- Restart open command prompts after install

- In command prompt, checkout the svn repository to local drive with
Code:
svn co <repository-url>

- cd to the repository directory
- Generate the log with
Code:
python <path-to-mircstats>/LogConverter/svnlogconverter.py > svnlog.log

This outputs git repository commits to "svnlog.log" (in your repository directory)

- You can also generate svn log without checking out the repository with
Code:
python <path-to-mircstats>/LogConverter/svnlogconverter.py <repository-url> > svnlog.log


5) Prepare mIRCStats for version control stats generation

- Run mIRCStats and press "Change" button. Select "Parser\versioncontrol_parser.txt" as the parser configuration file.
- In "Select log file(s)..." selection at the top of the screen, select the generated version control log file (e.g. "gitlog.log" or "svnlog.log")
- Press "Analyze log"
- On "Html Output/Language" settings page, select "Language\lang_versioncontrol.msl" as the language file
- Press "Save config" to store the settings

6) Generate stats!

- Press "Make stats" button to generate stats for you version control repository
- Right-click the log window and select "View stats page"

7) Additional features
  • If you're using the registered version of mIRCStats, you can load included Custom Stats configuration "versioncontrol.cust.cfg" by pressing "Load Config" button.
  • See this tutorial for detailed info how you can automate your stats generation.


More tutorials

See the list of all mIRCStats & RSSLogger tutorials here: viewforum.php?f=11


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group