Subject: How about using the pre built hook?

From: Guido Günther <[email-masked]>
Date: Sat, 17 Jul 2010 16:15:14 +0200

Hi Thomas,
Jonathan recently send a patch to add a pre-build hook. That could be
used to achieve what you want. We can pass the SHA1 of the debian-branch
to the hook. The hook would then be responsible for storing the
information in the package e.g. by adding it as debian/SHA1.
 -- Guido