Re: [jira] [Commented] (SVN-1532) Switch a file to a dir: can't switch it back to the file

2019-12-16 Thread Nathan Hartman
On Sun, Dec 15, 2019 at 11:57 PM Daniel Shahaf  wrote:
> Nathan Hartman (Jira) wrote on Sun, 15 Dec 2019 20:12 +00:00:
> > Two different fixes have been suggested above:
> >
> > (1) Several people: Open the editor on the parent rather than the node 
> > itself.
> >
> > or
> >
> > (2) Max Oliver Bowsher: "For exactly the same reason that you cannot
> > checkout a file, you cannot switch a file. ... So, the 'fix' for this
> > issue is teach switch to maintain this invariant..."
> >
> > (Personally, Bowsher's idea makes more sense to me.)
>
> I don't see how the two cases are analogous.
>
> 'svn checkout $URL foo' creates foo/.svn/.  To do so, it requires that
> foo/ be a directory.
>
> However, it's perfectly meaningful and useful to do 'svn switch
> ^/subversion/branches/1.13.x/STATUS STATUS' in a working copy of the
> 1.13.x-r42 branch.  Moreover, why _shouldn't_ it be possible to switch a file
> to a directory?  Directory entries can be either directories or files, but 
> when we
> tell a directory that its child "iota"'s URL should be , why 
> does it
> matter whether the new URL points to a node of the same kind?

Make sense.

I've thought about this some more and one place where this might crop
up is on a Mac. The iWork office suite used to save documents as a
"package" (which appears to the user to be a file but is really a
directory full of files). I think that practice has fallen out of favor
because the newer iWork saves documents as a file by default (but can
still save/load the old "package" format, and can convert files <->
packages). Someone who has such documents under version control might
run into a switch file/directory issue.

There is already an XFAIL test for this issue. (I didn't think to look
for it until after the fact.)

(I'm looking through the issue tracker for old invalid issues that
should be closed. I haven't brought any new ones to the list in the
last couple of weeks because the issues I've tested lately are still
valid.)

> P.S. Max is a full committer, like you, so you can use first names :)

We haven't met yet. :-) But okay, less formalism later...

Cheers,
Nathan


Re: [jira] [Commented] (SVN-1532) Switch a file to a dir: can't switch it back to the file

2019-12-15 Thread Daniel Shahaf
Nathan Hartman (Jira) wrote on Sun, 15 Dec 2019 20:12 +00:00:
> Two different fixes have been suggested above:
> 
> (1) Several people: Open the editor on the parent rather than the node itself.
> 
> or
> 
> (2) Max Oliver Bowsher: "For exactly the same reason that you cannot 
> checkout a file, you cannot switch a file. ... So, the 'fix' for this 
> issue is teach switch to maintain this invariant..."
> 
> (Personally, Bowsher's idea makes more sense to me.)

I don't see how the two cases are analogous.

'svn checkout $URL foo' creates foo/.svn/.  To do so, it requires that
foo/ be a directory.

However, it's perfectly meaningful and useful to do 'svn switch
^/subversion/branches/1.13.x/STATUS STATUS' in a working copy of the
1.13.x-r42 branch.  Moreover, why _shouldn't_ it be possible to switch a file
to a directory?  Directory entries can be either directories or files, but when 
we
tell a directory that its child "iota"'s URL should be , why 
does it
matter whether the new URL points to a node of the same kind?

Cheers,

Daniel

P.S. Max is a full committer, like you, so you can use first names :)