view release on metacpan or search on metacpan
src/subversion/subversion/tests/cmdline/upgrade_tests_data/tree-replace2.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_1_0.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_1_5.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_1_7_dir_external.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_absent.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_absent_repos.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_file_externals.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_from_1_7_wc.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_locked.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_missing_replaced.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_not_present_replaced.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_tc.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_wcprops.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_with_externals.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/upgrade_with_scheduled_change.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/wc-3x-1.4.0.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/wc-3x-1.4.6.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/wc-3x-1.6.12.tar.bz2
src/subversion/subversion/tests/cmdline/upgrade_tests_data/wc-delete.tar.bz2
src/subversion/subversion/tests/cmdline/wc_tests.py
src/subversion/subversion/tests/greek-tree.txt
src/subversion/subversion/bindings/ctypes-python/test/localrepos.py view on Meta::CPAN
)
def test_local_check_path(self):
self.assertEqual(svn_node_file,
self.repos.check_path("trunk/README.txt"))
self.assertEqual(svn_node_dir,
self.repos.check_path("trunk/dir", 6))
self.assertEqual(svn_node_none,
self.repos.check_path("trunk/dir", 7))
self.assertEqual(svn_node_none,
self.repos.check_path("does_not_compute"))
def suite():
return unittest.makeSuite(LocalRepositoryTestCase, 'test')
if __name__ == '__main__':
runner = unittest.TextTestRunner()
runner.run(suite())
src/subversion/subversion/bindings/ctypes-python/test/remoterepos.py view on Meta::CPAN
self.assertEqual(9, self.repos.latest_revnum())
def test_remote_check_path(self):
self.assertEqual(svn_node_file,
self.repos.check_path("trunk/README.txt"))
self.assertEqual(svn_node_dir,
self.repos.check_path("trunk/dir", 6))
self.assertEqual(svn_node_none,
self.repos.check_path("trunk/dir", 7))
self.assertEqual(svn_node_none,
self.repos.check_path("does_not_compute"))
def test_list(self):
expected = {
'README.txt':
svn_dirent_t(kind=svn_node_file, size=159, has_props=True,
created_rev=9, last_author=String('bruce')),
'ANOTHERREADME.txt':
svn_dirent_t(kind=svn_node_file, size=66, has_props=False,
created_rev=4, last_author=String('clark')) }
found = self.repos.list("trunk")
src/subversion/subversion/bindings/swig/perl/native/core.c view on Meta::CPAN
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
src/subversion/subversion/bindings/swig/perl/native/svn_client.c view on Meta::CPAN
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
src/subversion/subversion/bindings/swig/perl/native/svn_delta.c view on Meta::CPAN
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
src/subversion/subversion/bindings/swig/perl/native/svn_diff.c view on Meta::CPAN
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
src/subversion/subversion/bindings/swig/perl/native/svn_fs.c view on Meta::CPAN
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
src/subversion/subversion/bindings/swig/perl/native/svn_ra.c view on Meta::CPAN
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
src/subversion/subversion/bindings/swig/perl/native/svn_repos.c view on Meta::CPAN
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
src/subversion/subversion/bindings/swig/perl/native/svn_wc.c view on Meta::CPAN
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
src/subversion/subversion/bindings/swig/proxy/swig_perl_external_runtime.swg view on Meta::CPAN
/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
# define PERL_PATCHLEVEL_H_IMPLICIT
# include <patchlevel.h>
# endif
# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
# include <could_not_find_Perl_patchlevel.h>
# endif
# ifndef PERL_REVISION
# define PERL_REVISION (5)
# define PERL_VERSION PATCHLEVEL
# define PERL_SUBVERSION SUBVERSION
# endif
#endif
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
src/subversion/subversion/bindings/swig/ruby/svn/commit-mailer.rb view on Meta::CPAN
"(#{format_size(options.max_size)})") do |max_size|
begin
options.max_size = parse_size(max_size)
rescue ArgumentError
raise OptionParser::InvalidArgument, max_size
end
end
opts.on("--no-limit-size",
"Don't limit mail body size",
"(#{options.max_size.nil?})") do |not_limit_size|
options.max_size = nil
end
opts.on("--[no-]utf7",
"Use UTF-7 encoding for mail body instead",
"of UTF-8 (#{options.use_utf7})") do |use_utf7|
options.use_utf7 = use_utf7
end
end
src/subversion/subversion/bindings/swig/ruby/test/test_client.rb view on Meta::CPAN
end
def teardown
teardown_basic
end
def test_version
assert_equal(Svn::Core.subr_version, Svn::Client.version)
end
def test_add_not_recurse
log = "sample log"
dir = "dir"
dir_path = File.join(@wc_path, dir)
path = File.join(dir_path, dir)
uri = "#{@repos_uri}/#{dir}/#{dir}"
make_context(log) do |ctx|
FileUtils.mkdir(dir_path)
FileUtils.mkdir(path)
ctx.add(dir_path, false)
src/subversion/subversion/bindings/swig/ruby/test/test_client.rb view on Meta::CPAN
end
assert_equal([[false, true, false, false]], node_kinds)
end
end
def assert_changed(ctx, path)
statuses = []
ctx.status(path) do |_, status|
statuses << status
end
assert_not_equal([], statuses)
end
def assert_not_changed(ctx, path)
statuses = []
ctx.status(path) do |_, status|
statuses << status
end
assert_equal([], statuses)
end
def assert_merge
log = "sample log"
file = "sample.txt"
src/subversion/subversion/bindings/swig/ruby/test/test_client.rb view on Meta::CPAN
rev2,
{
"svn:author" => @author,
"svn:log" => log,
},
false,
]
],
merged_entries)
mergeinfo = ctx.merged(trunk)
assert_not_nil(mergeinfo)
assert_equal([branch_uri], mergeinfo.keys)
ranges = mergeinfo[branch_uri].collect {|range| range.to_a}
assert_equal([[1, 2, true]], ranges)
rev3 = ctx.commit(@wc_path).revision
assert_equal(normalize_line_break(src), ctx.cat(trunk_path, rev3))
ctx.rm(branch_path)
rev4 = ctx.commit(@wc_path).revision
src/subversion/subversion/bindings/swig/ruby/test/test_client.rb view on Meta::CPAN
assert(File.exist?(trunk_path))
ctx.up(@wc_path)
yield(ctx, branch, rev3, rev4, trunk, nil, false, true)
assert_changed(ctx, trunk)
ctx.propdel("svn:mergeinfo", trunk)
rev6 = ctx.commit(@wc_path).revision
yield(ctx, branch, rev3, rev4, trunk, nil, false, true, true)
assert_not_changed(ctx, trunk)
yield(ctx, branch, rev3, rev4, trunk, nil, false, true)
assert_changed(ctx, trunk)
end
end
def test_merge
assert_merge do |ctx, from, from_rev1, from_rev2, to, *rest|
ctx.merge(from, from_rev1, from, from_rev2, to, *rest)
end
src/subversion/subversion/bindings/swig/ruby/test/test_client.rb view on Meta::CPAN
ctx.resolved(dir_path, false)
assert_raises(Svn::Error::WcFoundConflict) do
ctx.ci(@wc_path)
end
ctx.resolved(dir_path)
info = nil
assert_nothing_raised do
info = ctx.ci(@wc_path)
end
assert_not_nil(info)
assert_equal(rev2 + 1, info.revision)
end
end
def test_copy
log = "sample log"
src = "source\n"
file1 = "sample1.txt"
file2 = "sample2.txt"
path1 = Pathname.new(@wc_path) + file1
src/subversion/subversion/bindings/swig/ruby/test/test_client.rb view on Meta::CPAN
yield ctx, path
end
end
def test_resolve_base
assert_resolve(Svn::Wc::CONFLICT_CHOOSE_BASE) do |ctx,path|
info = nil
assert_nothing_raised do
info = ctx.ci(@wc_path)
end
assert_not_nil(info)
assert_equal(3, info.revision)
assert_equal("", File.read(path))
end
end
def test_resolve_theirs_full
assert_resolve(Svn::Wc::CONFLICT_CHOOSE_THEIRS_FULL) do |ctx,path|
info = nil
assert_nothing_raised do
info = ctx.ci(@wc_path)
end
assert_not_nil(info)
assert_equal(-1, info.revision)
assert_equal("before\n", File.read(path))
end
end
def test_resolve_mine_full
assert_resolve(Svn::Wc::CONFLICT_CHOOSE_MINE_FULL) do |ctx,path|
info = nil
assert_nothing_raised do
info = ctx.ci(@wc_path)
end
assert_not_nil(info)
assert_equal(3, info.revision)
assert_equal("after\n", File.read(path))
end
end
def test_resolve_theirs_conflict
assert_resolve(Svn::Wc::CONFLICT_CHOOSE_THEIRS_FULL) do |ctx,path|
info = nil
assert_nothing_raised do
info = ctx.ci(@wc_path)
end
assert_not_nil(info)
assert_equal(-1, info.revision)
assert_equal("before\n", File.read(path))
end
end
def test_resolve_mine_conflict
assert_resolve(Svn::Wc::CONFLICT_CHOOSE_MINE_FULL) do |ctx,path|
info = nil
assert_nothing_raised do
info = ctx.ci(@wc_path)
end
assert_not_nil(info)
assert_equal(3, info.revision)
assert_equal("after\n", File.read(path))
end
end
def test_resolve_merged
assert_resolve(Svn::Wc::CONFLICT_CHOOSE_MERGED) do |ctx,path|
info = nil
assert_nothing_raised do
info = ctx.ci(@wc_path)
end
assert_not_nil(info)
assert_equal(3, info.revision)
assert_equal("<<<<<<< .mine\nafter\n=======\nbefore\n>>>>>>> .r2\n",
File.read(path))
end
end
end
src/subversion/subversion/bindings/swig/ruby/test/test_core.rb view on Meta::CPAN
# shaves these off. So we can compare epoch time instead
assert_equal(now.to_i, Time.from_svn_format(str).gmtime.to_i)
else
assert_equal(now, Time.from_svn_format(str).gmtime)
end
apr_time = now.to_i * 1000000 + now.usec
assert_equal(apr_time, now.to_apr_time)
end
def test_not_new_auth_provider_object
assert_raise(NoMethodError) do
Svn::Core::AuthProviderObject.new
end
end
def test_version_to_x
major = 1
minor = 2
patch = 3
tag = "-dev"
src/subversion/subversion/bindings/swig/ruby/test/test_core.rb view on Meta::CPAN
def test_version_equal
major = 1
minor = 2
patch = 3
tag = ""
ver1 = Svn::Core::Version.new(major, minor, patch, tag)
ver2 = Svn::Core::Version.new(major, minor, patch, tag)
ver3 = Svn::Core::Version.new
assert_equal(ver1, ver2)
assert_not_equal(ver1, ver3)
end
def test_version_compatible?
major = 1
minor = 2
patch = 3
my_tag = "-devel"
lib_tag = "-devel"
ver1 = Svn::Core::Version.new(major, minor, patch, my_tag)
src/subversion/subversion/bindings/swig/ruby/test/test_core.rb view on Meta::CPAN
eraser = Svn::Core::MergeInfo.parse("/trunk: 7,9-11")
removed = info.remove(eraser)
assert_equal(["/trunk"], removed.keys)
assert_equal([[4, 6, true], [7, 8, true], [11, 13, true]],
removed["/trunk"].collect {|range| range.to_a})
end
def test_mergeinfo_to_s
info = Svn::Core::MergeInfo.parse("/trunk: 5,7,9-13")
assert_equal("/trunk:5,7,9-13", info.to_s)
assert_not_equal(info.to_s, info.inspect)
info = Svn::Core::MergeInfo.parse("/trunk: 5*,7,9-13")
assert_equal("/trunk:5*,7,9-13", info.to_s)
assert_not_equal(info.to_s, info.inspect)
end
def test_mergeinfo_sort
info = Svn::Core::MergeInfo.parse("/trunk: 5,7,9-13")
info["/trunk"] = info["/trunk"].reverse
assert_equal(["/trunk"], info.keys)
assert_equal([[13, 8, true], [7, 6, true], [5, 4, true]],
info["/trunk"].collect {|range| range.to_a})
src/subversion/subversion/bindings/swig/ruby/test/test_core.rb view on Meta::CPAN
reversed = range_list.reverse
assert_equal([[13, 10, true], [8, 7, true], [5, 4, true]],
reversed.collect {|range| range.to_a})
end
def test_range_list_to_s
range_list = Svn::Core::RangeList.new([4, 6, true],
[6, 8, true], [9, 13, true])
expectation = "5-6,7-8,10-13"
assert_equal(expectation, range_list.to_s)
assert_not_equal(expectation, range_list.inspect)
end
def test_mergerange_equality
mergerange1 = Svn::Core::MergeRange.new(1,2,true)
mergerange2 = Svn::Core::MergeRange.new(1,2,true)
mergerange3 = Svn::Core::MergeRange.new(1,2,false)
mergerange4 = Svn::Core::MergeRange.new(1,4,true)
assert_equal(mergerange1, mergerange2)
assert_not_equal(mergerange1, mergerange3)
assert_not_equal(mergerange1, mergerange4)
end
private
def used_pool
pool = Svn::Core::Pool.new
now = Time.now.gmtime
Svn::Core.time_to_human_cstring(now.to_apr_time, pool)
pool
end
end
src/subversion/subversion/bindings/swig/ruby/test/test_repos.rb view on Meta::CPAN
assert_nil(@repos.prop(Svn::Core::PROP_REVISION_LOG))
assert_equal([
Svn::Core::PROP_REVISION_AUTHOR,
Svn::Core::PROP_REVISION_DATE,
].sort,
@repos.proplist.keys.sort)
assert_raises(Svn::Error::ReposHookFailure) do
@repos.set_prop(@author, Svn::Core::PROP_REVISION_DATE, nil)
end
assert_not_nil(@repos.prop(Svn::Core::PROP_REVISION_DATE))
assert_nothing_raised do
@repos.set_prop(@author, Svn::Core::PROP_REVISION_DATE, nil, nil, nil,
false)
end
assert_nil(@repos.prop(Svn::Core::PROP_REVISION_DATE))
assert_equal([
Svn::Core::PROP_REVISION_AUTHOR,
].sort,
@repos.proplist.keys.sort)
src/subversion/subversion/bindings/swig/ruby/test/test_repos.rb view on Meta::CPAN
end
end
[
[StringIO.new(""), Svn::Repos::LOAD_UUID_DEFAULT, "/"],
[StringIO.new("")],
[],
].each_with_index do |args, i|
dest_path = File.join(@tmp_path, "dest#{i}")
Svn::Repos.create(dest_path) do |repos|
assert_not_equal(@repos.fs.root.committed_info("/"),
repos.fs.root.committed_info("/"))
dump.rewind
repos.load_fs(dump, *args)
assert_equal(@repos.fs.root.committed_info("/"),
repos.fs.root.committed_info("/"))
end
end
end
end
src/subversion/subversion/bindings/swig/ruby/test/test_wc.rb view on Meta::CPAN
Svn::Wc::AdmAccess.open(nil, @wc_path, false, 0) do |adm|
status = adm.status(file1_path)
assert_equal(Svn::Wc::STATUS_NORMAL, status.text_status)
assert_equal(commit_info.revision, status.entry.revision)
end
end
end
def test_wc
assert_not_equal(0, Svn::Wc.check_wc(@wc_path))
assert(Svn::Wc.normal_prop?("name"))
assert(Svn::Wc.wc_prop?("#{Svn::Core::PROP_WC_PREFIX}name"))
assert(Svn::Wc.entry_prop?("#{Svn::Core::PROP_ENTRY_PREFIX}name"))
end
def test_adm_access
log = "sample log"
source = "sample source"
dir = "dir"
file = "file"
src/subversion/subversion/bindings/swig/ruby/test/test_wc.rb view on Meta::CPAN
notifies = []
Svn::Wc::AdmAccess.open(nil, @wc_path) do |access|
access.set_changelist(@wc_path, "789", nil, notify_collector)
end
end
def test_context_new_default_config
assert_not_nil context = Svn::Wc::Context.new
ensure
context.destroy
end
def test_context_new_specified_config
config_file = File.join(@config_path, Svn::Core::CONFIG_CATEGORY_CONFIG)
config = Svn::Core::Config.read(config_file)
assert_not_nil context = Svn::Wc::Context.new(:config=>config)
ensure
context.destroy
end
def test_context_create
assert_nothing_raised do
result = Svn::Wc::Context.create do |context|
assert_not_nil context
assert_kind_of Svn::Wc::Context, context
end
if RUBY_VERSION > '1.9'
assert_equal(result,true)
else
assert_nil result
end
end
end
src/subversion/subversion/include/private/svn_wc_private.h view on Meta::CPAN
* Use @a scratch_pool for all temporary allocations.
*/
svn_error_t *
svn_wc__node_get_deleted_ancestor(const char **deleted_ancestor_abspath,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Set @a *not_present to TRUE when @a local_abspath has status
* svn_wc__db_status_not_present. Set @a *user_excluded to TRUE when
* @a local_abspath has status svn_wc__db_status_excluded. Set
* @a *server_excluded to TRUE when @a local_abspath has status
* svn_wc__db_status_server_excluded. Otherwise set these values to FALSE.
* If @a base_only is TRUE then only the base node will be examined,
* otherwise the current base or working node will be examined.
*
* If a value is not interesting you can pass #NULL.
*
* If @a local_abspath is not in the working copy, return
* @c SVN_ERR_WC_PATH_NOT_FOUND. Use @a scratch_pool for all temporary
* allocations.
*/
svn_error_t *
svn_wc__node_is_not_present(svn_boolean_t *not_present,
svn_boolean_t *user_excluded,
svn_boolean_t *server_excluded,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t base_only,
apr_pool_t *scratch_pool);
/**
* Set @a *is_added to whether @a local_abspath is added, using
* @a wc_ctx. If @a local_abspath is not in the working copy, return
src/subversion/subversion/include/private/svn_wc_private.h view on Meta::CPAN
const svn_checksum_t *checksum,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Gets an array of const char *repos_relpaths of descendants of LOCAL_ABSPATH,
* which must be the op root of an addition, copy or move. The descendants
* returned are at the same op_depth, but are to be deleted by the commit
* processing because they are not present in the local copy.
*/
svn_error_t *
svn_wc__get_not_present_descendants(const apr_array_header_t **descendants,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Checks a node LOCAL_ABSPATH in WC_CTX for several kinds of obstructions
* for tasks like merge processing.
*
* If a node is not obstructed it sets *OBSTRUCTION_STATE to
src/subversion/subversion/libsvn_client/commit_util.c view on Meta::CPAN
NULL /* ignore_patterns */,
harvest_status_callback,
&baton,
cancel_func, cancel_baton,
scratch_pool));
return SVN_NO_ERROR;
}
static svn_error_t *
harvest_not_present_for_copy(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_client__committables_t *committables,
const char *repos_root_url,
const char *commit_relpath,
svn_client__check_url_kind_t check_url_func,
void *check_url_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
const apr_array_header_t *children;
src/subversion/subversion/libsvn_client/commit_util.c view on Meta::CPAN
/* A function to retrieve not present children would be nice to have */
SVN_ERR(svn_wc__node_get_children_of_working_node(
&children, wc_ctx, local_abspath, TRUE,
scratch_pool, iterpool));
for (i = 0; i < children->nelts; i++)
{
const char *this_abspath = APR_ARRAY_IDX(children, i, const char *);
const char *name = svn_dirent_basename(this_abspath, NULL);
const char *this_commit_relpath;
svn_boolean_t not_present;
svn_node_kind_t kind;
svn_pool_clear(iterpool);
SVN_ERR(svn_wc__node_is_not_present(¬_present, NULL, NULL, wc_ctx,
this_abspath, FALSE, scratch_pool));
if (!not_present)
continue;
if (commit_relpath == NULL)
this_commit_relpath = NULL;
else
this_commit_relpath = svn_relpath_join(commit_relpath, name,
iterpool);
/* We should check if we should really add a delete operation */
if (check_url_func)
src/subversion/subversion/libsvn_client/commit_util.c view on Meta::CPAN
baton->skip_below_abspath = apr_pstrdup(baton->result_pool,
local_abspath);
return SVN_NO_ERROR;
}
/* Recursively handle each node according to depth, except when the
node is only being deleted, or is in an added tree (as added trees
use the normal commit handling). */
if (copy_mode && !is_added && !is_deleted && status->kind == svn_node_dir)
{
SVN_ERR(harvest_not_present_for_copy(wc_ctx, local_abspath, committables,
repos_root_url, commit_relpath,
baton->check_url_func,
baton->check_url_baton,
result_pool, scratch_pool));
}
return SVN_NO_ERROR;
}
/* Baton for handle_descendants */
src/subversion/subversion/libsvn_client/commit_util.c view on Meta::CPAN
/* Is this a copy operation? */
if (!(item->state_flags & SVN_CLIENT_COMMIT_ITEM_ADD)
|| ! item->copyfrom_url)
continue;
if (hdb->cancel_func)
SVN_ERR(hdb->cancel_func(hdb->cancel_baton));
svn_pool_clear(iterpool);
SVN_ERR(svn_wc__get_not_present_descendants(&absent_descendants,
hdb->wc_ctx, item->path,
iterpool, iterpool));
for (j = 0; j < absent_descendants->nelts; j++)
{
svn_node_kind_t kind;
svn_client_commit_item3_t *desc_item;
const char *relpath = APR_ARRAY_IDX(absent_descendants, j,
const char *);
const char *local_abspath = svn_dirent_join(item->path, relpath,
src/subversion/subversion/libsvn_client/copy.c view on Meta::CPAN
SVN_ERR(svn_wc_read_kind2(&dst_kind, ctx->wc_ctx,
pair->dst_abspath_or_url,
FALSE /* show_deleted */,
TRUE /* show_hidden */,
iterpool));
if (dst_kind != svn_node_none)
{
svn_boolean_t is_excluded;
svn_boolean_t is_server_excluded;
SVN_ERR(svn_wc__node_is_not_present(NULL, &is_excluded,
&is_server_excluded, ctx->wc_ctx,
pair->dst_abspath_or_url, FALSE,
iterpool));
if (is_excluded || is_server_excluded)
{
return svn_error_createf(
SVN_ERR_WC_OBSTRUCTED_UPDATE,
NULL, _("Path '%s' exists, but is excluded"),
svn_dirent_local_style(pair->dst_abspath_or_url, iterpool));
src/subversion/subversion/libsvn_fs_base/bdb/txn-table.c view on Meta::CPAN
trail_t *trail,
apr_pool_t *pool)
{
base_fs_data_t *bfd = fs->fsap_data;
DBT key;
transaction_t *txn;
/* Make sure TXN is dead. */
SVN_ERR(svn_fs_bdb__get_txn(&txn, fs, txn_name, trail, pool));
if (is_committed(txn))
return svn_fs_base__err_txn_not_mutable(fs, txn_name);
/* Delete the transaction from the `transactions' table. */
svn_fs_base__str_to_dbt(&key, txn_name);
svn_fs_base__trail_debug(trail, "transactions", "del");
return BDB_WRAP(fs, N_("deleting entry from 'transactions' table"),
bfd->transactions->del(bfd->transactions,
trail->db_txn, &key, 0));
}
src/subversion/subversion/libsvn_fs_base/err.c view on Meta::CPAN
{
return
svn_error_createf
(SVN_ERR_FS_NO_SUCH_TRANSACTION, 0,
_("No transaction named '%s' in filesystem '%s'"),
txn, fs->path);
}
svn_error_t *
svn_fs_base__err_txn_not_mutable(svn_fs_t *fs, const char *txn)
{
return
svn_error_createf
(SVN_ERR_FS_TRANSACTION_NOT_MUTABLE, 0,
_("Cannot modify transaction named '%s' in filesystem '%s'"),
txn, fs->path);
}
svn_error_t *
src/subversion/subversion/libsvn_fs_base/err.h view on Meta::CPAN
/* SVN_ERR_FS_CORRUPT: the entry for COPY_ID in the `copies' table
is corrupt. */
svn_error_t *svn_fs_base__err_corrupt_copy(svn_fs_t *fs, const char *copy_id);
/* SVN_ERR_FS_NO_SUCH_TRANSACTION: there is no transaction named TXN in FS. */
svn_error_t *svn_fs_base__err_no_such_txn(svn_fs_t *fs, const char *txn);
/* SVN_ERR_FS_TRANSACTION_NOT_MUTABLE: trying to change the
unchangeable transaction named TXN in FS. */
svn_error_t *svn_fs_base__err_txn_not_mutable(svn_fs_t *fs, const char *txn);
/* SVN_ERR_FS_NO_SUCH_COPY: there is no copy with id COPY_ID in FS. */
svn_error_t *svn_fs_base__err_no_such_copy(svn_fs_t *fs, const char *copy_id);
/* SVN_ERR_FS_BAD_LOCK_TOKEN: LOCK_TOKEN does not refer to a lock in FS. */
svn_error_t *svn_fs_base__err_bad_lock_token(svn_fs_t *fs,
const char *lock_token);
/* SVN_ERR_FS_NO_LOCK_TOKEN: no lock token given for PATH in FS. */
svn_error_t *svn_fs_base__err_no_lock_token(svn_fs_t *fs, const char *path);
src/subversion/subversion/libsvn_fs_base/revs-txns.c view on Meta::CPAN
trail_t *trail,
apr_pool_t *pool)
{
transaction_t *txn;
SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision));
/* Make sure the TXN is not committed already. */
SVN_ERR(get_txn(&txn, fs, txn_name, FALSE, trail, pool));
if (txn->kind != transaction_kind_normal)
return svn_fs_base__err_txn_not_mutable(fs, txn_name);
/* Convert TXN to a committed transaction. */
txn->base_id = NULL;
txn->revision = revision;
txn->kind = transaction_kind_committed;
return put_txn(fs, txn, txn_name, trail, pool);
}
svn_error_t *
src/subversion/subversion/libsvn_fs_base/revs-txns.c view on Meta::CPAN
const svn_fs_id_t **base_root_id_p,
svn_fs_t *fs,
const char *txn_name,
trail_t *trail,
apr_pool_t *pool)
{
transaction_t *txn;
SVN_ERR(get_txn(&txn, fs, txn_name, FALSE, trail, pool));
if (txn->kind != transaction_kind_normal)
return svn_fs_base__err_txn_not_mutable(fs, txn_name);
*root_id_p = txn->root_id;
*base_root_id_p = txn->base_id;
return SVN_NO_ERROR;
}
svn_error_t *
svn_fs_base__set_txn_root(svn_fs_t *fs,
const char *txn_name,
const svn_fs_id_t *new_id,
trail_t *trail,
apr_pool_t *pool)
{
transaction_t *txn;
SVN_ERR(get_txn(&txn, fs, txn_name, FALSE, trail, pool));
if (txn->kind != transaction_kind_normal)
return svn_fs_base__err_txn_not_mutable(fs, txn_name);
if (! svn_fs_base__id_eq(txn->root_id, new_id))
{
txn->root_id = new_id;
SVN_ERR(put_txn(fs, txn, txn_name, trail, pool));
}
return SVN_NO_ERROR;
}
src/subversion/subversion/libsvn_fs_base/revs-txns.c view on Meta::CPAN
svn_fs_base__set_txn_base(svn_fs_t *fs,
const char *txn_name,
const svn_fs_id_t *new_id,
trail_t *trail,
apr_pool_t *pool)
{
transaction_t *txn;
SVN_ERR(get_txn(&txn, fs, txn_name, FALSE, trail, pool));
if (txn->kind != transaction_kind_normal)
return svn_fs_base__err_txn_not_mutable(fs, txn_name);
if (! svn_fs_base__id_eq(txn->base_id, new_id))
{
txn->base_id = new_id;
SVN_ERR(put_txn(fs, txn, txn_name, trail, pool));
}
return SVN_NO_ERROR;
}
src/subversion/subversion/libsvn_fs_base/revs-txns.c view on Meta::CPAN
const char *txn_name,
const char *copy_id,
trail_t *trail,
apr_pool_t *pool)
{
transaction_t *txn;
/* Get the transaction and ensure its mutability. */
SVN_ERR(get_txn(&txn, fs, txn_name, FALSE, trail, pool));
if (txn->kind != transaction_kind_normal)
return svn_fs_base__err_txn_not_mutable(fs, txn_name);
/* Allocate a new array if this transaction has no copies. */
if (! txn->copies)
txn->copies = apr_array_make(pool, 1, sizeof(copy_id));
/* Add COPY_ID to the array. */
APR_ARRAY_PUSH(txn->copies, const char *) = copy_id;
/* Finally, write out the transaction. */
return put_txn(fs, txn, txn_name, trail, pool);
src/subversion/subversion/libsvn_fs_base/revs-txns.c view on Meta::CPAN
static svn_error_t *
txn_body_txn_proplist(void *baton, trail_t *trail)
{
transaction_t *txn;
struct txn_proplist_args *args = baton;
SVN_ERR(get_txn(&txn, trail->fs, args->id, FALSE, trail, trail->pool));
if (txn->kind != transaction_kind_normal)
return svn_fs_base__err_txn_not_mutable(trail->fs, args->id);
*(args->table_p) = txn->proplist;
return SVN_NO_ERROR;
}
svn_error_t *
svn_fs_base__txn_proplist_in_trail(apr_hash_t **table_p,
const char *txn_id,
src/subversion/subversion/libsvn_fs_base/revs-txns.c view on Meta::CPAN
const char *txn_name,
const char *name,
const svn_string_t *value,
trail_t *trail,
apr_pool_t *pool)
{
transaction_t *txn;
SVN_ERR(get_txn(&txn, fs, txn_name, FALSE, trail, pool));
if (txn->kind != transaction_kind_normal)
return svn_fs_base__err_txn_not_mutable(fs, txn_name);
/* If there's no proplist, but we're just deleting a property, exit now. */
if ((! txn->proplist) && (! value))
return SVN_NO_ERROR;
/* Now, if there's no proplist, we know we need to make one. */
if (! txn->proplist)
txn->proplist = apr_hash_make(pool);
/* Set the property. */
src/subversion/subversion/libsvn_fs_base/revs-txns.c view on Meta::CPAN
static svn_error_t *
txn_body_abort_txn(void *baton, trail_t *trail)
{
svn_fs_txn_t *txn = baton;
transaction_t *fstxn;
/* Get the transaction by its id, set it to "dead", and store the
transaction. */
SVN_ERR(get_txn(&fstxn, txn->fs, txn->id, FALSE, trail, trail->pool));
if (fstxn->kind != transaction_kind_normal)
return svn_fs_base__err_txn_not_mutable(txn->fs, txn->id);
fstxn->kind = transaction_kind_dead;
return put_txn(txn->fs, fstxn, txn->id, trail, trail->pool);
}
svn_error_t *
svn_fs_base__abort_txn(svn_fs_txn_t *txn,
apr_pool_t *pool)
{
src/subversion/subversion/libsvn_repos/delta.c view on Meta::CPAN
if (! allowed)
return svn_error_create(SVN_ERR_AUTHZ_ROOT_UNREADABLE, 0,
_("Unable to open root of edit"));
}
return SVN_NO_ERROR;
}
static svn_error_t *
not_a_dir_error(const char *role,
const char *path)
{
return svn_error_createf
(SVN_ERR_FS_NOT_DIRECTORY, 0,
"Invalid %s directory '%s'",
role, path ? path : "(null)");
}
/* Public interface to computing directory deltas. */
src/subversion/subversion/libsvn_repos/delta.c view on Meta::CPAN
const svn_fs_id_t *src_id, *tgt_id;
svn_node_kind_t src_kind, tgt_kind;
svn_revnum_t rootrev;
int distance;
const char *authz_root_path;
/* SRC_PARENT_DIR must be valid. */
if (src_parent_dir)
src_parent_dir = svn_relpath_canonicalize(src_parent_dir, pool);
else
return not_a_dir_error("source parent", src_parent_dir);
/* TGT_FULLPATH must be valid. */
if (tgt_fullpath)
tgt_fullpath = svn_relpath_canonicalize(tgt_fullpath, pool);
else
return svn_error_create(SVN_ERR_FS_PATH_SYNTAX, 0,
_("Invalid target path"));
if (depth == svn_depth_exclude)
return svn_error_create(SVN_ERR_REPOS_BAD_ARGS, NULL,
src/subversion/subversion/libsvn_subr/config_win.c view on Meta::CPAN
folder_utf8 = apr_palloc(pool, outlength);
outbytes = WideCharToMultiByte(CP_UTF8, 0, folder_ucs2, inwords,
folder_utf8, outbytes, NULL, NULL);
if (outbytes == 0)
return svn_error_wrap_apr(apr_get_os_error(),
"Can't convert config path to UTF-8");
/* Note that WideCharToMultiByte does _not_ terminate the
outgoing buffer. */
folder_utf8[outbytes] = '\0';
*folder = folder_utf8;
return SVN_NO_ERROR;
}
#include "config_impl.h"
src/subversion/subversion/libsvn_subr/dso.c view on Meta::CPAN
/* A mutex to protect our global pool and cache. */
static svn_mutex__t *dso_mutex = NULL;
/* Global pool to allocate DSOs in. */
static apr_pool_t *dso_pool;
/* Global cache for storing DSO objects. */
static apr_hash_t *dso_cache;
/* Just an arbitrary location in memory... */
static int not_there_sentinel;
/* A specific value we store in the dso_cache to indicate that the
library wasn't found. This keeps us from allocating extra memory
from dso_pool when trying to find libraries we already know aren't
there. */
#define NOT_THERE ((void *) ¬_there_sentinel)
svn_error_t *
svn_dso_initialize2(void)
{
if (dso_pool)
return SVN_NO_ERROR;
dso_pool = svn_pool_create(NULL);
SVN_ERR(svn_mutex__init(&dso_mutex, TRUE, dso_pool));
src/subversion/subversion/libsvn_subr/error.c view on Meta::CPAN
print_error(svn_error_t *err, FILE *stream, const char *prefix)
{
char errbuf[256];
const char *err_string;
svn_error_t *temp_err = NULL; /* ensure initialized even if
err->file == NULL */
/* Pretty-print the error */
/* Note: we can also log errors here someday. */
#ifdef SVN_DEBUG
/* Note: err->file is _not_ in UTF-8, because it's expanded from
the __FILE__ preprocessor macro. */
const char *file_utf8;
if (err->file
&& !(temp_err = svn_utf_cstring_to_utf8(&file_utf8, err->file,
err->pool)))
svn_error_clear(svn_cmdline_fprintf(stream, err->pool,
"%s:%ld", err->file, err->line));
else
{
src/subversion/subversion/libsvn_wc/adm_crawler.c view on Meta::CPAN
deleted, and server will respond properly. */
if (! report_everything)
SVN_ERR(reporter->delete_path(report_baton,
this_report_relpath, iterpool));
}
continue;
}
/*** The Big Tests: ***/
if (ths->status == svn_wc__db_status_server_excluded
|| ths->status == svn_wc__db_status_not_present)
{
/* If the entry is 'absent' or 'not-present', make sure the server
knows it's gone...
...unless we're reporting everything, in which case we're
going to report it missing later anyway.
This instructs the server to send it back to us, if it is
now available (an addition after a not-present state), or if
it is now authorized (change in authz for the absent item). */
if (! report_everything)
src/subversion/subversion/libsvn_wc/adm_crawler.c view on Meta::CPAN
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL,
db, local_abspath,
scratch_pool, scratch_pool);
if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
{
svn_error_clear(err);
wrk_status = svn_wc__db_status_not_present;
wrk_kind = svn_node_file;
}
else
SVN_ERR(err);
if ((wrk_status == svn_wc__db_status_normal
|| wrk_status == svn_wc__db_status_added
|| wrk_status == svn_wc__db_status_incomplete)
&& (wrk_kind == svn_node_dir || checksum))
{
src/subversion/subversion/libsvn_wc/adm_files.c view on Meta::CPAN
scratch_pool, scratch_pool));
/* Sanity */
if (kind != svn_node_file)
return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
_("Can only get the pristine contents of files; "
"'%s' is not a file"),
svn_dirent_local_style(local_abspath,
scratch_pool));
if (status == svn_wc__db_status_not_present)
/* We know that the delete of this node has been committed.
This should be the same as if called on an unknown path. */
return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("Cannot get the pristine contents of '%s' "
"because its delete is already committed"),
svn_dirent_local_style(local_abspath,
scratch_pool));
else if (status == svn_wc__db_status_server_excluded
|| status == svn_wc__db_status_excluded
|| status == svn_wc__db_status_incomplete)
src/subversion/subversion/libsvn_wc/adm_files.c view on Meta::CPAN
"'%s' is not a file"),
svn_dirent_local_style(local_abspath,
scratch_pool));
if (status == svn_wc__db_status_added && !sha1_checksum)
{
/* Simply added. The pristine base does not exist. */
*contents = NULL;
return SVN_NO_ERROR;
}
else if (status == svn_wc__db_status_not_present)
/* We know that the delete of this node has been committed.
This should be the same as if called on an unknown path. */
return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("Cannot get the pristine contents of '%s' "
"because its delete is already committed"),
svn_dirent_local_style(local_abspath,
scratch_pool));
else if (status == svn_wc__db_status_server_excluded
|| status == svn_wc__db_status_excluded
|| status == svn_wc__db_status_incomplete)
src/subversion/subversion/libsvn_wc/adm_files.c view on Meta::CPAN
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, &is_op_root, NULL, NULL,
NULL, NULL, NULL,
db, local_abspath, scratch_pool, scratch_pool));
/* When the directory exists and is scheduled for deletion or is not-present
* do not check the revision or the URL. The revision can be any
* arbitrary revision and the URL may differ if the add is
* being driven from a merge which will have a different URL. */
if (status != svn_wc__db_status_deleted
&& status != svn_wc__db_status_not_present)
{
/* ### Should we match copyfrom_revision? */
if (db_revision != revision)
return
svn_error_createf(SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
_("Revision %ld doesn't match existing "
"revision %ld in '%s'"),
revision, db_revision, local_abspath);
if (!db_repos_root_url)