Barnum is a command-line companion for Git designed to reduce the ceremony required to use the patch workflow pioneered by Gerrit and adopted by Gitblit. It simplifies the syntax required to retrieve, review, revise, and integrate a patch.
Barnum only requires an installed Java 6 (or newer) Runtime Environment and it runs fine on Windows, Linux, and Mac OS X.
Barnum is similar to git-review by OpenStack and repo by Google.
The current version is 0.7.1, released 2013-12-13.
Barnum is licensed under the Apache 2.0 Software License.
pt clone --gerrit https://git.eclipse.org/r/jgit/jgit
pt clone --gitblit https://next-gitblit.rhcloud.com/git/gitblit.git
pt checkout 9379
pt checkout 9379/10 -b symlinks
pt push
pt merge 9379
pt merge 9379/10
pt pick 9379
pt pick 9379/10
pt show 9379
pt show 9379/10
pt log 9379
pt prune 9379
pt prune
Barnum is built on top of the very awesome JGit library.
At it's core, Barnum maintains a patch index built from the advertised refs/changes/xx/id/rev
served by your Gerrit or Gitblit server. It uses this index to decorate patch commits with rich information about revisions, dependencies, and their history. Of course, this information is all just branches, Git commits, and Git notes so similar reports could be generated with many, many Git commands, but that's just too much work.
When you fetch, show, checkout, or log a patch, Barnum will retrieve the complete revision history of that patch, not just one specific revision. When Barnum refreshes it's patch index, it will also determine and cache the merge state of each patch. This allows Barnum to indicate if a patch dependency is obsolete and also if an obsolete dependency has a newer, merged revision.
Additionally, if your patch server is Gitblit, then the complete Ticket history is automatically fetched during the clone or init process and subsequently updated on each refresh. This gives you a complete, read-only copy of the Gitblit Ticket data in your repository.
Once you have checked-out a patch, you can use relative shortcuts to jump between revisions:
pt checkout /-- (jump back one revision)
pt checkout /-5 (jump back 5 revisions)
pt checkout /++ (jump ahead one revision)
pt checkout /+5 (jump ahead 5 revisions)
pt checkout /10 (review revision 10)
These same trick works for the show command.
The name is derived from it's executable name, pt, which is short for patch tool. There may be others, but one famous PT that comes to mind is P.T. Barnum.
The tophat icon was designed by Liz Aragon.
It is available for non-commercial use under the CreativeCommons NonCommercial-ShareAlike 3.0 Unported license.