hackathon
DESCRIPTION
Hackathon at PozitronTRANSCRIPT
HackathonDiff+
Content
1. Diff+2. Mercurial API3. Mercurial Extensions4. Results
Diff+
Analyzes java source filesIt is a mercurial extension Get two revisionsPrints diff of class and method numbers
Mercurial APIhttp://mercurial.selenic.com/wiki/MercurialApi
You can easily get a repo and revisionfrom mercurial import ui, hg
repo = hg.repository(ui.ui(), repoName)
cctx = repo[revision]
Change context has files File Context has actual data
Mercurial Extensionhttp://mercurial.selenic.com/wiki/WritingExtensionscmdtable = {
"analyze-java": (analyzeJava,
#[('r', 'revision', None, 'Other revision to be compared')],
[],
"hg analyze-java [options] REV REV2")
}
def analyzeJava(ui, repo, revision, revisionDiff, **opts):
Mercurial Extension
How to use?
[extensions]
analyze-java= /home/POZITRON/erkin.unlu/setups/hg-analyze/analyzer_ext.py
Resultshg 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
Repohttps://bitbucket.org/lost_mohican/changeset_analyzer