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

Re: svn_io_file_rename preserves *destination* file permission on Windows

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2005-11-15 20:15:01 CET

On 11/15/05, Branko Čibej <brane@xbc.nu> wrote:
> Erik Huelsmann wrote:
> >>> All tests pass with no-op svn_wc__prep_file_for_replacement and
> >>> changed svn_io_file_rename. What do you think about this?
> >>>
> >>>
> >>>
> >> Please don't even consider ripping that code out before you're 100% sure
> >> it's not needed (any more). I certainly didn't make those changes for
> >> fun. They were needed at the time.
> >>
> >
> > Oh, I know. I wasn't talking about ripping *all* af it, just the part
> > where it retains the read-only bit on the destination.
> >
> > If I consider that:
> > - svn:needs-lock was developed on *nix (linux, probably)
> > - in *nix it's possible to overwrite a read-only file
> > - unix retains the attributes on the file being renamed
> > - on Windows a file cannot be renamed if it or its rename-target is read-only
> > - svn_io_file_rename should behave the same on all platforms
> >
> > I think that the change should not be ripped out, but has a bug: If it
> > were to remove the readonly bit on both files and put back
> > read-onlyness *of the source* it behaves the same on both *nix and
> > windows (instead of the current situation where it does the same
> > thing, but uses the target atts).
> >
> Yes, I suspect that's a bug. However, I can't for the life of me
> remember my reasoning at the time. Oh, well.

The great thing is that if we consider that part a bug (which we do
now), we can remove the windows specific code from
svn_wc__prep_file_for_replace().

Heh. Well, I'll work with zhakov to make sure it's fixed and still passes tests.

Thanks for your time,

Erik.
Received on Tue Nov 15 20:16:07 2005

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