svn module

svn module provides functions that manupilate javasvn API. See 'Version Control with Subversion', for information about subversion command line interface.

svn_add (file {, param } )

Add files, directories, or symbolic links to your working copy and schedule them for addition to the repository.

Argument Type
file String, java.io.File, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
non-recursive boolean
auto-props boolean
no-auto-props boolean
e.g.
svn_add("build.xml", {"username"=>"foo", "password"=>"bar"})
svn_cat (target {, param } )

Output the contents of the specified files or URLs.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
revision String, java.util.Data, long
expand-keywords boolean
e.g..
svn_cat("build.xml", {"username"=>"foo", "password"=>"bar"})
svn_checkout (url {, path {, param } } )

Check out a working copy from a repository.

Argument Type
url String, java.net.URL
path String, java.io.File
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
non-recursive boolean
revision String, java.util.Data, long
e.g.
svn_checkout("http://opensvn.csie.org/Pnuts/")
svn_cleanup (file {, param } )

Recursively clean up the working copy, removing locks resuming unfinished operations.

Argument Type
file String, java.io.File, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
e.g.
svn_cleanup("src")
svn_commit (target {, param } )

Send changes from your working copy to the repository.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
no-unlock boolean
non-recursive boolean
e.g.
svn_commit("README.txt")
svn_create ( dir )

Create a local repository.

Argument Type
dir String, java.io.File
e.g.
svn_create("my_module")
svn_copy ( src, dest { , param } )

Copy a file in a working copy or in the repository. src and dst can each be either a working copy (WC) path or URL.

Argument Type
src String, java.io.File, or java.net.URL
dest String, java.io.File, or java.net.URL
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
revision String, java.util.Date, long
message String
e.g.
svn_copy("foo/license.txt", "bar/license.txt")
svn_move ( src, dest { , param } )

This command moves a file or directory in your working copy or in the repository.

Argument Type
src String, java.io.File, or java.net.URL
dest String, java.io.File, or java.net.URL
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
revision String, java.util.Date, long
message String
e.g.
svn_move("foo/license.txt", "license.txt")
svn_delete ( target { , param } )

Delete an item from a working copy or the repository.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
dryRun boolean
e.g.
svn_delete("experiment")
svn_diff ( file1 { , file2 } ) or
( file1, rN, file2, rM, param )

Display the differences between two paths.

Argument Type
file1 String, java.io.File, or java.net.URL
file2 String, java.io.File, or java.net.URL
rN String, java.util.Date, or long
rM String, java.util.Date, or long
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
e.g.
svn_diff("README.txt")
svn_merge ( file1, rN, file2, rM, path, param ) or
( file1, rN, rM, path, param )

Apply the differences between two sources to a working copy path.

Argument Type
file1 String, java.io.File, java.net.URL
rN String, java.util.Data, or long
file2 String, java.io.File, java.net.URL
rM String, java.util.Data, or long
path String or java.io.File
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
non-recursive boolean
ignore-ancestry boolean
dry-run boolean
e.g.
svn_merge("http://svn.red-bean.com/repos/branches/my-branch", 250, "HEAD")
svn_export ( target, path {, param } )

Export a clean directory tree.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
path String or java.io.File
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
non-recursive boolean
native-eol boolean
e.g.
svn_export("top", "exported")
svn_import ( url, { path {, param } } )

Commit an unversioned file or tree into the repository.

Argument Type
target String or java.net.URL
path String or java.io.File
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
non-recursive boolean
no-ignore boolean
message String
e.g.
svn_import("http://localhost/repository/", "src")
svn_info ( target, { param {, handler(org.tmatesoft.svn.core.wc.SVNInfo info) } } )

Display information about a local or remote item.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map
handler Unary function

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
recursive boolean
revision String, java.util.Date, long
e.g.
for (i:svn_info(".")) {
  println(i.file,",",i.committedDate,",",i.author)
}
svn_list ( target, { param {, handler(org.tmatesoft.svn.core.SVNDirEntry entry) } } )

