On Wed, Sep 17, 2008 at 11:35:44AM +0100, martin f krafft wrote: > also sprach Stefano Zacchiroli <[EMAIL PROTECTED]> [2008.09.16.0815 +0100]: > > OK, so, should I consider this reply of yours an ACK to implement > > TopGit support this way, without resorting to a new field in the > > Vcs-* namespace? > > > > If so, I would love a wishlist bugreport about it ... > > Done.
This has been implemented and is pending in devscripts SVN. You can get the latest version of debcheckout at: http://svn.debian.org/viewsvn/devscripts/trunk/scripts/debcheckout.pl?rev=HEAD&view=log Can you please test it? I did that on the only two packages I'm aware of that are currently managed via TopGit (topgit itself, and ocaml-batteries). An extra pair of eyeballs won't hurt :-) Also, I'm assuming that "tg remote --populate origin" is the right command to be invoked, but I'm not sure it is always the case. > An alternative approach more reminiscent of duck typing (try it and > handle failure, instead of first checking whether to do it) would > be: > > if callable(tg): > save_backup(.git/config) > if tg remote --populate origin: > if git show-ref | egrep -q > '^[[:xdigit:]]+[[:space:]]+refs/top-bases/.+$': > party! > > restore_backup(.git/config) A comment on this. In the end I did *not* implement this approach, but rather looking at the output of "git ls-remote". The first (silly) reason is that I didn't like the race condition around .git/config (which is silly because we have created the dir a few seconds before). The second reason is that I've also implemented the "query" which asks remote GIT repositories whether they are TopGit-ful or not. It can be invoked as: debcheckout --details URL/PACKAGE To implement that, *without checking out* the package, I had to use "git ls-remote" anyhow. I didn't like to have two different implementations for the same thing. Let me know if you further comments. Cheers. -- Stefano Zacchiroli -*- PhD in Computer Science \ PostDoc @ Univ. Paris 7 [EMAIL PROTECTED],pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/ Dietro un grande uomo c'รจ sempre /oo\ All one has to do is hit the right uno zaino -- A.Bergonzoni \__/ keys at the right time -- J.S.Bach -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]