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

Re: svn commit: rev 2181 - trunk/subversion/tests/clients/cmdline trunk/subversion/tests/clients/cmdline/svntest

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-06-13 14:11:31 CEST

Greg Stein <gstein@lyra.org> writes:

> > This commit creates a two new classes for representing the state or
> > operational information related to a working copy. As an example of
> > their use, basic_tests.py was converted.
>
> I'm hoping that this will turn out to be more approachable. It looks like it
> to me, but Philip has been the big whiner ;-). Whatcha think, Philip?
>
> The places in basic_tests.py where the "disk trees" are set up still needs
> some conversion, but that should be pretty straight-forwards. And, of
> course, all of the other test scripts need to be updated... (yowch!)
>
> Oh yah, and code to compare two state objects.
>
> But it is a start... comments?

One jumps out.

The state objects operate with "Subversion paths" like 'A/D/G/rho' but
"OS paths" like os.path_join(wc_dir, 'A', 'D', 'G', 'rho') are
required for svntest.actions and for working copy manipulations. Your
conversion of basic_tests.py has a lot of literal Subversion paths.

I would like to be able to construct OS paths from Subversion
paths. Then I could write things like

    G_path = 'A/D/G'
    rho_path = G_path + '/rho'
    svntest.main.file_append(xxxx(wc_dir, rho_path), 'some text')
    svntest.main.run_svn(None, 'rm', xxxx(wc_dir, G_path))
    svntest.main.run_svn(None, 'rm', '--force', xxxx(wc_dir, G_path))
    expected_status.tweak_one(G_path, status='D ')
    expected_status.tweak_one(rho_path, status='D ')
    shutil.rmtree(xxxx(wc_dir, G_path))

xxxx is some function (or method, or operator, or whatever) that
converts

    (wc_dir, G_path, '/rho')

into

    (os.path.join(wc_dir, 'A', 'D', 'G', 'rho'))

I think I would require the first argument to be an OS path, and all
subsequent arguments to be Subversion paths.

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 13 14:12:03 2002

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