extracting patches from the ancestry graph (was: recreating historic packages)

Teemu Ikonen tpikonen at gmail.com
Wed Oct 1 10:43:00 UTC 2008


On Wed, Oct 1, 2008 at 11:38 AM, martin f krafft <madduck at debian.org> wrote:
> also sprach Teemu Ikonen <tpikonen at gmail.com> [2008.09.30.2329 +0200]:
>> At the moment, yes, but the new dpkg with version 3.0 quilt format
>> builds the source package from sources with the patches applied.
>> This enables one to store the integrated sources in VCS, generate
>> debian/patches from branches (e.g. with topgit) and build
>> a debian.tar.gz with simply calling dpkg-source, providing that an
>> orig.tar.gz is also available.
>
> Assuming we have a number of feature branches, we may well have to
> resolve conflicts among them, so an integration branch seems like
> the right way forward. So unless we just build the package from the
> integration branch to produce a monolithic patch, your algorithm is
> something to focus on! I am still not convinced that it is possible
> to extract historic patches from the ancestry of a tag on the
> integration branch, but I'd love to be proven wrong! Unfortunately,
> I won't be able to look into this again before next week.

I thought about this some more and indeed there are problems.
Generating patches based on just one tag in the integration branch
probably would work when all the topic branches are still alive (i.e.
there is a head ref which can be used to find all the commits
belonging to the branch), but when the head ref is removed (because
the patch is merged upstream for example) finding correct heads and
bases for the topic branches becomes impossible. I don't think it's
feasible to expect that all the topic branch heads are stored
indefinitely, so this approach will not work.

Your idea of storing two tags per topic branch per release is much
more robust, although without automated tagging of all the branch
heads and bases and linking them to a master tag in the integration
branch it will be too laborious for practical use IMHO. Since all the
topgit branch heads and bases are by definition there when the tags
should be created, perhaps the algorithm I proposed would be useful
then.

Teemu



More information about the vcs-pkg-discuss mailing list