Skip to content

Instantly share code, notes, and snippets.

@atomicstack
Created November 26, 2010 11:42
Show Gist options
  • Save atomicstack/716598 to your computer and use it in GitHub Desktop.
Save atomicstack/716598 to your computer and use it in GitHub Desktop.
Run this inside an empty SVN checkout (e.g. svn co -N <repository>) and it will sparsely check out the entire sub-tree of directories (excluding files). Unfortunately, in my environment Subversion only checks out at about 100 dirs/minute so it's not very
sub do_dir {
my ($dir) = @_;
chdir $dir;
my @entries = map { chomp; $_ } grep { m{/$}xms } qx/svn ls/;
system qw/svn update -N --set-depth=empty/, @entries;
do_dir("$dir/$_") for @entries;
}
do_dir($ENV{PWD});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment