]> https://gitweb.dealii.org/ - dealii.git/commitdiff
new script for branches
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 15 Dec 2000 11:32:40 +0000 (11:32 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 15 Dec 2000 11:32:40 +0000 (11:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@3542 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/scripts/update-branch [new file with mode: 0644]

diff --git a/deal.II/common/scripts/update-branch b/deal.II/common/scripts/update-branch
new file mode 100644 (file)
index 0000000..8183090
--- /dev/null
@@ -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(<ENTRIES>)
+    {
+       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(".");

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.