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

Re: svn commit: r26607 - in trunk/subversion: include libsvn_client libsvn_wc svn tests/cmdline

From: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-09-16 01:57:43 CEST

"Joe Swatosh" <joe.swatosh@gmail.com> writes:
> I've been trying to catch the Ruby bindings up with HEAD today, but when I
> apply r26607 I get two test failures that I can't explain. I think if you can
> help me understand this one, the other will fall into place. Or perhaps the
> quoted bit above is causing the regression? The Ruby bindings are currently
> wrapping svn_client_add3.
>
> def test_add_not_recurse
> log = "sample log"
> file = "hello.txt"
> src = "Hello"
> dir = "dir"
> dir_path = File.join(@wc_path, dir)
> path = File.join(dir_path, file)
> uri = "#{@repos_uri}/#{dir}/#{file}"
>
> ctx = make_context(log)
> FileUtils.mkdir(dir_path)
> File.open(path, "w") {|f| f.print(src)}
>
> # Boilerplate up to here. Now add the directory containing a file created
> # above, without recursing.
>
> ctx.add(dir_path, false)
> ctx.commit(@wc_path)

Hmm, which depth does "without recursing" imply here?

> # This assertion fails. We are now finding the path in the repo where we
> # before we didn't.
>
> assert_raise(Svn::Error::FS_NOT_FOUND) do
> ctx.cat(uri)
> end
> end
>
> I checked the definition of SVN_DEPTH_FROM_RECURSE, and since it returns
> svn_depth_files, I'm wondering if that is the correct behavior for add?
>
> I hope I'm at least half coherent.

I confess I don't understand the recipe. Could you spell it out,
showing exactly what tree is on the client side, exactly what command
is run (from where and with what arguments), exactly what you expect
to see in the repository before and after, and exactly what you
actually see?

Ideally, the bindings would wrap svn_client_add4() and prefer it to
svn_client_add3(), of course. However, as long as they're using add3,
the conversion of recurse=false to svn_depth_files is correct. That
may have resulted in the behavior of 'svn add' changing slightly;
we've accepted that mapping -N to --depth results in some subtle
behavior changes for some commands.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Sep 16 01:54:05 2007

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

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