[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: Joe Swatosh <joe.swatosh_at_gmail.com>
Date: 2007-09-16 04:19:13 CEST

Karl,

On 9/15/07, Karl Fogel <kfogel@red-bean.com> wrote:
> "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.
>

Thanks for the prompt reply. I was just about to reply to myself to say that
of course the test could be wrong. The important bit to me was that there
seemed to be a change of behavior. If that means that the behavior of 'svn
add' has changed slightly then that's fine. Again, I was most concerned about
a regression. <later> sorry for the delay. My night to make dinner.
</later>

command line transcript approximating the test actions (stupid typos edited)
r26606
        D:\SVN\26606>svnadmin create repos

        D:\SVN\26606>svn mkdir -m "" file:///d:/SVN/26606/repos/wc

        Committed revision 1.

        D:\SVN\26606>svn co file:///d:/SVN/26606/repos/wc wc
        Checked out revision 1.

        D:\SVN\26606>md wc\dir

        D:\SVN\26606>echo content > wc\dir\file.txt

        D:\SVN\26606>svn add -N wc\dir
        A wc\dir

        D:\SVN\26606>svn commit -m "" wc
        Adding wc\dir

        Committed revision 2.

        D:\SVN\26606>svn ls file:///d:/SVN/26607/repos/wc/dir
        file.txt

        D:\SVN\26606>svn ls file:///d:/SVN/26606/repos/wc/dir

r26607
        D:\SVN\26607>svnadmin create repos

        D:\SVN\26607>svn mkdir -m "" file:///d:/SVN/26607/repos/wc

        Committed revision 1.

        D:\SVN\26607>svn co file:///d:/SVN/26607/repos/wc wc
        Checked out revision 1.

        D:\SVN\26607>md wc\dir

        D:\SVN\26607>echo content > wc\dir\file.txt

        D:\SVN\26607>svn add -N wc\dir
        A wc\dir
        A wc\dir\file.txt

        D:\SVN\26607>svn commit -m "" wc
        Adding wc\dir
        Adding wc\dir\file.txt
        Transmitting file data .
        Committed revision 2.

        D:\SVN\26607>svn ls file:///d:/SVN/26607/repos/wc/dir
        file.txt

So r26607 adds the directory, but not the file, r26607 adds the directory and
the file. Basically, "svn add -N" meant add the directory only before r26607
and now it appears to mean add the directory and any files in it, but no
subdirectories. As long as this is intentional, no problem. If it is not
intentional....

--
Joe
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Sep 16 04:15:35 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.