Any interest in source code repository module/drivers modeled afterDBI?

Discussion in 'Perl Misc' started by ChrisO, Aug 7, 2005.

  1. ChrisO

    ChrisO Guest

    At a job site a long time ago in a galaxy far, far away, a team labored
    and toiled to use Perl as a build/deploy management framework to build
    and deploy large J2EE apps calling external tools such as Ant to do the
    dirty work. Perl was the framework driver and all the little tools were
    the robot wenches...

    Turns out, the company requiring work on the DeathStar project mandated
    we use their source code repository, but couldn't decide at the time
    what source code repository it was going to stay with and during the
    first part of the project we changed SCR's 3 times! So when we went to
    version 2 of the project, I decided to use a little Jedi/Perl magic and
    wrote the pieces in the overall build/deploy framework to get, put,
    checkin, checkout, label, etc. code from SCR in a generic way, modeled
    after DBI. I was determined that one should never have to know the
    underlying SCR tool for basic SCR functions just like for DBI (add,
    update, delete records, etc). If Darthy baby asked us to change the SCR
    again, we would just write the driver for the new SCR and the code above
    would never have to change.

    I've been sitting on this code for a while now. I have the SCR
    framework, which I called simply "SCR" (like "DBI") that loads an
    appropriate underlying SCR "driver" for VSS, CVS, Subversion, MKS, PVCS,
    etc. and, as I said, abstracts a consistent call interface to Perl for
    scripts to use. Before I do the work to release it into open source, I
    just wonder if there is any interest in something like this? Since I
    modeled it after DBI, I think it would be the approiate thing to
    publicly release this code as well, but if no one cares, then I don't
    want to take the time and effort to do it.

    Additionally, I only have a VSS driver written and some CVS driver code
    written. I have no driver code written for anything else (PVCS,
    Subversion, MKS, etc.), but that's the beauty of the design and open
    source. Someone can come along and write the appropriate driver for
    other third party SCR engines.

    Scant examples:

    ## Connect format is basically:
    ## SCR->connect( driver-sig, username, password, [specific options] );

    my $scr = SCR->connect( 'scr:vss', 'chris', 'perlr0cks', SSDIR =>
    "blah", REPOSITORY => "c:\\My\\Repository" );

    ## or

    my $scr = SCR->connect( 'scr:cvs', 'chris', 'perlr0cks', PSERVER =>
    "blah" ); # Or something like this; I have to check my CVS implem.
    my $scr = SCR->connect( 'scr:cvs', 'chris', 'perlr0cks', CVSROOT =>
    "blah" ); # Or something like this; I have to check my CVS implem.

    ## Then, methods are basically:
    ## $scr->method( general options first, any SCR specific opts last );
    ## (And overall, I've been quite able to avoid the later).

    $scr->add( blah options );
    $scr->get( blah options );
    $scr->put( blah options );
    $scr->checkin( blah options );
    $scr->ci( blah options ); # Synonym for checkin()
    $scr->checkout( blah options );
    $scr->co( blah options ); # Synonym for checkout()
    $scr->label( blah options );
    $scr->remove( blah options );
    ....etc...

    (Okay, I have to admit, I modeled a lot of the method names after CVS
    command names...!)

    Speak up here if anyone wants me to go ahead with this or you can
    contact me at "PerlJunkie" on GMail. It's been great using SCR, and I
    thought maybe others would like this?

    (One can even, using this module, build a project over multiple
    repository types, say CVS and PVCS, and never even know the difference.
    It also helps make absolutely horrible software like VSS "appear" to
    behave halfway decently since Perl can abstract things like recursive
    labeling -- native VSS has horrible labeling options among other things!
    -- when the underlying SCR doesn't really support it.)

    -ceo
    ChrisO, Aug 7, 2005
    #1
    1. Advertising

  2. ChrisO

    ChrisO Guest

    Re: Any interest in source code repository module/drivers modeledafter DBI?

    Slaven Rezic wrote:

    > ChrisO <> writes:
    >
    > [...]
    >
    > There's already VCS at CPAN: "Library for generic Version Control
    > System access in Perl". Unfortunately development seems to be stalled,
    > but at least the namespace and the idea are there.
    >


    Thanks for pointing this out. I looked around quickly and didn't come
    across anything other than a wrapper for VSS and it was definitely VSS
    specific. (Though by all this I admit I searched *very* quickly... :))

    I'll check VCS out. I don't want to duplicate any effort, nor, as I
    said, invest any effort if there is no interest in such a thing.

    -ceo
    ChrisO, Aug 8, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bruce
    Replies:
    1
    Views:
    948
    Roedy Green
    Mar 21, 2006
  2. Replies:
    7
    Views:
    339
    gene tani
    Jun 21, 2005
  3. Andy Leszczynski

    HP open source printer drivers are in Python

    Andy Leszczynski, Jan 13, 2006, in forum: Python
    Replies:
    5
    Views:
    1,395
    Andy Leszczynski
    Jan 18, 2006
  4. *Prot3anThr3ad*

    old repository for old C++ source code

    *Prot3anThr3ad*, Sep 29, 2006, in forum: C++
    Replies:
    6
    Views:
    365
    *Prot3anThr3ad*
    Oct 2, 2006
  5. ChrisO
    Replies:
    8
    Views:
    152
    Alan Chen
    Aug 8, 2005
Loading...

Share This Page