Created
April 17, 2012 16:28
-
-
Save EwanDawson/2407315 to your computer and use it in GitHub Desktop.
JavaHg test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GrabResolver(name='javahg', root='https://oss.sonatype.org/content/repositories/snapshots/') | |
@Grab(group='com.aragost.javahg', module='javahg', version='0.3-SNAPSHOT') | |
import com.aragost.javahg.* | |
import com.aragost.javahg.commands.* | |
config = new RepositoryConfiguration() | |
config.hgrcPath = null // forces Mercurial to look in the usual places for .hgrc | |
rep = Repository.open(config, new File('.')) // assume the current directory is a repo | |
// Print the status of the repo | |
status = new StatusCommand(rep) | |
status.lines().each { println it } | |
// Tag the repo | |
tag = new TagCommand(rep) | |
tag.execute("MyTag") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment