Check out all revisions of a repository (or directory or file)
This commit is contained in:
parent
ce339c38c7
commit
cd81f6a2ba
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
use warnings;
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
push @ARGV, "." unless (@ARGV);
|
||||||
|
|
||||||
|
for my $target (@ARGV) {
|
||||||
|
open(my $svnlog_fh, '-|', 'svn', 'log', $target) or die "cannot invoke svn log $target: $!";
|
||||||
|
my $atstart;
|
||||||
|
while (<$svnlog_fh>) {
|
||||||
|
if (/^------------------------------------------------------------------------$/) {
|
||||||
|
$atstart = 1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
if ($atstart && /^r(\d+) \| /) {
|
||||||
|
my $revline = $_;
|
||||||
|
chomp $revline;
|
||||||
|
my $revision = $1;
|
||||||
|
system('svn', 'co', "-r$revision", $target, $revision) == 0 or die "cannot invoke svn co -r$revision $target $revision: $!";
|
||||||
|
}
|
||||||
|
$atstart = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: tw=0
|
Loading…
Reference in New Issue