On Mon, 2007-09-17 at 10:12 -0400, Jesse Keating wrote:
On Mon, 17 Sep 2007 10:06:04 -0400
rob myers <rob.myers(a)gtri.gatech.edu> wrote:
> does anyone have any ideas about how to abstract or generalize the SCM
> backend from koji? the cvs/svn/git SCM backends all perform similar
> functions and use similar code- what is the best way to make them
> co-exist with maintainability and extensibility?
Probably the best way is to create an "scm_callback" or some such.
Each function that deals with scm calls just calls
"scm_callback(options)". A config file setting would define which
scm_callback to use, either git/svn/hg/cvs/etc... They would all need
to take the same options (whether or not they do anything with all the
options doesn't matter). This way scm oddities are defined once per
scm in the callback definition, and the rest of the koji code just
calls generic scm_callback functions.
i think so. i don't have time to code this up right now, but i think it
is worth doing. maybe i can find some time to develop a patch in the
next couple of weeks. if anyone wants to beat me to it, that'd be