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

tree: 9417c4e2e5

Fetching latest commit…

Cannot retrieve the latest commit at this time

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.