[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Issue 2798] svn_load_dirs.pl: Set "svn:executable" only for newly added (executable) files.

From: Mark Reibert <svn_at_reibert.com>
Date: 2007-06-23 07:11:37 CEST

On Fri, 2007-06-22 at 12:33 -0700, Daniel Rall wrote:
> Mark wrote:
>
> > svn_load_dirs.pl will set "svn:executable" on any executable plain
> > file, even those that have not changed (MD5). This triggers the file
> > to be processed as an addition to the repository and copied from the
> > import directory into the staging working copy. This behavior seem
> > unintentional (or at least inconsistent) since all other properties
> > (via the -p option) are set only for newly added files. More
> > importantly, it will trigger a failure if the target in the staging
> > working copy is read-only. (That issue coming in another post.)
>
> Mark, I don't know a lot about this script, but what about the "if"

That makes two of us! ;-)

> case corresponding to the "else" block that you moved the "set
> executable" code snippet into -- in the following sub-conditional:
>
> if ($new_digest ne $del_digest)
> {
> print "U $source_path\n";
> $upd_files{$source_path} = $del_info;
> }
>
> ...wouldn't we also want to set the "svn:executable" property?

I think that is certainly a defensible argument, however I chose not to
go that route as properties that can be set via the "-p" command-line
argument are applied only to newly added files. Also, in the

if ($source_is_exe) ...

block, the executable file is pushed onto the @add_files list causing it
to be processed as a newly added file. Just sort of another hint the
intent was to do this for new files only.

-- 
----------------------
Mark S. Reibert, Ph.D.
svn@reibert.com
----------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 23 07:11:23 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.