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

Re: Cannot get info for a file that was inside of file-replaced directory

From: Nathan Hartman <hartman.nathan_at_gmail.com>
Date: Tue, 19 Nov 2019 00:03:47 -0500

On Mon, Nov 18, 2019 at 4:53 AM Иван Селин <ivanselin_at_yandex-team.ru> wrote:

> Hi!
>
> I think I've found a bug in subversion client. Setup is as follows:
> 1. Create directory with a file in it — commit 1
> 2. Replace directory with other file — commit 2
> 3. Call "svn info dir/file_at_1" — it should give information about dir/file
> at revision 1, but it fails saying that "dir" is a file at latest revision:
>
> svn: E160016: Failure opening '/dir' in revision 2
> svn: E160016: '/dir' is not a directory in filesystem
> '0bc899d5-c233-4fed-98a3-8705ddfc96c4'
> But directory can be listed, it shows the file, and file can be listed too:
> $ svn info file:///tmp/subversion-info-on-replaced-file/repo/dir_at_1
> Path: dir
> URL: file:///tmp/subversion-info-on-replaced-file/repo/dir
> Relative URL: ^/dir
> Repository Root: file:///tmp/subversion-info-on-replaced-file/repo
> Repository UUID: 0bc899d5-c233-4fed-98a3-8705ddfc96c4
> Revision: 1
> Node Kind: directory
> Last Changed Author: ivanselin
> Last Changed Rev: 1
> Last Changed Date: 2019-11-18 11:38:16 +0300 (Пн, 18 ноя 2019)
>
> $ svn list file:///tmp/subversion-info-on-replaced-file/repo/dir_at_1
> file
> $ svn list file:///tmp/subversion-info-on-replaced-file/repo/dir/file_at_1
> file
>
> So, only "info" does not work. It seems that it's performing directory
> check against HEAD instead of provided peg revision. Adding --revision key
> changes nothing. This is trunk svn (1.14.0-dev, r1869957), svn 1.9.7 does
> not have this bug, it correctly shows info.
>
> Sample reproduction script attached.
>

Hello Ivan,

Thank you for reporting this.

I performed similar steps and I am seeing the same result, namely:

$ svn info "$repo/dir/file"@1
svn: E160016: Failure opening '/dir' in revision 2
svn: E160016: '/dir' is not a directory in filesystem '(snip)'

You asked for peg revision 1, it's looking in revision 2.

I'm investigating...

Thanks again for reporting this.

Nathan
Received on 2019-11-19 06:04:09 CET

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