Re: Re: PHP script for viewing subversion repositories
"Jay Freeman (saurik)" <[email protected]>
| Newsgroups | gmane.comp.horde.chora |
|---|---|
| Message-ID | <018801c36d3e$993ae6c0$fb590644@cruiser> |
Chuck: Ok... so I some questions about this :). Why exactly do you want to have to make it a seperate "set the repository" call rather than just passing it to the object's constructor (which is how the standard mode of operation would be were this C++ or Java)? The key example I'm looking at is CVSLib_Directory. And then there's CVSLib_File. Were the cache to work as "first construct an object, then pass a key for the object along with a reference to that object to some cache storage object" then the course of action would be easy: I construct the object with a repository reference (without actually saving the repository reference in the object) and then save the object to the cache. After saving it I set it's repository reference and start to use it. Later, when I want the object again, I use it's key to recover it from the cache (or construct it using the previous algorithm if I can't find it and I get back a null reference) and then set its repository pointer. However, the cache system is doing something that I find just downright scary, hehe... it works by taking a string argument which is some kind of code snippet that it runs to construct the object? Isn't that largely redundant? The only usage I could see for that is if someone later wants that object and it got purged from the cache and it needs to get recreated automatically, but in that scenario it wouldn't have any of the other objects it needs to reconstruct it anyway, and seemingly the person calling the cache function has to pass the construction code in again anyway, in which case they might as well just not get back an object at all, create the object, and then donate it back to the cache... *Is confused by these PHP ways, hehe.* Sincerely, Jay Freeman (saurik) [email protected] ----- Original Message ----- From: "Chuck Hagenbuch" <[email protected]> To: "Jay Freeman (saurik)" <[email protected]> Cc: <[email protected]>; <[email protected]>; <[email protected]> Sent: Wednesday, August 27, 2003 7:49 PM Subject: Re: [chora] Re: PHP script for viewing subversion repositories > Quoting "Jay Freeman (saurik)" <[email protected]>: > > > Changing everything to use the VC global variable _seriously_ limits the > > usefulness of the library... in that last patch I believe I actually went to > > the trouble to change a few of those that I noticed that weren't needed (as > > this->rep was valid) to using this->rep. This assumes that you will only > > connect to one repository at a time... that's a really evil limitation for > > what's seeming like a rather good general purpose CVS/SVN library. > > Okay. I'd be happy to have everything have a reference to the base object, but > I'd like to see it done in a cleaner way if possible; something along the lines > of having a setVC() method in the subclasses that the base class could call > when instantiating it. > > I can try to look at this, but if you wanted to send a patch for it, I would > really really appreciate it. > > -chuck > > -- > Charles Hagenbuch, <[email protected]> > They're just looking at a wall of meat. > -- Chora mailing list Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]