Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/swig/ruby/svn/client.rb view on Meta::CPAN
alias praise blame
alias annotate blame
alias ann annotate
# Returns a value of a revision property named +name+ for +uri+
# at +rev+, as a String.
# Both URLs and paths are available as +uri+.
def revprop(name, uri, rev)
value, = revprop_get(name, uri, rev)
value
end
alias rp revprop
# Returns a value of a revision property named +name+ for +uri+
# at +rev+, as an Array such as <tt>[value, rev]</tt>.
# Both URLs and paths are available as +uri+.
def revprop_get(name, uri, rev)
result = Client.revprop_get(name, uri, rev, self)
if result.is_a?(Array)
result
else
[nil, result]
end
end
alias rpget revprop_get
alias rpg revprop_get
# Sets +value+ as a revision property named +name+ for +uri+ at +rev+.
# Both URLs and paths are available as +uri+.
def revprop_set(name, value, uri, rev, force=false)
Client.revprop_set(name, value, uri, rev, force, self)
end
alias rpset revprop_set
alias rps revprop_set
# Deletes a revision property, named +name+, for +uri+ at +rev+.
# Both URLs and paths are available as +uri+.
def revprop_del(name, uri, rev, force=false)
Client.revprop_set(name, nil, uri, rev, force, self)
end
alias rpdel revprop_del
alias rpd revprop_del
# Returns a list of revision properties set for +uri+ at +rev+,
# as an Array such as
# <tt>[{revprop1 => value1, revprop2 => value2, ...}, rev]</tt>.
# Both URLs and paths are available as +uri+.
def revprop_list(uri, rev)
props, rev = Client.revprop_list(uri, rev, self)
if props.has_key?(Svn::Core::PROP_REVISION_DATE)
props[Svn::Core::PROP_REVISION_DATE] =
Time.from_svn_format(props[Svn::Core::PROP_REVISION_DATE])
end
[props, rev]
end
alias rplist revprop_list
alias rpl revprop_list
def export(from, to, rev=nil, peg_rev=nil,
force=false, ignore_externals=false,
depth=nil, native_eol=nil)
Client.export4(from, to, rev, peg_rev, force,
ignore_externals, depth, native_eol, self)
end
def ls(path_or_uri, rev=nil, peg_rev=nil, recurse=false)
rev ||= URI(path_or_uri).scheme ? "HEAD" : "BASE"
peg_rev ||= rev
Client.ls3(path_or_uri, rev, peg_rev, recurse, self)
end
# Invokes block once for each path below +path_or_uri+ at +rev+
# and returns +nil+.
# +path+ is a relative path from the +path_or_uri+.
# +dirent+ is an instance of Svn::Core::Dirent.
# +abs_path+ is an absolute path for +path_or_uri+ in the repository.
def list(path_or_uri, rev, peg_rev=nil, depth_or_recurse=Core::DEPTH_IMMEDIATES,
dirent_fields=nil, fetch_locks=true,
&block) # :yields: path, dirent, lock, abs_path
depth = Core::Depth.infinity_or_immediates_from_recurse(depth_or_recurse)
dirent_fields ||= Core::DIRENT_ALL
Client.list2(path_or_uri, peg_rev, rev, depth, dirent_fields,
fetch_locks, block, self)
end
def switch(path, uri, peg_rev=nil, rev=nil, depth=nil,
ignore_externals=false, allow_unver_obstruction=false,
depth_is_sticky=false)
Client.switch2(path, uri, peg_rev, rev, depth, depth_is_sticky,
ignore_externals, allow_unver_obstruction, self)
end
def set_log_msg_func(callback=Proc.new)
callback_wrapper = Proc.new do |items|
items = items.collect do |item|
item_wrapper = CommitItemWrapper.new(item)
end
callback.call(items)
end
set_log_msg_func2(callback_wrapper)
end
def set_log_msg_func2(callback=Proc.new)
@log_msg_baton = Client.set_log_msg_func3(self, callback)
end
def set_notify_func(callback=Proc.new)
@notify_baton = Client.set_notify_func2(self, callback)
end
def set_cancel_func(callback=Proc.new)
@cancel_baton = Client.set_cancel_func(self, callback)
end
def config=(new_config)
Client.set_config(self, new_config)
end
def config
Client.get_config(self)
end
( run in 0.732 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )