diff options
Diffstat (limited to 'Master/tlpkg/bin/place')
-rwxr-xr-x | Master/tlpkg/bin/place | 28 |
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. |