[
https://issues.apache.org/jira/browse/SVN-1532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16996868#comment-16996868
]
Nathan Hartman commented on SVN-1532:
-------------------------------------
Not sure what that "bang!" comment on the last line of the repro script
represents but I just tested with 1.13.0.
First, the reproduction script in its current form no longer exposes the
original issue because 'svn switch' errors out with "E195012: Path 'f' does not
share common version control ancestry with the requested switch location. Use
--ignore-ancestry to disable this check."
When using '--ignore-ancestry' on both invocations of 'svn switch', the first
call switches the directory to the file; the second call gives "svn: E160005:
Cannot replace a directory from within" (same error message as noted above).
And... it is not possible to switch back to the file.
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.)
> Switch a file to a dir: can't switch it back to the file
> --------------------------------------------------------
>
> Key: SVN-1532
> URL: https://issues.apache.org/jira/browse/SVN-1532
> Project: Subversion
> Issue Type: Bug
> Components: unknown
> Affects Versions: all
> Reporter: Julian Foad
> Priority: Critical
> Labels: patch
> Fix For: unscheduled
>
> Attachments: 1_svn-switch-test.sh, 2_svn-switch-test.patch
>
>
> {noformat:nopanel=true}
> "svn switch" is able to switch a file to a directory but, having done that,
> cannot switch the directory back to the file. When "d" is a directory and "f"
> is a file, the output is:
> + svn switch file:///home/julianfoad/tmp/svn-switch-test/repos/d f
> D f
> A f
> Updated to revision 1.
> + svn switch file:///home/julianfoad/tmp/svn-switch-test/repos/f f
> /home/julianfoad/src/subversion/subversion/libsvn_repos/delta.c:209:
> (apr_err=160005)
> svn: Invalid filesystem path syntax
> svn: svn_repos_dir_delta: invalid editor anchoring; at least one of the input
> paths is not a directory and there was no source entry
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)