PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Version Control » VersionControl_SVN » Bug #5021

SVN objects are not reusable

Details

Request #5021SVN objects are not reusable
Submitted2005-08-07 16:46 UTC
Frommihamix at openttd dot org
Assignedclay
StatusClosed
PackageVersionControl_SVN
PHP VersionIrrelevant
OSAll
Roadmaps0.3.1

Comments

[2005-08-07 16:46 UTC] mihamix at openttd dot org

Description:
------------
If I create a VersionControl_SVN_List via a
$svn = VersionControl_SVN::factory(array('list'), $options);
call, I got an object, which I can call:
$svn->list->run($args, $switches);

If I call this object multiple times with different $args, it'll still executes the first call, since:
VersionControl/SVN.php line 616 and later:
if (!$this->_prepared) {
$this->prepare();
}

It's obvious, that it'll only prepare at the first time, so it makes difficult (if not impossible) to reuse the above object (since $_prepared 'declared' as private (it's ok).

Would it be possible to raise this limitation, and allowing users to reuse the $svn object?

[2005-08-07 16:58 UTC] mihamix at openttd dot org

I've created a small patch, which will solve the whole problem. I've uploaded it to here: http://xenon.bibl.u-szeged.hu/~miham/php/svn.diff

It's maybe ugly, but the whole conception works good.