summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/place
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-12 01:10:11 +0000
committerKarl Berry <karl@freefriends.org>2008-07-12 01:10:11 +0000
commit43e08d4383f04c750f3bef51371481f50bfcf154 (patch)
treee19c97205cee7ee1b8c9bd23f742cc708acd5326 /Master/tlpkg/bin/place
parentf509bebca05d18aedf7bc05691abce15fda000e6 (diff)
doc
git-svn-id: svn://tug.org/texlive/trunk@9460 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/place')
-rwxr-xr-xMaster/tlpkg/bin/place28
1 files changed, 12 insertions, 16 deletions
diff --git a/Master/tlpkg/bin/place b/Master/tlpkg/bin/place
index 50f782428ec..970ec0250c3 100755
--- a/Master/tlpkg/bin/place
+++ b/Master/tlpkg/bin/place
@@ -104,14 +104,12 @@ if (!defined($tlpold)) {
print "place: $package not present in $M/$InfraLocation/$DatabaseName\n\n";
} else {
print "new vs. present $package (present is indented)\n";
- my @oldfiles;
- push @oldfiles, $tlpold->all_files;
+ my @oldfiles = $tlpold->all_files;
`rm -f $TMP/tlplace.old`;
foreach (sort @oldfiles) {
`echo $_ >> $TMP/tlplace.old`;
}
- my @newfiles;
- push @newfiles, $tlpnew->all_files;
+ my @newfiles = $tlpnew->all_files;
`rm -f $TMP/tlplace.new`;
foreach (sort @newfiles) {
`echo $_ >> $TMP/tlplace.new`;
@@ -245,19 +243,17 @@ sub add_file
{
my ($newfile) = @_;
- my $newdir = dirname ($newfile);
-
- # when it's needed, parent must come first, else have svn "not working copy".
- my $parentdir = dirname ($newdir);
- unless (-d "$parentdir/.svn") {
- &my_system ("svn add -N $parentdir");
- $dirs{$parentdir}++;
- }
-
- unless (-d "$newdir/.svn") {
- &my_system ("svn add -N $newdir");
+ # when it's needed, (grand)parents must come first, else have svn "not
+ # working copy".
+ my $newdir = $dir = dirname ($newfile);
+ my $needed_dirs = "";
+ until (-d "$dir/.svn") {
+ $needed_dirs = "$dir $needed_dirs"; # parents first
+ $dirs{$dir}++;
+ $dir = dirname ($dir);
}
-
+ &my_system ("svn add -N $needed_dirs") if $needed_dirs;
+
&my_system ("svn add $newfile");
# remember that we changed this directory.