Hackathon

205 views

Published on

Hackathon at Pozitron

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
205
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Hackathon

  1. 1. Hackathon Diff+
  2. 2. Content 1. 2. 3. 4. Diff+ Mercurial API Mercurial Extensions Results
  3. 3. Diff+ Analyzes java source files It is a mercurial extension Get two revisions Prints diff of class and method numbers
  4. 4. Mercurial API http://mercurial.selenic.com/wiki/MercurialApi You can easily get a repo and revision from mercurial import ui, hg repo = hg.repository(ui.ui(), repoName) cctx = repo[revision] Change context has files File Context has actual data
  5. 5. Mercurial Extension http://mercurial.selenic.com/wiki/WritingExtensions cmdtable = { "analyze-java": (analyzeJava, #[('r', 'revision', None, 'Other revision to be compared')], [], "hg analyze-java [options] REV REV2") } def analyzeJava(ui, repo, revision, revisionDiff, **opts):
  6. 6. Mercurial Extension How to use? [extensions] analyze-java= /home/POZITRON/erkin.unlu/setups/hganalyze/analyzer_ext.py
  7. 7. Results hg analyze-java tip 2a80266f6adf revision to get: tip total class count in project: 828 total method count in project: 4834 revision to get: 2a80266f6adf total class count in project: 784 total method count in project: 4600 class diff between revisions: 44 method diff between revisions: 234
  8. 8. Repo https://bitbucket.org/lost_mohican/changeset_analyzer

×