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

Re: svn: Attempted to get textual contents of a *non*-file node

From: Alexey Neyman <stilor_at_att.net>
Date: Tue, 6 Mar 2012 16:27:11 -0800

Hi Daniel,

On Monday, March 05, 2012 11:33:33 pm Daniel Shahaf wrote:
> Alexey Neyman wrote on Mon, Mar 05, 2012 at 16:14:24 -0800:
> > Hi all,
> >
> > I ran into the following error message with Subversion:
> >
> > svn: Attempted to get textual contents of a *non*-file node
> >
> > The issue, as pointed out by email thread [1], is that the directory
> > being merged contains a file with the same name as the directory. I.e.,
> > there is /trunk/foo directory containing /trunk/foo/foo file.
> >
> > However, even if I tried the suggestion from Ben Collins-Sussman, it
> > didn't help: 'svn merge' still complained with the same error message.
> > Reproduction script attached. Is there a way such projects can use 'svn
> > merge' command?
> >
> > I tried with Subversion trunk and, although the error message is
> > different ("svn: E160017: '/trunk/foo' is not a file"), the result is
> > still the same. While it is a better message than the one in 1.6, it
> > still does not explain why Subversion expects /trunk/foo to be a file
> > for the following commands:
> >
> > svn merge -c 4 ^/trunk/foo
> > svn merge -c 4 ^/trunk/foo .
> > svn merge ^/trunk/foo_at_3 ^/trunk/foo_at_4 .
> > svn merge -r 3:4 ^/trunk/foo .
>
> Yeah, I just tried with trunk, couldn't get the merge to work, with
> those commands (some of which are made equivalent by the argument
> parser) or with <svn merge ^/trunk/foo_at_3 ^/trunk/foo_at_4 foo>.
>
> Looks like a bug to me, assuming it works when the dir and the file are
> not both named the same thing.

I confirm it works when dir and file do not have the same name. E.g., if you
rename new file 'B' in the attached testcase to, say, 'X' - it passes. There
is one more condition for this bug to manifest: the offending directory must
be the current directory: even though

$ svn merge -c 4 ^/trunk/foo .

fails, the following

$ wc=`pwd`
$ cd ..
$ svn merge -c 4 ^/trunk/foo $wc

works. I guess, it's sort of a workaround.

> > As another side note, Subversion leaves behind a zero-sized temporary
> > file created for the merge.
>
> And this one too. (the file is in the wc root)
>
> > Regards,
> > Alexey.
> >
> > [1] http://markmail.org/message/qqh3r6d4tcdyjnz2#query:
> > +page:1+mid:vcjektlfn37mxyld+state:results
>
> Could you file an issue? Perhaps send a patch adding a regression test
> for this (in Python)? (See subversion/tests/cmdline/README)

Issue 4139 created. Attached is a patch that adds an XFail to the test suite
for this issue.

Regards,
Alexey.

Received on 2012-03-07 01:28:16 CET

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

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