[darcs-users] Re: darcs2rss [was Re: darcs repo to RSS feed?]

Mark Stosberg mark at summersault.com
Sat Dec 4 02:02:49 UTC 2004


On 2004-12-03, Pedro Melo <melo at simplicidade.org> wrote:
>
> Ok, this is version 0.1, after 40 minutes hacking on it.

Great. Thanks! 

I'll just suggest some optimizations here since you don't have your repo
online yet. :)

> #!/usr/bin/perl -w
Be more portable:
##################

#!/usr/bin/env perl

> # Where is darcs?
> my $cmd = '/usr/local/bin/darcs';
Default to expecting darcs to be in your path:
###############################################j

# Where is darcs? You only to set this if darcs is not your PATH
my $cmd = '';

################################################ Nothing to edit below

$cmd ||= 'darcs';


> if (! open(CHANGES, "$cmd changes --xml |")) {

There's no need to get more than the last $n_items:
#################################################

if (! open(CHANGES, "$cmd changes --xml --last $n_items |")) {


        Mark

-- 
http://mark.stosberg.com/ 





More information about the darcs-users mailing list