Code Swarm - Visualize your depot history!
Code Swarm is a visualization tool that:
shows the history of commits in a software project. A commit happens when a developer makes changes to the code or documents and transfers them into the central project repository. Both developers and files are represented as moving elements. When a developer commits a file, it lights up and flies towards that developer. Files are colored according to their purpose, such as whether they are source code or a document. If files or developers have not been active for a while, they will fade away. A histogram at the bottom keeps a reminder of what has come before.
Here are two screen shots from a video that my coworker Matt Attaway created from our internal P4 repository (the oldest one in the world!). The first is a year or so into its life, and the second is from around 2007. The user names have been crossed out to protect the guilty^Winnocent.
Now if you want to try this out on your own depots, here's a simple quick-start:
- Get the code. It's written in Java and Python.
- Unpack the source and change directories into it.
Run it with some default data, rendering it in realtime to your display:
Now, to actually get data from your repository instead of using the example history, you can do this:
Run the log converter script on a depot of your choice:
python convert_logs/convert_logs.py --perforce-path //some_depot/...
Note that it'll use whatever connection details you have set in your environment, and that it'll run a "p4 changes //some_depot/..." and then a "p4 describe" on each changelist it found. Its output file is called "depot.xml" no matter what your depot is actually named.
Move the log file it created into the data directory:
mv depot.xml data
Edit the config file, pointing it to the log file you created:
Run the program again!
You'll have to hit enter once to accept the defaults unless you want something different.