This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new b525650 Don't change symlinked directory depth
b525650 is described below
commit b525650be0eccdca7af4b4ae5f2e26d0494bb745
Author: Sebb <[email protected]>
AuthorDate: Thu Dec 5 14:57:54 2019 +0000
Don't change symlinked directory depth
The target may be needed for other purposes on the host system
---
Rakefile | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Rakefile b/Rakefile
index 352fa21..808c200 100644
--- a/Rakefile
+++ b/Rakefile
@@ -120,12 +120,12 @@ namespace :svn do
if Dir.exist? name
if noCheckout
puts "#{PREFIX} Removing #{name} as it is not intended for
checkout"
- FileUtils.rm_rf name
+ FileUtils.rm_rf name # this will remove symlink only (on macOS
at least)
else
curpath = ASF::SVN.getInfoItem(name,'url')
if curpath != svnpath
puts "Removing #{name} to correct URL: #{curpath} =>
#{svnpath}"
- FileUtils.rm_rf name
+ FileUtils.rm_rf name # this will remove symlink only (on
macOS at least)
end
end
end
@@ -133,12 +133,13 @@ namespace :svn do
next if noCheckout
if Dir.exist? name
+ isSymlink = File.symlink?(name) # we don't want to change such
checkouts
Dir.chdir(name) {
system 'svn cleanup'
depth = description['depth']
files = description['files']
next unless files # TEMP
- if depth == 'empty'
+ if depth == 'empty' and not isSymlink
curdepth = ASF::SVN.getInfoAsHash('.')['Depth'] # not
available as separate item
if curdepth != depth
puts "#{PREFIX} update depth from '#{curdepth}' to
'#{depth}'"