
As part of rebuilding parts of the Gitorious UI, we’re building the new code browser as a standalone tool. This means all sorts of cool things. It makes the Gitorious project easier to maintain and develop, as it will be modularized and those modules will help us avoid too tight couplings. It also means that our new repo browser can easily be used locally on your machine.
Installing dolt
Dolt is the name of the new repository browser. Note: It’s very early stage at this point, but basic functionality is in place, so I wanted to share with you guys. To install it you need Ruby and Python development files.
With apt (Debian/Ubuntu etc)
If you don’t already have Ruby, start with `sudo apt-get install ruby`. Then get the Python development files: `sudo apt-get install python-dev`. Finally, install dolt: `gem install dolt`.
With yum (Fedora/CentOS/RedHat etc)
If you don’t already have Ruby, start with `sudo yum install ruby`. Then get the Python development files: `sudo yum install python-devel`. Finally, install dolt: `gem install dolt`.
Take Dolt for a spin
Now you can use Dolt to preview our upcoming code browser with a local repository: `dolt /home/christian/projects/gitorious`. If you’re already in the directory where your Git repo lives, do `dolt .`.
Work in progress
Note that a lot of stuff is missing, and some links in the app do not work. If you give it a try, I’d love to hear what you think. Also, if you stumble upon some installation problems, let me know.

4 Comments
Cool, modularization is a good thing :)
Is the source code for Dolt hosted somewhere? I wanna explore how … the tests are written :P
@kidkarolis ah, of course, I forgot that… http://gitorious.org/gitorious/dolt
There’s plenty of tests, let me know if you have some opinions on how they’re done :)
Running on Ubuntu 12.04.1 LTS on ruby 1.92p290 installed under rvm, I get a few kinks.
First, browsing a folder lists files and folder, but under the headings “Changed” and “Last commit” there is nothing.
Clicking on “Blame” for a file gives:
/home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/sinatra/actions.rb:33:in `error’: undefined method `exit_code’ for “fatal: cannot stat path ‘master’: No such file or directory”:String (NoMethodError)
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/sinatra/actions.rb:67:in `block in blame’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/repo_actions.rb:55:in `call’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/repo_actions.rb:55:in `block in repo_action’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `call’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `set_deferred_status’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:198:in `fail’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/git/repository.rb:50:in `block in deferred_method’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `call’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `set_deferred_status’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:198:in `fail’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/em_pessimistic-0.1.2/lib/em_pessimistic/deferrable_child_process.rb:53:in `unbind’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:1435:in `event_callback’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.4.1/lib/thin/backends/base.rb:63:in `start’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.4.1/lib/thin/server.rb:159:in `start’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.4.1/lib/thin/server.rb:145:in `start’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/bin/dolt:68:in `’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/bin/dolt:19:in `load’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/bin/dolt:19:in `’
with server shutdown.
When starting dolt with a path to a directory containing lots of git repos, but which isn’t one itself, clicking on “history” gives
Sinatra doesn’t know this ditty.
Try this:
get ‘/pantheon/history/master:pantheon-core/pom.xml’ do
“Hello World”
end
But when starting dolt with direct path to git repo, I get
/home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/sinatra/actions.rb:33:in `error’: undefined method `exit_code’ for # (NoMethodError)
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/sinatra/actions.rb:75:in `block in history’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/repo_actions.rb:55:in `call’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/repo_actions.rb:55:in `block in repo_action’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `call’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `set_deferred_status’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:198:in `fail’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/git/repository.rb:50:in `block in deferred_method’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `call’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `set_deferred_status’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:198:in `fail’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/em_pessimistic-0.1.2/lib/em_pessimistic/deferrable_child_process.rb:53:in `unbind’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:1435:in `event_callback’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.4.1/lib/thin/backends/base.rb:63:in `start’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.4.1/lib/thin/server.rb:159:in `start’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/thin-1.4.1/lib/thin/server.rb:145:in `start’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/bin/dolt:68:in `’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/bin/dolt:19:in `load’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/bin/dolt:19:in `’
Note also that sometimes just clicking on a file in the browser, the file content isn’t shown, but rather
/home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/sinatra/actions.rb:33:in `error’: undefined method `exit_code’ for # (NoMethodError)
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/sinatra/actions.rb:46:in `block in blob’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/repo_actions.rb:55:in `call’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/dolt-0.2.1/lib/dolt/repo_actions.rb:55:in `block in repo_action’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `call’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:158:in `set_deferred_status’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/em/deferrable.rb:198:in `fail’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/em_rugged-0.1.2/lib/em_rugged/deferrable.rb:37:in `rescue in block (2 levels) in defer’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/em_rugged-0.1.2/lib/em_rugged/deferrable.rb:34:in `block (2 levels) in defer’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:1037:in `call’
from /home/knuthaug/.rvm/gems/ruby-1.9.2-p290/gems/eventmachine-1.0.0/lib/eventmachine.rb:1037:in `block in spawn_threadpool’
This happened when clicking to view a .gitignore file.
Tell me if you wan’t these stack traces or more info in a mail somewhere.
2 Trackbacks
[...] previously announced, I’m currently working on a new code browser, called Dolt. Because we’re redoing not [...]
[...] Gitorious 3.0, with few user-visible features. Our plan was to ship 3.1 shortly after, including the new code browser we started working on last [...]