Data from Ultimate Debian Database.
Bugs data refreshed once a day. Packages data refreshed twice a day.
source code. patches welcomed!
grab-branches.sh script which will do this for each source package supplied on command-line
bzr init-repo package
bzr branch lp:debian/package package/debian
bzr branch lp:ubuntu/package package/ubuntu
Hopefully you will find it useful if you want to merge a couple of packages and don't want to manually download all branches.