I can already create duplicate repos with the same versions of debs and deb-src packages.
The problem is that I want to find the Ubuntu changes from Debian mainline (not from original source). That way I can use Debian mainline with some of the customizations that Ubuntu provides (Ubuntu does a lot of things well, but I think it is over-simplifying some things... a simple example is the upcoming unity migration).
I think there is probably a tool to do this already and I can't find it. I could script it, but I would prefer not to.
If you intend to build scripts, you may want to investigate launchpadlib.
However, since I don't use launchpadlib directly, I'll give a couple pointers that hopefully illustrate the gist of manually using data provided in Launchpad to generate diffs.
Here're references for using with a web browser or bzr for an example source package, alsa-driver.
Debian unstable (Sid) is at https://code.launchpad.net/~ubuntu-branches/debian/sid/alsa-driver/sid. The URI you can use with bzr is lp:debian/sid/alsa-driver
Ubuntu 10.10 (Maverick) is at https://code.launchpad.net/~ubuntu-branches/ubuntu/maverick/alsa-driver/maverick. The URI you can use with bzr is lp:ubuntu/maverick/alsa-driver
Then, you simply bzr diff your branches of lp:debian/sid/alsa-driver and lp:ubuntu/maverick/alsa-driver to obtain what is essentially a
diff -uNr $debian_sid $ubuntu_maverick
. I'm fairly certain this approach directly addresses what you seek with "Ubuntu changes from debian mainline", but it may be far easier to accomplish with existing tools involving launchpadlib.In fact, MOTU often use something similar; you can find an overview at https://wiki.ubuntu.com/DistributedDevelopment/Documentation/Merging.