On Aug 3, 2005, at 11:06 PM, Kev Jackson wrote:
> I did an svn up this morning and discovered this whole new bundle
> of code!
>
> Lookingn through it it looks cool, but there''s no CVS support for
> an SCM - I''d have thought this would be more widely used than
> darcs. Looking at the code for subversion.rb and I thought it''d
be
> possible to add a new scm - CVS.
Part of the Rails philosophy has been "don''t implement it until
you
need it." Since at 37signals we use a subversion repo for our apps,
that was implemented first. Several members of the core team also use
darcs, so that was implemented next. None of us are using CVS, so no
attempt was made to implement it--I was just waiting for an
enterprising soul (like yourself, Kev!) to do it for me. ;)
> I''m running into 3 problems:
> 1- I''m still learning ruby so therefore I''m crap
> 2- I don''t have the required infrastructure to test the resulting
> script
> 3- Is it possible to discover the latest version of a repo fro CVS
> - I''m not sure it is as each file has an individual version
number,
> this makes writing the latest_revision method a bit of a mare.
>
> Anyway here''s where I got upto before I was dragged off to work on
> some Java for a customer;
Excellent start, Kev. If anyone does get a CVS version working,
please submit a patch. I haven''t used CVS myself in quite a long
time, so I''m afraid I won''t be much help in ironing out the
snarls
you ran into, or in testing it. :(
- Jamis
>
>
> module SwitchTower
> module SCM
> # An SCM module for using CVS as your source control tool. Use
> it by
> # specifying the following line in your configuration:
> #
> # set :scm, :cvs
> #
> # Also, this module accepts a <tt>:cvs</tt> configuration
variable,
> # which (if specified) will be used as the full path to the darcs
> # executable on the remote machine:
> #
> # set :cvs, "/opt/local/bin/cvs"
> class CVS
> attr_reader :configuration
> def initialize(configuration)
> @configuration = configuration
> end
> def checkout(actor)
> cvs = configuration[:cvs] ? configuration[:cvs] : "cvs"
> command = <<-CMD
> if [[ ! -d #{actor.release_path} ]]; then
> #{cvs} co #{configuration.repository} #{actor.release_path}
> fi
> CMD
> actor.run(command)
> end
> end
> end
> end
>
> As you can see it''s nothing more than a rip-off of the subversion
> one, minus the subversion bits. I got this far and then ran into a
> problem of being able to test it. Any thoughts on whether this
> would be useful (as a task for switchtower), how to solve the
> latest_revision problem (note I just ripped it out when I realized
> it wasn''t going to be easy - I wanted quick feedback!)
>
> Kev
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>