Introducing debcheckout

Cute little tiny teeny new addition to devscripts: debcheckout (not yet uploaded though, in the mean time you can get it from here. It checks out the versioning repository used to maintain a given package.

Sample usage:

$ debcheckout devscripts
declared svn repository at svn://
svn co svn:// ...
A    trunk/debian
A    trunk/debian/control
A    trunk/debian/links
A    trunk/debian/dirs
A    trunk/debian/compat
 U   trunk
Checked out revision 749.

The information about where to find a repository is extracted parsing (in a rather dumb way actually, but I really can't stand libapt-pkg API!) Vcs-XXX fields.

Intended usages:

  1. NMU scenarios: when you're NMUing, please commit your patches (if possible of course: directly to the repository if it has already adhered to the [[!open your VCS campaign|DD_wide_commit_on_alioth]] I'm sponsoring, or somewhere else if you're using a distributed VCS); with debcheckout the first step it's easy

  2. ease the creation of patches: isn't it better to checkout a repository, fiddle around, and then just invoke svn (or whatever) diff instead of remembering (I always forgot that!) to first create a .orig copy of the debianized source tree?

  3. retrieving the bleeding edge version of a package which includes the patch for a pending bug you have been waiting for ages


Let me know what you think of debcheckout, feature requests, whatever. In particular let me know if I did something wrong using some VCS, since I'm not proficient in all VCSs supported by debcheckout; for example: I'm quite sure the Arch part is not working ... help is appreciated!

Vcs-Cvs proposed convention

debcheckout can also give the ground for standardizing the VCS-specific meanings of the various Vcs-XXX fields. In writing it I've noticed that almost all VCSs have de facto standards about what to put in the field, with the notable exception of CVS. That's probably because all modern VCSs rely on some URL-like identifier for a repository location, while CVS does not. It needs a pair URL/module to be checkout.

The format I'm currently supporting in debcheckout is a pair of space separated values "CVSROOT MODULENAME"; later on I'm using those values as in cvs -d CVSROOT checkout MODULENAME. Also please note that if you do not put the heading ":pserver:" string in the CVSROOT, users won't be able to checkout the repository without providing a password.

Tip of the day: Pod::Usage

Perl's Pod::Usage module is cool. Finally I can write the usage string only once instead of duplicating it in the manpage and in the string to be printed upon --help. Ruby had something similar, but the output on console was so horrible that I preferred duplicating stuff for Ruby scripts.

Update: I've changed the link to so that it points to the "live" version in the devscripts repository, since some patches are already flowing in ...