0.0
No commit activity in last 3 years
No release in over 3 years
A simple wrapper around CVS command line tool
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

cvs-wrapper

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

How to install?

gem install cvs-wrapper

How to run all the tests

rake

How to build the gem

rake build

Examples of usage

Create repository

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

Open an existing repository and checkout a module

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'

Commit a file

cvs.commit 'module2/File1.java', 'Commit Message'    

Tag a module or a file

cvs.rtag 'module2', 'tagname'
cvs.rtag 'module2/File.txt', 'tagname'        

Branch a module

cvs.rtag 'module1', 'tagname', branch: true

Remove File

cvs.remove 'module1/filename'

Add a file

cvs.add 'module1/filename'

Current branch of a given file/module

cvs.current_branch 'module1/filename'

Current revision of a given file

cvs.current_revision 'module1/filename'

Current previous revision of a given file

cvs.previous_revision 'module1/filename'

Update file to the most recent version of the specified branch

cvs.update 'module1/filename'

Diff between last two revisions

cvs.last_diff 'module1/filename'

Diff between two revisions

cvs.diff '1.2.3', '1.5.2.1', 'module1/filename1'