From: Guido Kanschat Date: Fri, 15 Dec 2000 11:32:40 +0000 (+0000) Subject: new script for branches X-Git-Tag: v8.0.0~19891 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41eeb226e5b4c4004e9b0cba8609657570ebb116;p=dealii.git new script for branches git-svn-id: https://svn.dealii.org/trunk@3542 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/common/scripts/update-branch b/deal.II/common/scripts/update-branch new file mode 100644 index 0000000000..8183090360 --- /dev/null +++ b/deal.II/common/scripts/update-branch @@ -0,0 +1,46 @@ +# This script checks all CVS/Entries recursively and extracts all +# filenames (including path), where the file is part of the branch. + +# The branch is given as command line argument to the script. + +# The result is a shell script that, applied to a directory with the head +# revision, moves all files found to the branch. + +# provide directory to check as argument. + +sub get_directory +{ + my $dir = shift(@_); + my $direntry; + local *DIR; +# printf STDERR "$dir\n"; + # recursion + opendir DIR, "."; + while($direntry = readdir(DIR)) + { + if (-d $direntry) + { + next if ($direntry eq '.' or $direntry eq '..' or $direntry eq 'CVS'); + $newdir = $dir . '/' . $direntry; + chdir $direntry; + get_directory($newdir); + chdir '..'; + } + } + closedir DIR; + + # find Entries in branch + + open ENTRIES, "CVS/Entries"; + while() + { + printf "cvs update -r $branch $dir/$1\n" if (m!^/([^/]+)/.*/T$branch!); + } + close ENTRIES; +} + +$branch = @ARGV[0]; + +printf STDERR "Retrieving branch: %s\n", $branch; + +get_directory(".");