From Fedora Project Wiki

(what I've got working so far, although ... well, it hasn't produced a report yet, but it seems to be on the right path)
 
(including package install command)
Line 12: Line 12:


# Obtain the 'lookatgit' source code: <code>git clone git://github.com/mpdehaan/lookatgit.git</code>
# Obtain the 'lookatgit' source code: <code>git clone git://github.com/mpdehaan/lookatgit.git</code>
#* If use github.com, you can use the fork command to make your own fork within github.com.  The use the clone command on your own fork, instead of the main upstream tree:<code>git clone git://github.com/YOURUSERNAME/lookatgit.git</code>
#* If use github.com, you can use the fork command to make your own fork within github.com.  The use the clone command on your own fork, instead of the main upstream tree: <code>git clone git://github.com/YOURUSERNAME/lookatgit.git</code>
# Install the ''scala'' and ''java-1.6.0-openjdk'' packages.
# Install the ''scala'' and ''java-1.6.0-openjdk'' packages:  <code>sudo yum install scala java-1.6.0-openjdk</code>
#* The 'lookatgit' README says to use the Scala upstream release directly.  The <code>Makefile</code> for 'lookatgit' is hard-coded to seek the Scala binaries on that path.  If you choose to follow this method, do not make changes to the <code>Makefile</code>.
#* The 'lookatgit' README says to use the Scala upstream release directly.  The <code>Makefile</code> for 'lookatgit' is hard-coded to seek the Scala binaries on that path.  If you choose to follow this method, do not make changes to the <code>Makefile</code>.
# Edit the <code>/path/to/src/lookatgit/Makefile</code>.  [[#Makefile|Below is what the Makefile looks like]] in the upstream source.  Change the path to the Scala compiler to <code>/usr/bin/scalac</code> and the Scala runtime to <code>/usr/bin/scala</code>
# Edit the <code>/path/to/src/lookatgit/Makefile</code>.  [[#Makefile|Below is what the Makefile looks like]] in the upstream source.  Change the path to the Scala compiler to <code>/usr/bin/scalac</code> and the Scala runtime to <code>/usr/bin/scala</code>
Line 24: Line 24:
# Compile the Scala code into class files: <code>make compile</code>
# Compile the Scala code into class files: <code>make compile</code>
# Run the application on the git repository: <code>make example<code>
# Run the application on the git repository: <code>make example<code>


== Makefile ==
== Makefile ==

Revision as of 16:18, 3 November 2009

Summary

The 'lookatgit' program parses git repositories for information about who committed what, how much, when, what was removed, and what the impact of all this has been on the repository.

The upstream for 'lookatgit' is at http://github.com/mpdehaan/lookatgit.

It is written in Scala, compiled by the scalac compiler that uses a Java runtime.

How to obtain and install

These instructions recommend cloning the git repository and working from a local clone. You can obtain a tarball or zip file, if you wish. The effect is the same, but the git clone allows you to interact with the upstream if you need.

  1. Obtain the 'lookatgit' source code: git clone git://github.com/mpdehaan/lookatgit.git
    • If use github.com, you can use the fork command to make your own fork within github.com. The use the clone command on your own fork, instead of the main upstream tree: git clone git://github.com/YOURUSERNAME/lookatgit.git
  2. Install the scala and java-1.6.0-openjdk packages: sudo yum install scala java-1.6.0-openjdk
    • The 'lookatgit' README says to use the Scala upstream release directly. The Makefile for 'lookatgit' is hard-coded to seek the Scala binaries on that path. If you choose to follow this method, do not make changes to the Makefile.
  3. Edit the /path/to/src/lookatgit/Makefile. Below is what the Makefile looks like in the upstream source. Change the path to the Scala compiler to /usr/bin/scalac and the Scala runtime to /usr/bin/scala
  4. Edit the Makefile to include a new target for your chosen git repository. The git repository must exist locally:
    1. cd ~/git/
    2. git clone git://example.com/example.git
    3. Edit Makefile to include this target:
      • example:
      • 	/usr/bin/scala -classpath . App ~/git/example
  5. Compile the Scala code into class files: make compile
  6. Run the application on the git repository: make example

Makefile

Here is what the upstream Makefile looks like in release:

all:	compile

compile:
	/opt/scala/bin/scalac -classpath . -sourcepath . *.scala

test:
	/opt/scala/bin/scala -classpath . App ~/cg/lookat

test2:
	/opt/scala/bin/scala -classpath . App ~/cg/_cobbler

test3:
	/opt/scala/bin/scala -classpath . App ~/cg/func

clean:
	rm *.class