Skip to content

Commit

Permalink
Merge branch 'master' into gravatar
Browse files Browse the repository at this point in the history
  • Loading branch information
rictic committed Oct 23, 2008
2 parents 4d9ed26 + d3c0951 commit 2600868
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 155 deletions.
34 changes: 24 additions & 10 deletions convert_logs/code_swarm
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,28 @@
import os
import sys


def parse_args():
from optparse import OptionParser

parser = OptionParser()
parser.add_option("-r", "--reload",
help="Regenerate the XML log file to get the latest commits", action="store_true")
parser.add_option("-d", "--debug",
help="Enable Java debugging", action="store_true")
parser.add_option("-c", "--config",
help="Just run code_swarm on the given config file")
parser.add_option("-p", "--profile", action="store_true",
help="Invokes java with profiling options, writing output to swarm.proof")
parser.add_option("-r"
,"--reload"
,help="Regenerate the XML log file to get the latest \
commits"
,action="store_true")
parser.add_option("-d"
,"--debug"
,help="Enable Java debugging"
,action="store_true")
parser.add_option("-c"
,"--config"
,help="Just run code_swarm on the given config file")
parser.add_option("-p"
,"--profile"
,action="store_true"
,help="Invokes java with profiling options, writing \
output to swarm.proof")
return parser.parse_args()


Expand Down Expand Up @@ -68,17 +78,20 @@ def main():
retn = os.system("ant -buildfile " + build)
print >>sys.stderr, ""
if not retn == 0:
print >>sys.stderr, "ERROR, please verify that Apache ant is installed"
print >>sys.stderr, "ERROR, please verify that Apache Ant is \
installed"
sys.exit(2)

invoke_code_swarm(code_swarm_jar, proj_cfg, options)


def root_path():
"Returns the path of the code_swarm source directory"
path = os.path.dirname(__file__)
path = os.path.dirname(path)
return path


def invoke_code_swarm(code_swarm_jar, proj_cfg, options):
"""Invokes the code_swarm_jar on the given config file"""
def get_jars():
Expand Down Expand Up @@ -175,7 +188,8 @@ def do_git(dir):
tmp = os.path.join(dir, "temp.log")
xml = os.path.join(dir, "log.xml")

return do_cmds(['git log --name-status --pretty=format:"%s" > %s' % (fmt, tmp)
return do_cmds(['git log --name-status --pretty=format:"%s" > %s'
% (fmt, tmp)
,"convert_logs.py -g %s -o %s" % (tmp, xml)
,"rm " + tmp])

Expand Down
145 changes: 0 additions & 145 deletions convert_logs/code_swarm.rb

This file was deleted.

0 comments on commit 2600868

Please sign in to comment.