std.c: Don't use `EXIT_SUCCESS`/`EXIT_FAILURE` as function return values
[sunny256-utils.git] / svnrevs
blob4b1ad220fe5bf4ab3d3933a24540f7ce334b0bf6
1 #!/bin/sh
3 #=======================================================================
4 # svnrevs
5 # File ID: e4860822-5d45-11df-986c-90e6ba3022ac
6 # When calling this one-liner instead of svn, a comma-separated list of
7 # the revision numbers is generated. For use in log messages etc.
9 # Examples:
10 # svnrevs -r1:HEAD
11 # svnrevs -r512:798 blurfl.c
12 # svnrevs http://svn.example.com/trunk/doc
13 # for f in `svnrevs a.txt|tr -d ,`; do svn cat -$f a.txt >a.txt.$f; done
14 #=======================================================================
16 svn log --xml $* | perl -e '$a = join("", <>); $b = $c = ""; $a =~ s/<logentry\b.*?\brevision="(\d+)".*?>/($b .= "${c}r$1", $c = ", ")/egs; print "$b\n";'
18 # vim: set ts=2 sw=2 sts=2 et :