A simple ruby wrapper around cvs command line tool. This gem relies heavily on childprocess, and it is compatible with MRI and JRuby runtimes. Below you will find more information on how to install and use this gem. For more information about all options available please check the specs or dive into the source code
gem install cvs-wrapper
rake
rake build
cvs = CVS.init('/path/to/cvs/root', '/usr/bin/cvs', logger).config do |settings, logger|
settings[:basedir] = '/path/to/my/working/dir' #where, by default, cvs commands will be ran.
end
cvs = CVS.new(logger).config do |settings|
settings[:basedir] = '/path/to/basedir'
settings[:root] = '/path/to/cvsroot'
settings[:executable] = '/usr/bin/cvs'
end
cvs.checkout 'module1'
cvs.checkout 'module1', branch: 'branch1'
cvs.checkout 'module1', branch: 'branch1', basedir: '/path/to/another/dir', timestamp: '04/14/2006 09:00'
cvs.commit 'module2/File1.java', 'Commit Message'
cvs.rtag 'module2', 'tagname'
cvs.rtag 'module2/File.txt', 'tagname'
cvs.rtag 'module1', 'tagname', branch: true
cvs.remove 'module1/filename'
cvs.add 'module1/filename'
cvs.current_branch 'module1/filename'
cvs.current_revision 'module1/filename'
cvs.previous_revision 'module1/filename'
cvs.update 'module1/filename'
cvs.last_diff 'module1/filename'
cvs.diff '1.2.3', '1.5.2.1', 'module1/filename1'