[chora] Re: PHP script for viewing subversion repositories

Jay Freeman (saurik) saurik at saurik.com
Sun Aug 24 22:42:03 PDT 2003


Chuck:

OK, here's the first version of my patch against HEAD (at least, HEAD as of
a few hours ago...).

ftp://ftp.saurik.com/pub/chora/chora-svn-1

Sample site for this new one is at:

http://mail.saurik.com/horde/chora/

(NOT the similar, previous URL that still works and is running my older
version of this; I didn't want to upgrade my main copy of Horde yet, so this
is a side-by-side installation)

The big cavaet is that I don't know PHP... well, I know enough to like set
some variables, but I know virtually none of the language. I look around and
am like "umm... why is there a & seemingly in the middle of nowhere?" quite
a bit. I've learned a bunch from doing this, and have a really large thank
you to give to a friend of mine named Seth Caldwell
(wiz(at)groupnetwork.com) for all of his help, but still...

So what I did was move all the critical global functions that were being
called (like CVSLib_File::getFileObject() or something like that) to member
functions of CVSLib; well, not "move", but added a stub to call through.
Then I made everything call through those (so as to minimize CVS/SVN if
statements in the main code... I actually got it down to a single one for
SVNLib/CVSLib in Chora.php). Then I copied all of the code from CVSLib to
SVNLib and made some key changes. This is _enough_, but there is a ton of
code duplication (some of it just code wasting as I just let people call
CVSLib stuff directly if I know it won't hurt anything). Someone who knows
PHP would probably want to use inheritence to have the common functionality
in some base classes, but learning how to handle all of that in PHP is
likely beyond the time I can focus on this. It would be really nice if this
were designed to more easily support "inherit from this class, override
these methods, and support your favorite version control solution".

Note that I don't have good branch/tag support yet (largely because
Subversion doesn't really have those, but I could simulate it by having a
configuration for the "tags" directory and "branches" directory that this
repository uses, more of a convention than really a software feature, and
then see if the same file exists in one of those branches... running that
through the command line tools will likely be slow though). I may get around
to that at some point.

Sincerely,
Jay Freeman (saurik)
saurik at saurik.com

----- Original Message -----
From: "Chuck Hagenbuch" <chuck at horde.org>
To: "Jay Freeman (saurik)" <saurik at saurik.com>
Cc: <users at subversion.tigris.org>; <chora at lists.horde.org>;
<redoz at redoz.com>
Sent: Sunday, August 24, 2003 6:27 PM
Subject: Re: [chora] Re: PHP script for viewing subversion repositories


> Quoting "Jay Freeman (saurik)" <saurik at saurik.com>:
>
> > The Chora people were interested in merging this, but the person I was
> > talking to got sick or something and we lost touch for a while (although
I
> > may have misinterpreted what was going on and just overlooked an e-mail
or
> > something...)... I should try to get in contact with them again...
*would
> > need to port it to the latest version of Chora if they are still
> > interested*. In fact, so I don't forget... *cross-posts this to Chora's
> > mailing list*.
>
> We're definitely interested in integrating this into Chora HEAD. I'd
suggest
> keeping the conversation on the Chora list; that way even if one person is
out
> of touch for a bit, there are at least 2-3 of us who'll keep this rolling.
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck at horde.org>
> They're just looking at a wall of meat.



More information about the chora mailing list