Because I want to host my bzr repos on my site, I have setup http://bzr.snuxoll.com, the problem was I wanted people to be able to browse my code without needing to check it out. Since the only decent web interface (loggerhead) required an additional server running (something I can't do on shared hosting), it was out of the question. As such, I give you snuxbzrweb, a revolution in web interfaces for VCS systems!
#!/usr/bin/ruby # An extremely hackish 'bzr repo browser' # All it does is make sure the working tree is up to date # and hope that apache serves the directory listing :P repos = Dir["bzr.snuxoll.com/*/*"] repos.map{ |x| File.expand_path(x) }.each do |dir| Dir.chdir(dir) if Dir["#{dir}/**"] != [] system("bzr update") else system("bzr checkout") end end
Yes, you saw that right, all it does is iterate through my repositories, and either runs 'bzr update' or 'bzr checkout' based on whether they have a working tree already or not. Since I'm not worried about conflicts since I don't do merges on dreamhost, and instead push my branch to it, I don't care about checking anything else. While this isn't pretty, or very functional, at least apache will spit out a directory listing with the files in my branches now :)

Comments
supplynflshop
thank you for sharing
http://www.supplynflshop.com discount nfl jeserys
Post new comment