No commit activity in last 3 years
No release in over 3 years
A simple wrapper around HG 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

mercurial-wrapper

A simple ruby wrapper around mercurial 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 mercurial-wrapper

How to run all the tests

rake

How to build the gem

rake build

Examples of usage

Create repository

Dir.mkdir File.join(basedir, REPO_NAME)
repo1 = Mercurial.new(logger).config do |settings|
  settings[:basedir] = basedir
  settings[:repo_name] = REPO_NAME
end
repo1.init

Clone an existing repository

repo1 = Mercurial.new(logger).config do |settings|
  settings[:basedir] = basedir
  settings[:repo_name] = REPO_NAME
end

repo1.clone 'https://github.com/datalex-opensource/mercurial-wrapper'

Commit a file

repo1.commit 'module2/File1.java', 'Commit Message', '2013-06-01 00:00:00' 

Push changes

repo1.push       

Branch a repository (automatically commits)

repo1.create_branch 'branch1', 'Commit message'

Remove File

repo1.remove 'module1/filename'

Add a file

repo1.add 'module1/filename'

Current branch of a given file/module

repo1.current_branch 'module1/filename'

Current revision of a given file

repo1.current_revision 'module1/filename'

Previous revision of a given file

repo1.previous_revision 'module1/filename'

Pull changesets

repo1.pull