Index: contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in =================================================================== --- contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in (revision 24000) +++ contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in (working copy) @@ -925,6 +925,21 @@ { print "U $source_path\n"; $upd_files{$source_path} = $del_info; + + # It is possible for the destination file to be + # read-only if it has the svn:needs-lock property set. + # In this case we get a lock (which is safe even if + # svn:needs-lock is not set). Note this only applies to + # plain files, but that is implied here since digests + # are computed only for plain files. Note also there is + # a corner case in which the lock request will fail if + # the file is locked by someone else. + unless (-w $dest_path) + { + read_from_process($svn, 'lock', + @svn_use_repos_cmd_opts, + $dest_path); + } } } } @@ -1593,7 +1608,7 @@ return if $_ eq '.'; my ($file_type) = &file_info($_); my $file_digest; - if ($file_type eq 'f' or ($file_type eq 'l' and stat($_) and -f _)) + if ($file_type eq 'f') { $file_digest = &digest_hash_file($_); }