List directory entries in the repository.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map
handler Unary function

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
recursive boolean
revision String, java.util.Data, long
e.g.
for (i:svn_list(".")) {
  println(i.revision, ",", i.path, ",", i.date, ",", i.author)
}
svn_lock ( target, { param } )

Lock working copy paths or URLs in the repository, so that no other user can commit changes to them.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
message String
e.g.
svn_lock(".")
svn_log (file {, param { , handler(org.tmatesoft.svn.core.SVNLogEntry entry) } } )

Display commit log messages.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map
handler Unary function

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
revision String, java.util.Date, long
e.g.
> for (x:svn_log("test")) println(x.revision, ", ", x.author, ",", x.date)
3, tomatsu,Fri Apr 07 18:12:24 JST 2006
2, tomatsu,Fri Apr 07 18:12:15 JST 2006
1, tomatsu,Wed Apr 05 13:39:41 JST 2006
0, null,Wed Apr 05 12:12:55 JST 2006
e.g.
> svn_log("build.xml", {"xml"=>true})
<?xml version="1.0" encoding="utf-8"?>
<log>
<logentry
   revision="2">
<author>tomatsu</author>
<date>2006-04-07T09:12:15.441000Z</date>
<paths>
<path
   action="M">/build.xml</path>
</paths>
<msg></msg>
</logentry>
<logentry
   revision="1">
<author>tomatsu</author>
<date>2006-04-05T04:39:41.128000Z</date>
<paths>
<path
   action="A">/build.xml</path>
</paths>
<msg></msg>
</logentry>
</log>
null
svn_propdel ( target, key {, param } )

This removes properties from files, directories, or revisions.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
revprop boolean
recursive boolean
force boolean
revision String, java.util.Date, long
e.g.
svn_propdel("pnuts.bat")
svn_propget ( target, key {, param } )

Print the value of a property on files, directories, or revisions.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
revprop boolean
revprop boolean
strict boolean
recursive boolean
revision String, java.util.Date, long
e.g.
svn_propget("pnuts.bat")
svn_proplist ( target {, param } )

List all properties on files, directories, or revisions.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
revprop boolean
recursive boolean
verbose boolean
revision String, java.util.Date, long
e.g.
svn_proplist("pnuts.bat")
svn_propset ( target, propname, value {, param } )

Set propname to value on files, directories, or revisions.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
recursive boolean
revprop boolean
e.g.

svn_revert ( target {, param } )

Reverts any local changes to a file or directory and resolves any conflicted states.

Argument Type
target String, java.io.File, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
recursive boolean
e.g.
svn_revert("build.xml")
svn_status ( target {, param {, handler(org.tmatesoft.svn.core.wc.SVNStatus status) } } )

Print the status of working copy files and directories.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map
handler Unary function

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
e.g.
for (i:svn_status(".")) {
  if (string(i.contentsStatus) == "modified") println(i.file)
}
svn_switch ( url, path {, param } ) or
( fromURL, toURL , path, param )

Update working copy to a different URL.

Argument Type
url, fromURL, toURL String or java.net.URL
path String, java.io.File, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
revision String
non-recursive boolean
relocate boolean
e.g.
svn_switch("http://svn.red-bean.com/repos/branches/vendors-with-fix", ".")
svn_unlock ( target {, param } )

Unlock working copy paths or URLs.

Argument Type
target String, java.io.File, java.net.URL, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
force boolean
e.g.
svn_unlock(".")
svn_update ( target {, param } )

svn_update() brings changes from the repository into your working copy.

Argument Type
target String, java.io.File, or Array/Collection/Generator of those types
param java.util.Map

Options to the command can be specified in param.

Option Type
username String
password String
no-auth-cache boolean
config-dir String
revision String, java.util.Date, long
non-recursive boolean
e.g.
svn_update(".")