Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Hack to test patches on Bugzilla against a source checkout

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 doc
Octocat-spinner-32 extras
Octocat-spinner-32 lib
Octocat-spinner-32 log
Octocat-spinner-32 public
Octocat-spinner-32 script
Octocat-spinner-32 test
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 config.ru
README
This tool is currently a colossal hack.  Proceed only with this in mind. ;-)

Everything here is released under the MIT license.  See LICENSE for details.

Be sure to run "bundle install" so you get all the required gems.

Here is some code you can paste into "rails console" to test all the active
patches for MediaWiki core against a checkout of trunk/phase3 in /tmp/mw (this
code won't hurt the checkout but no warranties, etc.).

# Test all the active patches for MediaWiki core
s = Bugzilla::Site.new('https://bugzilla.wikimedia.org/')
bugs = s.search(:keywords=>'patch need-review',:keywords_type=>'allwords', :resolution=>'---', :product=>'MediaWiki'); bugs.size
bugs.each do |bug|
  bug.active_patches.each do |patch|
    result = patch.test('/tmp/mw')
    puts "Bug: #{bug.id}; Patch: #{patch.id}; Status: #{result[:status]}; Strip: #{result[:strip]}; Path: #{result[:path]}"
  end
end; 1

Currently, the only interesting code is under "extras/".

Basically I fetch pages with curb(libcurl) and pull out what I need with 
nokogiri(libxml2) and some css selectors.  Then I take each patch and attempt an 
exhaustive search (after trying the easy cases) to see if it will apply.

I started with the Bugzilla API, but it was pretty annoying so I took the "easy" 
route.

== Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.
* Send me a pull request. Bonus points for topic branches.

== Copyright
Copyright (c) 2011 Rusty Burchfield. See LICENSE for details.
Something went wrong with that request. Please try again.