How do I automate cvs?

Hi

I would like to automate my checkouts for the latest ruby.
Is there are way to do this using the net libraries?

Right now I am using system calls and, of course, I can’t
get around the anonymous login requirement without manual
intervention.

My simple hack is below:

t = Time.now
path = sprintf(“ruby_%d%02d%02d”, t.year, t.month, t.day)
Dir.mkdir(path) unless File.exists?(path)
Dir.chdir(path)
puts Dir.pwd
root = ":pserver:anonymous@cvs.ruby-lang.org:"
cmd = "cvs -d #{root}/src login"
puts cmd
system(cmd)

#(Logging in to anonymous@cvs.ruby-lang.org)
#CVS password: (anonymous)
cmd = "cvs -z4 -d #{root}/src co ruby"
puts cmd
system(cmd)
cmd = "cvs -z4 -d #{root}/src co rubicon"
puts cmd
system(cmd)

Thanks

···


Jim Freeze

If you think the problem is bad now, just wait until we’ve solved it.
– Arthur Kasspe

Right now I am using system calls and, of course, I can't
get around the anonymous login requirement without manual
intervention.

svg% cvs -d :pserver:anonymous:anonymous@cvs.ruby-lang.org:/ruby login
Logging in to :pserver:anonymous@cvs.ruby-lang.org:2401/ruby
svg%

syntax is :pserver:user:password@host

Guy Decoux

Hi,

···

At Thu, 29 May 2003 22:33:55 +0900, Jim Freeze wrote:

Right now I am using system calls and, of course, I can’t
get around the anonymous login requirement without manual
intervention.

You don’t need to login each time.


Nobu Nakada

Thanks

···

On Thursday, 29 May 2003 at 22:54:07 +0900, ts wrote:

Right now I am using system calls and, of course, I can’t
get around the anonymous login requirement without manual
intervention.

svg% cvs -d :pserver:anonymous:anonymous@cvs.ruby-lang.org:/ruby login
Logging in to :pserver:anonymous@cvs.ruby-lang.org:2401/ruby
svg%

syntax is :pserver:user:password@host


Jim Freeze

Monday, n.:
In Christian countries, the day after the baseball game.
– Ambrose Bierce, “The Devil’s Dictionary”