You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by vm...@apache.org on 2012/12/23 19:34:20 UTC
svn commit: r1425508 [2/17] - in /subversion/branches/javahl-ra: ./ build/
build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/
notes/ notes/api-errata/1.8/ notes/obliterate/ notes/tree-conflicts/
subversion/ subversion/bindings/s...
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Client.pm
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Client.pm?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Client.pm (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Client.pm Sun Dec 23 18:34:14 2012
@@ -9,10 +9,10 @@ my @_all_fns;
BEGIN {
@_all_fns =
qw( version diff_summarize_dup create_context checkout3
- checkout2 checkout update3 update2 update switch2 switch
- add4 add3 add2 add mkdir3 mkdir2 mkdir delete3 delete2
+ checkout2 checkout update4 update3 update2 update switch2 switch
+ add4 add3 add2 add mkdir4 mkdir3 mkdir2 mkdir delete3 delete2
delete import3 import2 import commit4 commit3 commit2
- commit status3 status2 status log4 log3 log2 log blame4
+ commit status4 status3 status2 status log4 log3 log2 log blame4
blame3 blame2 blame diff4 diff3 diff2 diff diff_peg4
diff_peg3 diff_peg2 diff_peg diff_summarize2
diff_summarize diff_summarize_peg2 diff_summarize_peg
@@ -254,14 +254,50 @@ sub new
=item $ctx-E<gt>add($path, $recursive, $pool);
+Similar to $ctx-E<gt>add2(), but with $force always set to FALSE.
+
+=item $ctx-E<gt>add2($path, $recursive, $force, $ctx, $pool);
+
+Similar to $ctx-E<gt>add3(), but with $no_ignore always set to FALSE.
+
+=item $ctx-E<gt>add3($path, $recursive, $force, $no_ignore, $pool);
+
+Similar to $ctx-E<gt>add4(), but with $add_parents always set to FALSE and
+$depth set according to $recursive; if TRUE, then depth is
+$SVN::Depth::infinity, if FALSE, then $SVN::Depth::empty.
+
+=item $ctx-E<gt>add4($path, $depth, $force, $no_ignore, $add_parents, $pool);
+
Schedule a working copy $path for addition to the repository.
-$path's parent must be under revision control already, but $path is not.
-If $recursive is set, then assuming $path is a directory, all of its
-contents will be scheduled for addition as well.
+If $depth is $SVN::Depth::empty, add just $path and nothing below it. If
+$SVN::Depth::files, add $path and any file children of $path. If
+$SVN::Depth::immediates, add $path, any file children, and any immediate
+subdirectories (but nothing underneath those subdirectories). If
+$SVN::Depth::infinity, add $path and everything under it fully recursively.
+
+$path's parent must be under revision control already (unless $add_parents is
+TRUE), but $path is not.
+
+Unless $force is TRUE and $path is already under version control, returns an
+$SVN::Error::ENTRY_EXISTS object. If $force is set, do not error on
+already-versioned items. When used with $depth set to $SVN::Depth::infinity
+it will enter versioned directories; scheduling unversioned children.
Calls the notify callback for each added item.
+If $no_ignore is FALSE, don't add any file or directory (or recurse into any
+directory) that is unversioned and found by recursion (as opposed to being the
+explicit target $path) and whose name matches the svn:ignore property on its
+parent directory or the global-ignores list in $ctx->config. If $no_ignore is
+TRUE, do include such files and directories. (Note that an svn:ignore property
+can influence this behaviour only when recursing into an already versioned
+directory with $force).
+
+If $add_parents is TRUE, recurse up $path's directory and look for a versioned
+directory. If found, add all intermediate paths between it and $path. If not
+found return $SVN::Error::NO_VERSIONED_PARENT.
+
Important: this is a B<scheduling> operation. No changes will happen
to the repository until a commit occurs. This scheduling can be
removed with $ctx-E<gt>revert().
@@ -299,12 +335,39 @@ because the desired revision can not be
=item $ctx-E<gt>checkout($url, $path, $revision, $recursive, $pool);
+Similar to $ctx-E<gt>checkout2(), but with $peg_revision always set to undef (unspecified) and $ignore_externals always set to FALSE.
+
+=item $ctx-E<gt>checkout2($url, $path, $peg_revision, $revision, $recursive, $ignore_externals, $pool);
+
+Similar to $ctx-E<gt>checkout3(), but with $allow_unver_obstructions always set
+to FALSE, and $depth set according to $recurse: if $recurse is TRUE, $depth is
+$SVN::Depth::infinity, if $recurse is FALSE, set $depth to $SVN::Depth::files.
+
+=item $ctx-E<gt>checkout3($url, $path, $preg_revision, $revision, $depth, $ignore_externals, $allow_unver_obstructions, $pool);
+
Checkout a working copy of $url at $revision using $path as the root directory
of the newly checked out working copy.
+The $peg_revision sets the revision at which the path in the $url is treated as representing.
+
$revision must be a number, 'HEAD', or a date. If $revision does not
meet these requirements the $SVN::Error::CLIENT_BAD_REVISION is raised.
+$depth is one of the constants in SVN::Depth and specifies the depth of the
+operation. If set to $SVN::Depth::unknown, then behave as if for
+$SVN::Depth::infinity, except in the case of resuming a previous checkout of
+$path (i.e. updating) in which case use the depth of the existing working copy.
+
+$ignore_exteranls if set to TRUE the operation will ignore external definitions.
+
+$allow_unver_obstructions if set to TRUE the operation will tolerate existing
+unversioned items that obstruct incoming paths. Only obstructions of the same
+type (file or dir) as the added item are tolerated. The text of obstructing
+files is left as-is, effectively treating it as a user modification after the
+checkout. Working properties of obstructing items are set equal to the base
+properties. If set to FALSE, then abort if there are any unversioned
+obstructing items.
+
Returns the value of the revision actually checked out of the repository.
=item $ctx-E<gt>cleanup($dir, $pool);
@@ -565,6 +628,21 @@ Has no return.
=item $ctx-E<gt>mkdir($targets, $pool);
+Similar to $ctx-E<gt>mkdir2() except it returns an svn_client_commit_info_t
+object instead of a svn_commit_info_t object.
+
+=item $ctx-E<gt>mkdir2($targets, $pool);
+
+Similar to $ctx-E<gt>mkdir3(), but with $make_parents always FALSE, and
+$revprop_hash always undef.
+
+=item $ctx-E<gt>mkdir3($targets, $make_parents, $revprop_hash, $pool);
+
+Similar to $ctx-E<gt>mkdir4(), but returns a svn_commit_info_t object rather
+than through a callback function.
+
+=item $ctx-E<gt>mkdir4($targets, $make_parents, $revprop_hash, \&commit_callback, $pool);
+
Create a directory, either in a repository or a working copy.
If $targets contains URLs, immediately attempts to commit the creation of the
@@ -574,10 +652,23 @@ object.
Else, create the directories on disk, and attempt to schedule them for addition.
In this case returns undef.
+If $make_parents is TRUE, create any non-existant parent directories also.
+
+If not undef, $revprop_hash is a reference to a hash table holding additional
+custom revision properites (property names mapped to strings) to be set on the
+new revision in the event that this is a committing operation. This hash
+cannot contain any standard Subversion properties.
+
+Calls the log message callback to query for a commit log message when one is
+needed.
+
Calls the notify callback when the directory has been created (successfully)
in the working copy, with the path of the new directory. Note this is only
called for items added to the working copy.
+If \&commit_callback is not undef, then for each successful commit, call
+\&commit_callback with the svn_commit_info_t object for the commit.
+
=item $ctx-E<gt>move($src_path, $src_revision, $dst_path, $force, $pool);
Move $src_path to $dst_path.
@@ -732,8 +823,20 @@ in the repository, this feature will fai
=item $ctx-E<gt>status($path, $revision, \&status_func, $recursive, $get_all, $update, $no_ignore, $pool);
+Similar to $ctx-E<gt>status2(), but with ignore_externals always set to FALSE, and with the status_func receiving a svn_wc_status2_t instead of a svn_wc_status_t object.
+
+=item $ctx-E<gt>status2($path, $revision, \&status_func, $recursive, $get_all, $update, $no_ignore, $ignore_externals, $pool);
+
+Similar to $ctx-E<gt>status3(), but with the changelists passed as undef, and with recursive instead of depth.
+
+=item $ctx-E<gt>status3($path, $revision, \&status_func, $depth, $get_all, $update, $no_ignore, $ignore_externals, $changelists, $pool);
+
+Similar to $ctx-E<gt>status4(), without the pool parameter to the callback and the return of the callback is ignored.
+
+=item $ctx-E<gt>status4($path, $revision, \&status_func, $depth, $get_all, $update, $no_ignore, $ignore_externals, $changelists, $pool);
+
Given $path to a working copy directory (or single file), call status_func()
-with a set of svn_wc_status_t objects which describe the status of $path and
+with a set of svn_wc_status2_t objects which describe the status of $path and
its children.
If $recursive is true, recurse fully, else do only immediate children.
@@ -746,19 +849,23 @@ information about out-of-dateness (with
return the value of the actual revision against with the working copy was
compared. (The return will be undef if $update is not set).
-The function recurses into externals definitions ('svn:externals') after
-handling the main target, if any exist. The function calls the notify callback
-with $SVN::Wc::Notify::Action::status_external action before handling each
-externals definition, and with $SVN::Wc::Notify::Action::status_completed
-after each.
+Unless ignore_externals is set, the function recurses into externals definitions
+('svn:externals') after handling the main target, if any exist. The function
+calls the notify callback with $SVN::Wc::Notify::Action::status_external action
+before handling each externals definition, and with
+$SVN::Wc::Notify::Action::status_completed after each.
+
+$changelists is a reference to an array of changelist names, used as a restrictive filter on items whose statuses are reported; that is don't report status about any item unless it's a member of those changelists. If changelists is empty (or altogether undef), no changelist filtering occurs.
The status_func subroutine takes the following parameters:
-$path, $status
+$path, $status, $pool
$path is the pathname of the file or directory which status is being
-reported. $status is a svn_wc_status_t object.
+reported. $status is a svn_wc_status2_t object. $pool is an apr_pool_t
+object which is cleaned beteween invocations to the callback.
-The return of the status_func subroutine is ignored.
+The return of the status_func subroutine can be a svn_error_t object created by
+SVN::Error::create in order to propogate an error up.
=item $ctx-E<gt>info($path_or_url, $peg_revision, $revision, \&receiver, $recurse);
@@ -813,15 +920,73 @@ switched.
=item $ctx-E<gt>update($path, $revision, $recursive, $pool)
-Update a working copy $path to $revision.
+Similar to $ctx-E<gt>update2() except that it accepts only a single target in
+$path, returns a single revision, and $ignore_externals is always set to FALSE.
+
+=item $ctx-E<gt>update2($paths, $revision, $recursive, $ignore_externals, $pool)
+
+Similar to $ctx-E<gt>update3() but with $allow_unver_obstructions always set to
+FALSE, $depth_is_sticky to FALSE, and $depth set according to $recursive: if
+$recursive is TRUE, set $depth to $SVN::Depth::infinity, if $recursive is
+FALSE, set $depth to $SVN::Depth::files.
+
+=item $ctx-E<gt>update3($paths, $revision, $depth, $depth_is_sticky, $ignore_externals, $allow_unver_obstructions, $pool)
+
+Similar to $ctx-E<gt>update4() but with $make_parents always set to FALSE and
+$adds_as_modification set to TRUE.
+
+=item $ctx-E<gt>update4($paths, $revision, $depth, $depth_is_sticky, $ignore_externals, $allow_unver_obstructions, $adds_as_modification, $make_parents)
+
+Update working trees $paths to $revision.
+
+$paths is a array reference of paths to be updated. Unversioned paths that are
+the direct children of a versioned path will cause an update that attempts to
+add that path; other unversioned paths are skipped.
$revision must be a revision number, 'HEAD', or a date or this method will
raise the $SVN::Error::CLIENT_BAD_REVISION error.
+The paths in $paths can be from multiple working copies from multiple
+repositories, but even if they all come from the same repository there is no
+guarantee that revision represented by 'HEAD' will remain the same as each path
+is updated.
+
+If $ignore_externals is set, don't process externals definitions as part of
+this operation.
+
+If $depth is $SVN::Depth::infinity, update fully recursivelly. Else if it is
+$SVN::Depth::immediates or $SVN::Depth::files, update each target and its file
+entries, but not its subdirectories. Else if $SVN::Depth::empty, update
+exactly each target, nonrecursively (essentially, update the target's
+properties).
+
+If $depth is $SVN::Depth::unknown, take the working depth from $paths and then
+describe as behaved above.
+
+If $depth_is_sticky is set and $depth is not $SVN::Depth::unknown, then in
+addition to update paths, also set their sticky ambient depth value to $depth.
+
+If $allow_unver_obstructions is TRUE then the update tolerates existing
+unversioned items that obstruct added paths. Only obstructions of the same
+type (file or dir) as the added item are tolerated. The text of obstructing
+files is left as-is, effectively treating it as a user modification after the
+update. Working properties of obstructing items are set equal to the base
+properties. If $allow_unver_obstructions is FALSE then the update will abort
+if there are any unversioned obstructing items.
+
+If $adds_as_modification is TRUE, a local addition at the same path as an
+incoming addition of the same node kind results in a normal node with a
+possible local modification, instead of a tree conflict.
+
+If $make_parents is TRUE, create any non-existent parent directories also by
+checking them out at depth=empty.
+
Calls the notify callback for each item handled by the update, and
also for files restored from the text-base.
-Returns the revision to which the working copy was actually updated.
+Returns an array reference to an array of revision numbers with each element
+set to the revision to which $revision was resolved for the corresponding
+element of $paths.
=item $ctx-E<gt>url_from_path($target, $pool); or SVN::Client::url_from_path($target, $pool);
@@ -1265,41 +1430,41 @@ use SVN::Base qw(Client svn_info_t_);
=over 8
-=item $info->URL()
+=item $info-E<gt>URL()
Where the item lives in the repository.
-=item $info->rev()
+=item $info-E<gt>rev()
The revision of the object. If path_or_url is a working-copy
path, then this is its current working revnum. If path_or_url
is a URL, then this is the repos revision that path_or_url lives in.
-=item $info->kind()
+=item $info-E<gt>kind()
The node's kind.
-=item $info->repos_root_URL()
+=item $info-E<gt>repos_root_URL()
The root URL of the repository.
-=item $info->repos_UUID()
+=item $info-E<gt>repos_UUID()
The repository's UUID.
-=item $info->last_changed_rev()
+=item $info-E<gt>last_changed_rev()
The last revision in which this object changed.
-=item $info->last_changed_date()
+=item $info-E<gt>last_changed_date()
The date of the last_changed_rev.
-=item $info->last_changed_author()
+=item $info-E<gt>last_changed_author()
The author of the last_changed_rev.
-=item $info->lock()
+=item $info-E<gt>lock()
An exclusive lock, if present. Could be either local or remote.
@@ -1311,27 +1476,27 @@ also only useful when working with a WC.
=over 8
-=item $info->has_wc_info()
+=item $info-E<gt>has_wc_info()
-=item $info->schedule()
+=item $info-E<gt>schedule()
-=item $info->copyfrom_url()
+=item $info-E<gt>copyfrom_url()
-=item $info->copyfrom_rev()
+=item $info-E<gt>copyfrom_rev()
-=item $info->text_time()
+=item $info-E<gt>text_time()
-=item $info->prop_time()
+=item $info-E<gt>prop_time()
-=item $info->checksum()
+=item $info-E<gt>checksum()
-=item $info->conflict_old()
+=item $info-E<gt>conflict_old()
-=item $info->conflict_new()
+=item $info-E<gt>conflict_new()
-=item $info->conflict_wrk()
+=item $info-E<gt>conflict_wrk()
-=item $info->prejfile()
+=item $info-E<gt>prejfile()
=back
@@ -1378,12 +1543,12 @@ $SVN::Client::COMMIT_ITEM_TEXT_MODS
$SVN::Client::COMMIT_ITEM_PROP_MODS
$SVN::Client::COMMIT_ITEM_IS_COPY
-=item $citem>incoming_prop_changes()
+=item $citem-E<gt>incoming_prop_changes()
A reference to an array of svn_prop_t objects representing changes to
WC properties.
-=item $citem>outgoing_prop_changes()
+=item $citem-E<gt>outgoing_prop_changes()
A reference to an array of svn_prop_t objects representing extra
changes to properties in the repository (which are not necessarily
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Core.pm
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Core.pm?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Core.pm (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Core.pm Sun Dec 23 18:34:14 2012
@@ -710,6 +710,63 @@ $SVN::Node::dir, $SVN::Node::unknown.
=cut
+package SVN::Depth;
+use SVN::Base qw(Core svn_depth_);
+
+=head2 svn_depth_t - SVN::Depth
+
+An enum of the following constants:
+
+=over 4
+
+=item $SVN::Depth::unknown
+
+Depth undetermined or ignored. In some contexts, this means the client should
+choose an appropriate default depth. The server will generally treat it as
+$SVN::Depth::infinity.
+
+=item $SVN::Depth::exclude
+
+Exclude (i.e., don't descend into) directory D.
+
+Note: In Subversion 1.5, $SVN::Depth::exclude is B<not> supported anyhwere in
+the client-side (Wc/Client/etc) code; it is only supported as an argument to
+set_path functions in the Ra and Repos reporters. (This will enable future
+versions of Subversion to run updates, etc, against 1.5 servers with proper
+$SVN::Depth::exclude behavior, once we get a chance to implement client side
+support for $SVN::Depth::exclude).
+
+=item $SVN::Depth::empty
+
+Just the named directory D, no entries.
+
+Updates will not pull in any files or subdirectories not already present.
+
+=item $SVN::Depth::files
+
+D + its files children, but not subdirs.
+
+Updates will pull in any files not already present, but not subdirectories.
+
+=item $SVN::Depth::immediates
+
+D + immediate children (D and its entries).
+
+Updates will pull in any files or subdirectories not already present; those
+subdirectories' this_dir entries will have depth-empty.
+
+=item $SVN::Depth::infinity
+
+D + all descendants (full recursion from D).
+
+Updates will pull in any files or subdirectories not already present; those
+subdirectories' this_dir entries will have depth-infinity. Equivalent to the
+pre 1.5 default update behavior.
+
+=back
+
+=cut
+
package _p_svn_opt_revision_t;
use SVN::Base qw(Core svn_opt_revision_t_);
@@ -766,6 +823,37 @@ Author of created rev.
=cut
+package _p_svn_commit_info_t;
+use SVN::Base qw(Core svn_commit_info_t_);
+
+=head2 svn_commit_info_t
+
+=over 4
+
+=item $commit-E<gt>revision()
+
+Just committed revision.
+
+=item $commit-E<gt>date()
+
+Server-side date of the commit.
+
+=item $commit-E<gt>author()
+
+Author of the commit.
+
+=item $commit-E<gt>post_commit_err()
+
+Error message from the post-commit hook, or undef.
+
+=item $commit-E<gt>repos_root()
+
+Repoistory root, may be undef if unknown.
+
+=back
+
+=cut
+
package _p_svn_auth_cred_simple_t;
use SVN::Base qw(Core svn_auth_cred_simple_t_);
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Fs.pm
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Fs.pm?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Fs.pm (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Fs.pm Sun Dec 23 18:34:14 2012
@@ -100,7 +100,7 @@ base revision will be $rev, which should
Generate a unique lock-token using C<$fs>.
TODO - translate this to apply to Perl:
-This can be used in to populate lock->token before calling
+This can be used in to populate lock-E<gt>token before calling
svn_fs_attach_lock().
=item $fs-E<gt>get_access()
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Makefile.PL.in
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Makefile.PL.in?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Makefile.PL.in (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Makefile.PL.in Sun Dec 23 18:34:14 2012
@@ -49,6 +49,11 @@ my $cppflags = '@CPPFLAGS@';
my $cflags = '@CFLAGS@';
my $includes = '@SVN_APR_INCLUDES@ @SVN_APRUTIL_INCLUDES@';
+# Avoid this bug in SWIG:
+# https://sourceforge.net/tracker/?func=detail&aid=3571361&group_id=1645&atid=101645
+# SWIG is using C++ style comments in an extern "C" code.
+$cflags =~ s/-ansi\s+//g;
+
# According to the log of r7937, the flags guarded by the conditional break
# the build on FreeBSD if not conditionalized.
my $apr_ldflags = '@SVN_APR_LIBS@'
@@ -122,6 +127,9 @@ $module_make_commands\t\$(NOECHO) \$(TOU
FULLPERLRUN=$fullperlrun \$(FULLPERL)
+update_test_counts ::
+\tfor test_file in \$(TEST_FILES); do \$(PERL) -MTest::Count::FileMutator::ByFileType::App -e 'run()' \$\$test_file; done
+
EOPOST
}
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Repos.pm
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Repos.pm?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Repos.pm (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Repos.pm Sun Dec 23 18:34:14 2012
@@ -87,9 +87,9 @@ Example:
close $fh;
-=item $repos->load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_func, $cancel_baton);
+=item $repos-E<gt>load_fs($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $cancel_func, $cancel_baton);
-=item $repos->load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_func, $cancel_baton);
+=item $repos-E<gt>load_fs2($dumpfile_fh, $feedback_fh, $uuid_action, $parent_dir, $use_pre_commit_hook, $use_post_commit_hook, $cancel_func, $cancel_baton);
Loads a dumpfile specified by the C<$dumpfile_fh> filehandle into the repository.
If the dumpstream contains copy history that is unavailable in the repository,
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Wc.pm
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Wc.pm?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Wc.pm (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/Wc.pm Sun Dec 23 18:34:14 2012
@@ -21,7 +21,7 @@ swig_init_asp_dot_net_hack($SVN::Core::g
package _p_svn_wc_t;
-=head2 svn_wc_status_t
+=head2 svn_wc_status2_t
=over 4
@@ -67,10 +67,55 @@ be one of the $SVN::Wc::Status::* consta
An integer representing the status of the item's properties in the repository.
Can be one of the $SVN::Wc::Status::* constants.
+=item $wcstat-E<gt>repos_lock()
+
+A svn_lock_t object representing the entry's lock in the repository, if any.
+
+=item $wcstat-E<gt>url()
+
+The url (actual or expected) of the item.
+
+=item $wcstat-E<gt>ood_last_cmt_rev()
+
+An integer representing the youngest committed revision or $SVN::Core::INVALID_REVNUM is not out of date.
+
+=item $wcstat-E<gt>ood_last_cmt_date()
+
+The date of the most recent commit as microseconds since 00:00:00 January 1, 1970 UTC or 0 if not out of date.
+
+=item $wcstat-E<gt>ood_kind()
+
+An integer representing the kind of the youngest commit. Can be any of the $SVN::Node::* constants. Will be $SVN::Node::none if not out of date.
+
+=item $wcstat-E<gt>tree_conflict()
+
+A svn_wc_conflict_description_t object if the entry is the victim of a tree conflict or undef.
+
+=item $wcstat-E<gt>file_external()
+
+A boolean telling if the item is a file that was added to the working copy as an svn:externals. If file_external is TRUE, then switched is always FALSE.
+
+=item $wcstat-E<gt>pristine_text_status()
+
+An integer representing the status of the item's text as compared to the pristine base of the file. Can be one of the $SVN::Wc::Status::* constants.
+
+=item $wcstat-E<gt>pristine_prop_status()
+
+An integer representing the status of the item's properties as compared to the pristine base of the node. Can be one of the $SVN::Wc::Status::* constants.
+
=back
=cut
+package _p_svn_wc_status2_t;
+use SVN::Base qw(Wc svn_wc_status2_t_);
+
+=head2 svn_wc_status_t
+
+Same as svn_wc_status2_t, but without the repos_lock, url, ood_last_cmt_rev, ood_last_cmt_date, ood_kind, ood_last_cmt_author, tree_conflict, file_external, pristine_text_status, pristine_prop_status fields.
+
+=cut
+
package _p_svn_wc_status_t;
use SVN::Base qw(Wc svn_wc_status_t_);
@@ -430,6 +475,11 @@ A directory doesn't contain a complete e
=back
+=cut
+
+package SVN::Wc::Status;
+use SVN::Base qw(Wc svn_wc_status_);
+
=head1 COPYRIGHT
Licensed to the Apache Software Foundation (ASF) under one
@@ -451,7 +501,4 @@ A directory doesn't contain a complete e
=cut
-package SVN::Wc::Status;
-use SVN::Base qw(Wc svn_wc_status_);
-
1;
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/0use.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/0use.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/0use.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/0use.t Sun Dec 23 18:34:14 2012
@@ -22,10 +22,17 @@
use Test::More tests => 7;
use strict;
+# TEST
use_ok 'SVN::Core';
+# TEST
use_ok 'SVN::Repos';
+# TEST
use_ok 'SVN::Fs';
+# TEST
use_ok 'SVN::Delta';
+# TEST
use_ok 'SVN::Ra';
+# TEST
use_ok 'SVN::Wc';
+# TEST
use_ok 'SVN::Client';
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/1repos.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/1repos.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/1repos.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/1repos.t Sun Dec 23 18:34:14 2012
@@ -35,6 +35,7 @@ my $repospath = tempdir('svn-perl-test-X
my $repos;
+# TEST
ok($repos = SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
@@ -60,6 +61,7 @@ SVN::TxDelta::send_string("FILEA CONTENT
$editor->close_edit();
+# TEST
cmp_ok($fs->youngest_rev, '==', 1);
{
$editor = SVN::Delta::Editor->
@@ -73,6 +75,7 @@ my $subdirbaton = $editor->add_directory
$editor->close_edit();
}
+# TEST
cmp_ok($fs->youngest_rev, '==', 2);
my @history;
@@ -80,6 +83,7 @@ my @history;
SVN::Repos::history($fs, 'tags/foo/filea',
sub {push @history, [@_[0,1]]}, 0, 2, 1);
+# TEST
is_deeply(\@history, [['/tags/foo/filea',2],['/trunk/filea',1]],
'repos_history');
@@ -97,8 +101,10 @@ $editor->delete_entry('tags', 2, $rootba
$editor->close_edit();
}
+# TEST
ok($main::something_destroyed, 'callback properly destroyed');
+# TEST
cmp_ok($fs->youngest_rev, '==', 3);
END {
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/2fs.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/2fs.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/2fs.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/2fs.t Sun Dec 23 18:34:14 2012
@@ -36,24 +36,32 @@ my $repospath = tempdir('svn-perl-test-X
my $repos;
+# TEST
ok($repos = SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
my $fs = $repos->fs;
+# TEST
cmp_ok($fs->youngest_rev, '==', 0,
"new repository start with rev 0");
+# TEST
is($fs->path, "$repospath/db", '$fs->path()');
+# TEST
is(SVN::Fs::type($fs->path), 'fsfs', 'SVN::Fs::type()');
my $txn = $fs->begin_txn($fs->youngest_rev);
my $txns = $fs->list_transactions;
+# TEST
ok(eq_array($fs->list_transactions, [$txn->name]), 'list transaction');
+# TEST
isa_ok($txn->root, '_p_svn_fs_root_t', '$txn->root()');
+# TEST
is($txn->root->txn_name, $txn->name, '$txn->root->txn_name()');
+# TEST
is($fs->revision_root($fs->youngest_rev)->txn_name, undef);
$txn->root->make_dir('trunk');
@@ -63,32 +71,43 @@ my $text = "this is just a test\n";
$txn->root->make_file($path);
{
my $stream = $txn->root->apply_text($path, undef);
+ # TEST
isa_ok($stream, 'SVN::Stream', '$txn->root->apply_text');
print $stream $text;
close $stream;
}
$txn->commit;
+# TEST
cmp_ok($fs->youngest_rev, '==', 1, 'revision increased');
my $root = $fs->revision_root($fs->youngest_rev);
+# TEST
cmp_ok($root->check_path($path), '==', $SVN::Node::file, 'check_path');
+# TEST
ok(!$root->is_dir($path), 'is_dir');
+# TEST
ok($root->is_file($path), 'is_file');
{
my $stream = $root->file_contents($path);
local $/;
+ # TEST
is(<$stream>, $text, 'content verified');
+ # TEST
is($root->file_md5_checksum($path), 'dd2314129f81675e95b940ff94ddc935',
'md5 verified');
}
+# TEST
cmp_ok($root->file_length($path), '==', length($text), 'file_length');
# Revision properties
+# TEST
isa_ok($fs->revision_proplist(1), 'HASH', 'revision_proplist: object');
+# TEST
is($fs->revision_prop(1, 'not:exists'), undef, 'revision_prop: nonexistent');
+# TEST
like($fs->revision_prop(1, 'svn:date'), qr/^\d+-\d+-\d+T\d+:\d+:\d+\.\d+Z$/,
'revision_prop: svn:date');
@@ -108,12 +127,15 @@ SKIP: {
or die "error making hook script '$script_filename' executable: $!";
$fs->change_rev_prop(1, 'test-prop', 'foo');
+ # TEST
is($fs->revision_prop(1, 'test-prop'), 'foo', 'change_rev_prop');
$fs->change_rev_prop(1, 'test-prop', undef);
+ # TEST
is($fs->revision_prop(1, 'test-prop'), undef, 'change_rev_prop: deleted');
$fs->change_rev_prop(1, 'binary-prop', $BINARY_DATA);
+ # TEST
is($fs->revision_prop(1, 'binary-prop'), $BINARY_DATA,
'change_rev_prop with binary data');
}
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/3client.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/3client.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/3client.t Sun Dec 23 18:34:14 2012
@@ -20,7 +20,7 @@
#
#
-use Test::More tests => 121;
+use Test::More tests => 221;
use strict;
# shut up about variables that are only used once.
@@ -28,9 +28,13 @@ use strict;
# by the bindings but not elsewhere in perl space.
no warnings 'once';
+# TEST
use_ok('SVN::Core');
+# TEST
use_ok('SVN::Repos');
+# TEST
use_ok('SVN::Client');
+# TEST
use_ok('SVN::Wc'); # needed for status
use File::Spec::Functions;
use File::Temp qw(tempdir);
@@ -67,113 +71,236 @@ if ($^O eq 'MSWin32') {
# This is ugly to create the test repo with SVN::Repos, but
# it seems to be the most reliable way.
+# TEST
ok(SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
my ($ctx) = SVN::Client->new;
+# TEST
isa_ok($ctx,'SVN::Client','Client Object');
my $uuid_from_url = $ctx->uuid_from_url($reposurl);
+# TEST
ok($uuid_from_url,'Valid return from uuid_from_url method form');
# test non method invocation passing a SVN::Client
+# TEST
ok(SVN::Client::uuid_from_url($reposurl,$ctx),
'Valid return from uuid_from_url function form with SVN::Client object');
# test non method invocation passing a _p_svn_client_ctx_t
+# TEST
ok(SVN::Client::uuid_from_url($reposurl,$ctx->{'ctx'}),
'Valid return from uuid_from_url function form with _p_svn_client_ctx object');
my ($ci_dir1) = $ctx->mkdir(["$reposurl/dir1"]);
+# TEST
isa_ok($ci_dir1,'_p_svn_client_commit_info_t');
$current_rev++;
+# TEST
is($ci_dir1->revision,$current_rev,"commit info revision equals $current_rev");
+my ($ci_dir2) = $ctx->mkdir2(["$reposurl/dir2"]);
+# TEST
+isa_ok($ci_dir2,'_p_svn_commit_info_t');
+$current_rev++;
+# TEST
+is($ci_dir2->revision,$current_rev,"commit info revision equals $current_rev");
+
+my ($ci_dir3) = $ctx->mkdir3(["$reposurl/dir3"],0,undef);
+# TEST
+isa_ok($ci_dir3,'_p_svn_commit_info_t');
+$current_rev++;
+# TEST
+is($ci_dir3->revision,$current_rev,"commit info revision equals $current_rev");
+
+# TEST
+is($ctx->mkdir4(["$reposurl/dir4"],0,undef,sub {
+ my ($commit_info) = @_;
+
+ # TEST
+ isa_ok($commit_info,'_p_svn_commit_info_t','commit_info type check');
+
+ # TEST
+ is($commit_info->revision(),$current_rev + 1, 'commit info revision');
+
+ # TEST
+ like($commit_info->date(),
+ qr/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}Z$/,
+ 'commit info date');
+
+ # TEST
+ is($commit_info->post_commit_err(),undef,'commit info post_commit_error');
+
+ # TEST
+ is($commit_info->repos_root(),$reposurl,'commit info repos_root');
+ }),
+ undef,'Returned undef from mkdir4 operation.');
+$current_rev++;
my ($rpgval,$rpgrev) = $ctx->revprop_get('svn:author',$reposurl,$current_rev);
+# TEST
is($rpgval,$username,'svn:author set to expected username from revprop_get');
+# TEST
is($rpgrev,$current_rev,'Returned revnum of current rev from revprop_get');
if ($^O eq 'MSWin32') {
+ # TEST
ok(open(NEW, ">$repospath/hooks/pre-revprop-change.bat"),
'Open pre-revprop-change hook for writing');
+ # TEST
ok(print(NEW 'exit 0'), 'Print to hook');
+ # TEST
ok(close(NEW), 'Close hook');
} else {
+ # TEST
ok(rename("$repospath/hooks/pre-revprop-change.tmpl",
"$repospath/hooks/pre-revprop-change"),
'Rename pre-revprop-change hook');
+ # TEST
ok(chmod(0700,"$repospath/hooks/pre-revprop-change"),
'Change permissions on pre-revprop-change hook');
+ # TEST
is(1, 1, '-')
}
my ($rps_rev) = $ctx->revprop_set('svn:log','mkdir dir1',
$reposurl, $current_rev, 0);
+# TEST
is($rps_rev,$current_rev,
'Returned revnum of current rev from revprop_set');
my ($rph, $rplrev) = $ctx->revprop_list($reposurl,$current_rev);
+# TEST
isa_ok($rph,'HASH','Returned hash reference form revprop_list');
+# TEST
is($rplrev,$current_rev,'Returned current rev from revprop_list');
+# TEST
is($rph->{'svn:author'},$username,
'svn:author is expected user from revprop_list');
+# TEST
is($rph->{'svn:log'},'mkdir dir1',
'svn:log is expected value from revprop_list');
+# TEST
ok($rph->{'svn:date'},'svn:date is set from revprop_list');
+# TEST
is($ctx->checkout($reposurl,$wcpath,'HEAD',1),$current_rev,
'Returned current rev from checkout');
+# TEST
+is($ctx->checkout2($reposurl,$wcpath . '2',undef,'HEAD',1,0),$current_rev,
+ 'Returned current rev from checkout2');
+
+# TEST
+is($ctx->checkout3($reposurl,$wcpath . '3',undef,'HEAD',$SVN::Depth::infinity,
+ 0,0),$current_rev, 'Returned current rev from checkout3');
+
+# TEST
is(SVN::Client::url_from_path($wcpath),$reposurl,
"Returned $reposurl from url_from_path");
+# TEST
ok(open(NEW, ">$wcpath/dir1/new"),'Open new file for writing');
+# TEST
ok(print(NEW 'addtest'), 'Print to new file');
+# TEST
ok(close(NEW),'Close new file');
# no return means success
+# TEST
is($ctx->add("$wcpath/dir1/new",0),undef,
'Returned undef from add schedule operation');
+# TEST
+ok(open(NEW2, ">$wcpath/dir1/new2"),'Open new2 file for writing');
+# TEST
+ok(print(NEW2 'addtest2'), 'Print to new2 file');
+# TEST
+ok(close(NEW2),'Close new2 file');
+
+# no return means success
+# TEST
+is($ctx->add2("$wcpath/dir1/new2",0,0),undef,
+ 'Returned undef from add2 schedule operation');
+
+# TEST
+ok(open(NEW3, ">$wcpath/dir1/new3"),'Open new3 file for writing');
+# TEST
+ok(print(NEW3 'addtest3'), 'Print to new3 file');
+# TEST
+ok(close(NEW3),'Close new3 file');
+
+# no return means success
+# TEST
+is($ctx->add3("$wcpath/dir1/new3",0,0,0),undef,
+ 'Returned undef from add3 schedule operation');
+
+# TEST
+ok(open(NEW4, ">$wcpath/dir1/new4"),'Open new4 file for writing');
+# TEST
+ok(print(NEW4 'addtest4'), 'Print to new4 file');
+# TEST
+ok(close(NEW4),'Close new4 file');
+
+# no return means success
+# TEST
+is($ctx->add4("$wcpath/dir1/new4",$SVN::Depth::empty,0,0,0),undef,
+ 'Returned undef from add4 schedule operation');
+
+
# test the log_msg callback
$ctx->log_msg(
sub
{
my ($log_msg,$tmp_file,$commit_items,$pool) = @_;
+ # TEST
isa_ok($log_msg,'SCALAR','log_msg param to callback is a SCALAR');
+ # TEST
isa_ok($tmp_file,'SCALAR','tmp_file param to callback is a SCALAR');
+ # TEST
isa_ok($commit_items,'ARRAY',
'commit_items param to callback is a SCALAR');
+ # TEST
isa_ok($pool,'_p_apr_pool_t',
'pool param to callback is a _p_apr_pool_t');
my $commit_item = shift @$commit_items;
+ # TEST
isa_ok($commit_item,'_p_svn_client_commit_item3_t',
'commit_item element is a _p_svn_client_commit_item3_t');
+ # TEST
is($commit_item->path(),"$wcpath/dir1/new",
"commit_item has proper path for committed file");
+ # TEST
is($commit_item->kind(),$SVN::Node::file,
"kind() shows the node as a file");
+ # TEST
is($commit_item->url(),"$reposurl/dir1/new",
'URL matches our repos url');
# revision is INVALID because the commit has not happened yet
# and this is not a copy
+ # TEST
is($commit_item->revision(),$SVN::Core::INVALID_REVNUM,
'Revision is INVALID since commit has not happened yet');
+ # TEST
is($commit_item->copyfrom_url(),undef,
'copyfrom_url is undef since file is not a copy');
+ # TEST
is($commit_item->state_flags(),$SVN::Client::COMMIT_ITEM_ADD |
$SVN::Client::COMMIT_ITEM_TEXT_MODS,
'state_flags are ADD and TEXT_MODS');
my $prop_changes = $commit_item->incoming_prop_changes();
+ # TEST
isa_ok($prop_changes, 'ARRAY',
'incoming_prop_changes returns an ARRAY');
+ # TEST
is(scalar(@$prop_changes), 0,
'No elements in the incoming_prop_changes array because ' .
' we did not make any');
$prop_changes = $commit_item->outgoing_prop_changes();
+ # TEST
is($prop_changes, undef,
'No outgoing_prop_changes array because we did not create one');
$$log_msg = 'Add new';
@@ -182,23 +309,30 @@ $ctx->log_msg(
my ($ci_commit1) = $ctx->commit($wcpath,0);
+# TEST
isa_ok($ci_commit1,'_p_svn_client_commit_info_t',
'Commit returns a _p_svn_client_commit_info');
$current_rev++;
+# TEST
is($ci_commit1->revision,$current_rev,
"commit info revision equals $current_rev");
# get rid of log_msg callback
+# TEST
is($ctx->log_msg(undef),undef,
'Clearing the log_msg callback works');
# test info() on WC
+# TEST
is($ctx->info("$wcpath/dir1/new", undef, 'WORKING',
sub
{
my($infopath,$svn_info_t,$pool) = @_;
+ # TEST
is($infopath,"new",'path passed to receiver is same as WC');
+ # TEST
isa_ok($svn_info_t,'_p_svn_info_t');
+ # TEST
isa_ok($pool,'_p_apr_pool_t',
'pool param is _p_apr_pool_t');
}, 0),
@@ -206,75 +340,416 @@ is($ctx->info("$wcpath/dir1/new", undef,
'info should return undef');
my $svn_error = $ctx->info("$wcpath/dir1/newxyz", undef, 'WORKING', sub {}, 0);
+# TEST
isa_ok($svn_error, '_p_svn_error_t',
'info should return _p_svn_error_t for a nonexistent file');
$svn_error->clear(); #don't leak this
# test getting the log
+# TEST
is($ctx->log("$reposurl/dir1/new",$current_rev,$current_rev,1,0,
sub
{
my ($changed_paths,$revision,
$author,$date,$message,$pool) = @_;
+ # TEST
isa_ok($changed_paths,'HASH',
'changed_paths param is a HASH');
+ # TEST
isa_ok($changed_paths->{'/dir1/new'},
'_p_svn_log_changed_path_t',
'Hash value is a _p_svn_log_changed_path_t');
+ # TEST
is($changed_paths->{'/dir1/new'}->action(),'A',
'action returns A for add');
+ # TEST
is($changed_paths->{'/dir1/new'}->copyfrom_path(),undef,
'copyfrom_path returns undef as it is not a copy');
+ # TEST
is($changed_paths->{'/dir1/new'}->copyfrom_rev(),
$SVN::Core::INVALID_REVNUM,
'copyfrom_rev is set to INVALID as it is not a copy');
+ # TEST
is($revision,$current_rev,
'revision param matches current rev');
+ # TEST
is($author,$username,
'author param matches expected username');
+ # TEST
ok($date,'date param is defined');
+ # TEST
is($message,'Add new',
'message param is the expected value');
+ # TEST
isa_ok($pool,'_p_apr_pool_t',
'pool param is _p_apr_pool_t');
}),
undef,
'log returns undef');
+# TEST
is($ctx->update($wcpath,'HEAD',1),$current_rev,
'Return from update is the current rev');
+my $update2_result = $ctx->update2([$wcpath],'HEAD',1,0);
+# TEST
+isa_ok($update2_result,'ARRAY','update2 returns a list');
+# TEST
+is(scalar(@$update2_result),1,'update2 member count');
+# TEST
+is($update2_result->[0],$current_rev,'return from update2 is the current rev');
+
+my $update3_result = $ctx->update3([$wcpath],'HEAD',$SVN::Depth::infinity,
+ 0,0,0);
+# TEST
+isa_ok($update3_result,'ARRAY','update3 returns a list');
+# TEST
+is(scalar(@$update3_result),1,'update3 member count');
+# TEST
+is($update3_result->[0],$current_rev,'return from update3 is the current rev');
+
+my $update4_result = $ctx->update4([$wcpath],'HEAD',$SVN::Depth::infinity,
+ 0,0,0,1,0);
+# TEST
+isa_ok($update4_result,'ARRAY','update4 returns a list');
+# TEST
+is(scalar(@$update4_result),1,'update4 member count');
+# TEST
+is($update4_result->[0],$current_rev,'return from update4 is the current rev');
+
# no return so we should get undef as the result
# we will get a _p_svn_error_t if there is an error.
+# TEST
is($ctx->propset('perl-test','test-val',"$wcpath/dir1",0),undef,
'propset on a working copy path returns undef');
my ($ph) = $ctx->propget('perl-test',"$wcpath/dir1",undef,0);
+# TEST
isa_ok($ph,'HASH','propget returns a hash');
+# TEST
is($ph->{"$wcpath/dir1"},'test-val','perl-test property has the correct value');
# No revnum for the working copy so we should get INVALID_REVNUM
+# TEST
is($ctx->status($wcpath, undef, sub {
my ($path,$wc_status) = @_;
+ # TEST
is($path,"$wcpath/dir1",
'path param to status callback is' .
- 'the correct path.');
+ ' the correct path.');
+ # TEST
isa_ok($wc_status,'_p_svn_wc_status_t',
'wc_stats param is a' .
' _p_svn_wc_status_t');
+ # TEST
+ is($wc_status->text_status(),
+ $SVN::Wc::Status::normal,
+ 'text_status param to status' .
+ ' callback');
+ # TEST
is($wc_status->prop_status(),
- $SVN::Wc::status_modified,
- 'prop_status is status_modified');
- # TODO test the rest of the members
+ $SVN::Wc::Status::modified,
+ 'prop_status param to status' .
+ ' callback');
+ # TEST
+ is($wc_status->locked(), 0,
+ 'locked param to status callback');
+ # TEST
+ is($wc_status->copied(), 0,
+ 'copied param to status callback');
+ # TEST
+ is($wc_status->switched(), 0,
+ 'switched param to status callback');
+ # TEST
+ is($wc_status->repos_text_status(),
+ $SVN::Wc::Status::none,
+ 'repos_text_status param to status' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_prop_status(),
+ $SVN::Wc::Status::none,
+ 'repos_prop_status param to status' .
+ ' callback');
},
1, 0, 0, 0),
$SVN::Core::INVALID_REVNUM,
'status returns INVALID_REVNUM when run against a working copy');
+# No revnum for the working copy so we should get INVALID_REVNUM
+# TEST
+is($ctx->status2($wcpath, undef, sub {
+ my ($path,$wc_status) = @_;
+ # TEST
+ is($path,"$wcpath/dir1",
+ 'path param to status2 callback');
+ # TEST
+ isa_ok($wc_status,'_p_svn_wc_status2_t',
+ 'wc_stats param to the status2' .
+ ' callback');
+ # TEST
+ is($wc_status->text_status(),
+ $SVN::Wc::Status::normal,
+ 'text_status param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->prop_status(),
+ $SVN::Wc::Status::modified,
+ 'prop_status param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->locked(), 0,
+ 'locked param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->copied(), 0,
+ 'copied param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->switched(), 0,
+ 'switched param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_text_status(),
+ $SVN::Wc::Status::none,
+ 'repos_text_status param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_prop_status(),
+ $SVN::Wc::Status::none,
+ 'repos_prop_status param to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_lock(), undef,
+ 'repos_lock param to status2 callback');
+ # TEST
+ is($wc_status->url(),"$reposurl/dir1",
+ 'url param to status2 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_rev(),
+ $SVN::Core::INVALID_REVNUM,
+ 'ood_last_cmt_rev to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_last_cmt_date(), 0,
+ 'ood_last_cmt_date to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_kind(),
+ $SVN::Node::none,
+ 'ood_kind param to status2 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_author(),
+ undef,
+ 'ood_last_cmt_author to status2' .
+ ' callback');
+ # TEST
+ is($wc_status->tree_conflict(), undef,
+ 'tree_conflict to status2 callback');
+ # TEST
+ is($wc_status->file_external(), 0,
+ 'file_external to status2 callback');
+ # TEST
+ is($wc_status->pristine_text_status(),
+ $SVN::Wc::Status::normal,
+ 'pristine_text_status param to' .
+ ' status2 callback');
+ # TEST
+ is($wc_status->pristine_prop_status(),
+ $SVN::Wc::Status::modified,
+ 'pristine_prop_status param to' .
+ ' status2 callback');
+ },
+ 1, 0, 0, 0, 0),
+ $SVN::Core::INVALID_REVNUM,
+ 'status2 returns INVALID_REVNUM when run against a working copy');
+
+# No revnum for the working copy so we should get INVALID_REVNUM
+# TEST
+is($ctx->status3($wcpath, undef, sub {
+ my ($path,$wc_status) = @_;
+ # TEST
+ is($path,"$wcpath/dir1",
+ 'path param to status3 callback');
+ # TEST
+ isa_ok($wc_status,'_p_svn_wc_status2_t',
+ 'wc_stats param to the status3' .
+ ' callback');
+ # TEST
+ is($wc_status->text_status(),
+ $SVN::Wc::Status::normal,
+ 'text_status param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->prop_status(),
+ $SVN::Wc::Status::modified,
+ 'prop_status param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->locked(), 0,
+ 'locked param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->copied(), 0,
+ 'copied param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->switched(), 0,
+ 'switched param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_text_status(),
+ $SVN::Wc::Status::none,
+ 'repos_text_status param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_prop_status(),
+ $SVN::Wc::Status::none,
+ 'repos_prop_status param to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_lock(), undef,
+ 'repos_lock param to status3 callback');
+ # TEST
+ is($wc_status->url(),"$reposurl/dir1",
+ 'url param to status3 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_rev(),
+ $SVN::Core::INVALID_REVNUM,
+ 'ood_last_cmt_rev to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_last_cmt_date(), 0,
+ 'ood_last_cmt_date to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_kind(),
+ $SVN::Node::none,
+ 'ood_kind param to status3 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_author(),
+ undef,
+ 'ood_last_cmt_author to status3' .
+ ' callback');
+ # TEST
+ is($wc_status->tree_conflict(), undef,
+ 'tree_conflict to status3 callback');
+ # TEST
+ is($wc_status->file_external(), 0,
+ 'file_external to status3 callback');
+ # TEST
+ is($wc_status->pristine_text_status(),
+ $SVN::Wc::Status::normal,
+ 'pristine_text_status param to' .
+ ' status3 callback');
+ # TEST
+ is($wc_status->pristine_prop_status(),
+ $SVN::Wc::Status::modified,
+ 'pristine_prop_status param to' .
+ ' status3 callback');
+ },
+ $SVN::Depth::infinity, 0, 0, 0, 0, undef),
+ $SVN::Core::INVALID_REVNUM,
+ 'status3 returns INVALID_REVNUM when run against a working copy');
+
+# No revnum for the working copy so we should get INVALID_REVNUM
+# TEST
+is($ctx->status4($wcpath, undef, sub {
+ my ($path,$wc_status, $pool) = @_;
+ # TEST
+ is($path,"$wcpath/dir1",
+ 'path param to status4 callback');
+ # TEST
+ isa_ok($wc_status,'_p_svn_wc_status2_t',
+ 'wc_stats param to the status4' .
+ ' callback');
+ # TEST
+ is($wc_status->text_status(),
+ $SVN::Wc::Status::normal,
+ 'text_status param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->prop_status(),
+ $SVN::Wc::Status::modified,
+ 'prop_status param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->locked(), 0,
+ 'locked param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->copied(), 0,
+ 'copied param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->switched(), 0,
+ 'switched param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_text_status(),
+ $SVN::Wc::Status::none,
+ 'repos_text_status param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_prop_status(),
+ $SVN::Wc::Status::none,
+ 'repos_prop_status param to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->repos_lock(), undef,
+ 'repos_lock param to status4 callback');
+ # TEST
+ is($wc_status->url(),"$reposurl/dir1",
+ 'url param to status4 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_rev(),
+ $SVN::Core::INVALID_REVNUM,
+ 'ood_last_cmt_rev to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_last_cmt_date(), 0,
+ 'ood_last_cmt_date to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->ood_kind(),
+ $SVN::Node::none,
+ 'ood_kind param to status4 callback');
+ # TEST
+ is($wc_status->ood_last_cmt_author(),
+ undef,
+ 'ood_last_cmt_author to status4' .
+ ' callback');
+ # TEST
+ is($wc_status->tree_conflict(), undef,
+ 'tree_conflict to status4 callback');
+ # TEST
+ is($wc_status->file_external(), 0,
+ 'file_external to status4 callback');
+ # TEST
+ is($wc_status->pristine_text_status(),
+ $SVN::Wc::Status::normal,
+ 'pristine_text_status param to' .
+ ' status4 callback');
+ # TEST
+ is($wc_status->pristine_prop_status(),
+ $SVN::Wc::Status::modified,
+ 'pristine_prop_status param to' .
+ ' status4 callback');
+ # TEST
+ isa_ok($pool, '_p_apr_pool_t',
+ 'pool param to status4' .
+ ' callback');
+ },
+ $SVN::Depth::infinity, 0, 0, 0, 0, undef),
+ $SVN::Core::INVALID_REVNUM,
+ 'status4 returns INVALID_REVNUM when run against a working copy');
+
+
my ($ci_commit2) = $ctx->commit($wcpath,0);
+# TEST
isa_ok($ci_commit2,'_p_svn_client_commit_info_t',
'commit returns a _p_svn_client_commit_info_t');
$current_rev++;
+# TEST
is($ci_commit2->revision(),$current_rev,
"commit info revision equals $current_rev");
@@ -282,74 +757,100 @@ my $dir1_rev = $current_rev;
my($pl) = $ctx->proplist($reposurl,$current_rev,1);
+# TEST
isa_ok($pl,'ARRAY','proplist returns an ARRAY');
+# TEST
isa_ok($pl->[0], '_p_svn_client_proplist_item_t',
'array element is a _p_svn_client_proplist_item_t');
+# TEST
is($pl->[0]->node_name(),"$reposurl/dir1",
'node_name is the expected value');
my $plh = $pl->[0]->prop_hash();
+# TEST
isa_ok($plh,'HASH',
'prop_hash returns a HASH');
+# TEST
is_deeply($plh, {'perl-test' => 'test-val'}, 'test prop list prop_hash values');
# add a dir to test update
-my ($ci_dir2) = $ctx->mkdir(["$reposurl/dir2"]);
-isa_ok($ci_dir2,'_p_svn_client_commit_info_t',
+my ($ci_dir5) = $ctx->mkdir(["$reposurl/dir5"]);
+# TEST
+isa_ok($ci_dir5,'_p_svn_client_commit_info_t',
'mkdir returns a _p_svn_client_commit_info_t');
$current_rev++;
-is($ci_dir2->revision(),$current_rev,
+# TEST
+is($ci_dir5->revision(),$current_rev,
"commit info revision equals $current_rev");
# Use explicit revnum to test that instead of just HEAD.
+# TEST
is($ctx->update($wcpath,$current_rev,$current_rev),$current_rev,
'update returns current rev');
# commit action against a repo returns undef
+# TEST
is($ctx->delete(["$wcpath/dir2"],0),undef,
'delete returns undef');
# no return means success
+# TEST
is($ctx->revert($wcpath,1),undef,
'revert returns undef');
my ($ci_copy) = $ctx->copy("$reposurl/dir1",2,"$reposurl/dir3");
+# TEST
isa_ok($ci_copy,'_p_svn_client_commit_info_t',
'copy returns a _p_svn_client_commitn_info_t when run against repo');
$current_rev++;
+# TEST
is($ci_copy->revision,$current_rev,
"commit info revision equals $current_rev");
+# TEST
ok(mkdir($importpath),'Make import path dir');
+# TEST
ok(open(FOO, ">$importpath/foo"),'Open file for writing in import path dir');
+# TEST
ok(print(FOO 'foobar'),'Print to the file in import path dir');
+# TEST
ok(close(FOO),'Close file in import path dir');
my ($ci_import) = $ctx->import($importpath,$reposurl,0);
+# TEST
isa_ok($ci_import,'_p_svn_client_commit_info_t',
'Import returns _p_svn_client_commint_info_t');
$current_rev++;
+# TEST
is($ci_import->revision,$current_rev,
"commit info revision equals $current_rev");
+# TEST
is($ctx->blame("$reposurl/foo",'HEAD','HEAD', sub {
my ($line_no,$rev,$author,
$date, $line,$pool) = @_;
+ # TEST
is($line_no,0,
'line_no param is zero');
+ # TEST
is($rev,$current_rev,
'rev param is current rev');
+ # TEST
is($author,$username,
'author param is expected' .
'value');
+ # TEST
ok($date,'date is defined');
if ($^O eq 'MSWin32') {
#### Why two \r-s?
+ # TEST
is($line,"foobar\r\r",
'line is expected value');
} else {
+ # TEST
is($line,'foobar',
'line is expected value');
}
+ # TEST
isa_ok($pool,'_p_apr_pool_t',
'pool param is ' .
'_p_apr_pool_t');
@@ -357,42 +858,58 @@ is($ctx->blame("$reposurl/foo",'HEAD','H
undef,
'blame returns undef');
+# TEST
ok(open(CAT, "+>$testpath/cattest"),'open file for cat output');
+# TEST
is($ctx->cat(\*CAT, "$reposurl/foo", 'HEAD'),undef,
'cat returns undef');
+# TEST
ok(seek(CAT,0,0),
'seek the beginning of the cat file');
+# TEST
is(readline(*CAT),'foobar',
'read the first line of the cat file');
+# TEST
ok(close(CAT),'close cat file');
# the string around the $current_rev exists to expose a past
# bug. In the past we did not accept values that simply
# had not been converted to a number yet.
my ($dirents) = $ctx->ls($reposurl,"$current_rev", 1);
+# TEST
isa_ok($dirents, 'HASH','ls returns a HASH');
+# TEST
isa_ok($dirents->{'dir1'},'_p_svn_dirent_t',
'hash value is a _p_svn_dirent_t');
+# TEST
is($dirents->{'dir1'}->kind(),$SVN::Core::node_dir,
'kind() returns a dir node');
+# TEST
is($dirents->{'dir1'}->size(),0,
'size() returns 0 for a directory');
+# TEST
is($dirents->{'dir1'}->has_props(),1,
'has_props() returns true');
+# TEST
is($dirents->{'dir1'}->created_rev(),$dir1_rev,
'created_rev() returns expected rev');
+# TEST
ok($dirents->{'dir1'}->time(),
'time is defined');
#diag(scalar(localtime($dirents->{'dir1'}->time() / 1000000)));
+# TEST
is($dirents->{'dir1'}->last_author(),$username,
'last_auth() returns expected username');
# test removing a property
+# TEST
is($ctx->propset('perl-test', undef, "$wcpath/dir1", 0),undef,
'propset returns undef');
my ($ph2) = $ctx->propget('perl-test', "$wcpath/dir1", 'WORKING', 0);
+# TEST
isa_ok($ph2,'HASH','propget returns HASH');
+# TEST
is(scalar(keys %$ph2),0,
'No properties after deleting a property');
@@ -455,6 +972,7 @@ SKIP: {
my $oldauthbaton = $ctx->auth();
+ # TEST
isa_ok($ctx->auth(SVN::Client::get_simple_prompt_provider(
sub { simple_prompt(@_,'x') },2),
SVN::Client::get_ssl_server_trust_prompt_provider(
@@ -469,9 +987,11 @@ SKIP: {
# if this doesn't work we will get an svn_error_t so by
# getting a hash we know it worked.
my ($dirents) = $ctx->ls('https://localhost/svn/test','HEAD',1);
+ # TEST
isa_ok($dirents,'HASH','ls returns a HASH');
# return the auth baton to its original setting
+ # TEST
isa_ok($ctx->auth($oldauthbaton),'_p_svn_auth_baton_t',
'Successfully set auth_baton back to old value');
}
@@ -487,6 +1007,7 @@ my @providers = @{SVN::Core::auth_get_pl
foreach my $p (@providers) {
$ok &= defined($p) && $p->isa('_p_svn_auth_provider_object_t');
}
+# TEST
ok($ok, 'svn_auth_get_platform_specific_client_providers returns _p_svn_auth_provider_object_t\'s');
SKIP: {
@@ -508,6 +1029,7 @@ SKIP: {
my $callback = \&gnome_keyring_unlock_prompt;
my $result = SVN::Core::auth_set_gnome_keyring_unlock_prompt_func(
$ctx->auth(), $callback);
+ # TEST
is(${$result}, $callback, 'auth_set_gnome_keyring_unlock_prompt_func result equals paramter');
}
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/4pool.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/4pool.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/4pool.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/4pool.t Sun Dec 23 18:34:14 2012
@@ -55,6 +55,7 @@ my $repospath = tempdir('svn-perl-test-X
my $repos;
+# TEST
ok($repos = SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
@@ -62,19 +63,23 @@ my $fs = $repos->fs;
my $pool = SVN::Pool->new_default;
+# TEST
is_pool_default($pool, 'default pool');
{
my $spool = SVN::Pool->new_default_sub;
+ # TEST
is_pool_default($spool, 'lexical default pool default');
}
+# TEST
is_pool_default($pool, 'lexical default pool destroyed');
my $root = $fs->revision_root(0);
my $txn = $fs->begin_txn(0);
+# TEST
$txn->root->make_dir('trunk');
$txn->commit;
@@ -86,6 +91,7 @@ SVN::Repos::dir_delta($root, '', '',
undef, 1, 1, 0, 1);
+# TEST
is_pool_default($pool, 'default pool from c calls destroyed');
END {
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/5delta-compat.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/5delta-compat.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/5delta-compat.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/5delta-compat.t Sun Dec 23 18:34:14 2012
@@ -33,11 +33,13 @@ open my $aresult, '>', \$result;
my $txstream = SVN::TxDelta::new($source, $target);
+# TEST
isa_ok($txstream, '_p_svn_txdelta_stream_t');
open my $asource, '<', \$srctext;
my $handle = [SVN::TxDelta::apply($asource, $aresult, undef, undef)];
SVN::TxDelta::send_txstream($txstream, @$handle);
+# TEST
is($result, $tgttext, 'delta self test');
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/5delta.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/5delta.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/5delta.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/5delta.t Sun Dec 23 18:34:14 2012
@@ -33,12 +33,15 @@ open my $aresult, '>', \$result;
my $txstream = SVN::TxDelta::new($source, $target);
+# TEST
isa_ok($txstream, '_p_svn_txdelta_stream_t');
open my $asource, '<', \$srctext;
my ($md5, @handle) = SVN::TxDelta::apply($asource, $aresult, undef);
SVN::TxDelta::send_txstream($txstream, @handle);
+# TEST
is($result, $tgttext, 'delta self test');
+# TEST
is("$md5", 'a22b3dadcbddac48d2f1eae3ec5fb86a', 'md5 matched');
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/6ra.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/6ra.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/6ra.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/6ra.t Sun Dec 23 18:34:14 2012
@@ -36,6 +36,7 @@ my $BINARY_DATA = "foo\0\n\t\x1F\x7F\x80
my $repospath = tempdir('svn-perl-test-XXXXXX', TMPDIR => 1, CLEANUP => 1);
my $repos;
+# TEST
ok($repos = SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
@@ -61,25 +62,36 @@ $uri = "file://$uri";
{
my $ra = SVN::Ra->new($uri);
+ # TEST
isa_ok($ra, 'SVN::Ra', 'create with only one argument');
}
my $ra = SVN::Ra->new(url => $uri);
+# TEST
isa_ok($ra, 'SVN::Ra', 'create with hash param');
+# TEST
is($ra->get_uuid, $fs->get_uuid, 'get_uuid');
+# TEST
is($ra->get_latest_revnum, 2, 'get_latest_revnum');
+# TEST
is($ra->get_repos_root, $uri, 'get_repos_root');
# get_dir
{
my ($dirents, $revnum, $props) = $ra->get_dir('trunk',
$SVN::Core::INVALID_REVNUM);
+ # TEST
isa_ok($dirents, 'HASH', 'get_dir: dirents');
+ # TEST
is(scalar(keys %$dirents), 2, 'get_dir: num dirents');
+ # TEST+2
isa_ok($dirents->{$_}, '_p_svn_dirent_t', "get_dir: dirent $_")
for qw( filea fileb );
+ # TEST
is($revnum, $ra->get_latest_revnum, 'get_dir: revnum');
+ # TEST
isa_ok($props, 'HASH', 'get_dir: props');
+ # TEST
is($props->{'dir-prop'}, 'frob', 'get_dir: property dir-prop');
}
@@ -87,15 +99,22 @@ is($ra->get_repos_root, $uri, 'get_repos
{
my ($revnum, $props) = $ra->get_file('trunk/filea',
$SVN::Core::INVALID_REVNUM, undef);
+ # TEST
is($revnum, $ra->get_latest_revnum, 'get_file: revnum');
+ # TEST
isa_ok($props, 'HASH', 'get_file: props');
+ # TEST
ok(!exists $props->{'test-prop'}, 'get_file: property test-prop deleted');
+ # TEST
is($props->{'binary-prop'}, $BINARY_DATA, 'get_file: property binary-prop');
}
# Revision properties
+# TEST
isa_ok($ra->rev_proplist(1), 'HASH', 'rev_proplist: object');
+# TEST
is($ra->rev_prop(1, 'nonexistent'), undef, 'rev_prop: nonexistent');
+# TEST
like($ra->rev_prop(1, 'svn:date'), qr/^\d+-\d+-\d+T\d+:\d+:\d+\.\d+Z$/,
'rev_prop: svn:date');
@@ -115,51 +134,71 @@ SKIP: {
or die "error making hook script '$script_filename' executable: $!";
$ra->change_rev_prop(1, 'test-prop', 'foo');
+ # TEST
is($ra->rev_prop(1, 'test-prop'), 'foo', 'change_rev_prop');
$ra->change_rev_prop(1, 'test-prop', undef);
+ # TEST
is($ra->rev_prop(1, 'test-prop'), undef, 'change_rev_prop: deleted');
$ra->change_rev_prop(1, 'binary-prop', $BINARY_DATA);
+ # TEST
is($ra->rev_prop(1, 'binary-prop'), $BINARY_DATA,
'change_rev_prop with binary data');
}
# Information about nodes in the filesystem.
+# TEST
is($ra->check_path('trunk', 1), $SVN::Node::dir, 'check_path');
{
my $dirent = $ra->stat('trunk', 1);
+ # TEST
isa_ok($dirent, '_p_svn_dirent_t', 'stat dir: dirent object');
+ # TEST
is($dirent->kind, $SVN::Node::dir, 'stat dir: kind');
+ # TEST
is($dirent->size, 0, 'stat dir: size');
+ # TEST
is($dirent->created_rev, 1, 'stat dir: created_rev');
+ # TEST
ok($dirent->has_props, 'stat dir: has_props');
$dirent = $ra->stat('trunk/fileb', 1);
+ # TEST
is($dirent->kind, $SVN::Node::file, 'stat file: kind');
+ # TEST
ok(!$dirent->has_props, 'stat file: has_props');
}
# do_update
my $ed = MockEditor->new;
my $reporter = $ra->do_update(2, '', 1, $ed);
+# TEST
isa_ok($reporter, 'SVN::Ra::Reporter');
$reporter->set_path('', 0, 1, undef);
$reporter->finish_report;
+# TEST
is($ed->{_base_revnum}, 0, 'do_update: base_revision');
+# TEST
is($ed->{_target_revnum}, 2, 'do_update: target_revnum');
+# TEST
is($ed->{trunk}{props}{'dir-prop'}, 'frob', 'do_update: dir-prop');
+# TEST
ok(!exists $ed->{'trunk/filea'}{props}{'test-prop'},
'do_update: deleted property');
+# TEST
is($ed->{'trunk/filea'}{props}{'binary-prop'}, $BINARY_DATA,
'do_update: binary-prop');
# replay
$ed = MockEditor->new;
$ra->replay(1, 0, 1, $ed);
+# TEST
is($ed->{trunk}{type}, 'dir', "replay: got trunk");
+# TEST
is($ed->{trunk}{props}{'dir-prop'}, 'frob', 'replay: dir-prop');
+# TEST
is($ed->{'trunk/filea'}{props}{'binary-prop'}, $BINARY_DATA,
'replay: binary-prop');
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/7editor.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/7editor.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/7editor.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/7editor.t Sun Dec 23 18:34:14 2012
@@ -62,6 +62,7 @@ SVN::Repos::dir_delta($fs->revision_root
MyEditor->new(crap => bless {}, 'something'),
undef, 1, 1, 0, 0);
};
+# TEST
ok($main::something_destroyed, 'editor');
package something;
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/8lock.t
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/8lock.t?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/8lock.t (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/perl/native/t/8lock.t Sun Dec 23 18:34:14 2012
@@ -37,12 +37,14 @@ my $repospath = tempdir('svn-perl-test-X
my $repos;
+# TEST
ok($repos = SVN::Repos::create("$repospath", undef, undef, undef, undef),
"create repository at $repospath");
my $fs = $repos->fs;
my $acc = SVN::Fs::create_access('foo');
+# TEST
is($acc->get_username, 'foo');
$fs->set_access($acc);
@@ -58,11 +60,15 @@ my $token = "opaquelocktoken:notauuid-$$
$fs->lock('/testfile', $token, 'we hate software', 0, 0, $fs->youngest_rev, 0);
+# TEST
ok(my $lock = $fs->get_lock('/testfile'));
+# TEST
is($lock->token, $token);
+# TEST
is($lock->owner, 'foo');
$acc = SVN::Fs::create_access('fnord');
+# TEST
is($acc->get_username, 'fnord');
$fs->set_access($acc);
@@ -70,11 +76,13 @@ eval {
$fs->lock('/testfile', $token, 'we hate software', 0, 0, $fs->youngest_rev, 0);
};
+# TEST
like($@, qr/already locked/);
eval {
$fs->unlock('/testfile', 'software', 0)
};
+# TEST
like($@, qr/no such lock/);
$fs->unlock('/testfile', 'software', 1);
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Sun Dec 23 18:34:14 2012
@@ -2159,6 +2159,24 @@ svn_swig_py_make_stream(PyObject *py_io,
return stream;
}
+PyObject *
+svn_swig_py_convert_txdelta_op_c_array(int num_ops,
+ svn_txdelta_op_t *ops,
+ swig_type_info *op_type_info,
+ PyObject *parent_pool)
+{
+ PyObject *result = PyList_New(num_ops);
+ int i;
+
+ if (!result) return NULL;
+
+ for (i = 0; i < num_ops; ++i)
+ PyList_SET_ITEM(result, i,
+ svn_swig_NewPointerObj(ops + i, op_type_info,
+ parent_pool, NULL));
+
+ return result;
+}
void svn_swig_py_notify_func(void *baton,
const char *path,
@@ -4174,18 +4192,98 @@ svn_swig_py_setup_wc_diff_callbacks2(voi
return callbacks;
}
-PyObject *
-svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
- swig_type_info * op_type_info,
- PyObject *window_pool)
+svn_boolean_t
+svn_swig_py_config_enumerator2(const char *name,
+ const char *value,
+ void *baton,
+ apr_pool_t *pool)
{
- PyObject *result = PyList_New(window->num_ops);
- int i;
+ PyObject *function = baton;
+ PyObject *result;
+ svn_error_t *err = SVN_NO_ERROR;
+ svn_boolean_t c_result;
- for (i = 0; i < window->num_ops; ++i)
- PyList_SET_ITEM(result, i,
- svn_swig_NewPointerObj(window->ops + i, op_type_info,
- window_pool, NULL));
+ svn_swig_py_acquire_py_lock();
- return result;
+ if ((result = PyObject_CallFunction(function,
+ (char *)"ssO&",
+ name,
+ value,
+ make_ob_pool, pool)) == NULL)
+ {
+ err = callback_exception_error();
+ }
+ else if (!PyBool_Check(result))
+ {
+ err = callback_bad_return_error("Not bool");
+ Py_DECREF(result);
+ }
+
+ /* Any Python exception we might have pending must be cleared,
+ because the SWIG wrapper will not check for it, and return a value with
+ the exception still set. */
+ PyErr_Clear();
+
+ if (err)
+ {
+ /* We can't return the error, but let's at least stop enumeration. */
+ svn_error_clear(err);
+ c_result = FALSE;
+ }
+ else
+ {
+ c_result = result == Py_True;
+ Py_DECREF(result);
+ }
+
+ svn_swig_py_release_py_lock();
+
+ return c_result;
+}
+
+svn_boolean_t
+svn_swig_py_config_section_enumerator2(const char *name,
+ void *baton,
+ apr_pool_t *pool)
+{
+ PyObject *function = baton;
+ PyObject *result;
+ svn_error_t *err = SVN_NO_ERROR;
+ svn_boolean_t c_result;
+
+ svn_swig_py_acquire_py_lock();
+
+ if ((result = PyObject_CallFunction(function,
+ (char *)"sO&",
+ name,
+ make_ob_pool, pool)) == NULL)
+ {
+ err = callback_exception_error();
+ }
+ else if (!PyBool_Check(result))
+ {
+ err = callback_bad_return_error("Not bool");
+ Py_DECREF(result);
+ }
+
+ /* Any Python exception we might have pending must be cleared,
+ because the SWIG wrapper will not check for it, and return a value with
+ the exception still set. */
+ PyErr_Clear();
+
+ if (err)
+ {
+ /* We can't return the error, but let's at least stop enumeration. */
+ svn_error_clear(err);
+ c_result = FALSE;
+ }
+ else
+ {
+ c_result = result == Py_True;
+ Py_DECREF(result);
+ }
+
+ svn_swig_py_release_py_lock();
+
+ return c_result;
}
Modified: subversion/branches/javahl-ra/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/javahl-ra/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Sun Dec 23 18:34:14 2012
@@ -299,6 +299,15 @@ SVN_SWIG_SWIGUTIL_EXPORT
svn_stream_t *svn_swig_py_make_stream(PyObject *py_io,
apr_pool_t *pool);
+/* Convert ops, a C array of num_ops elements, to a Python list of SWIG
+ objects with descriptor op_type_info and pool set to parent_pool. */
+SVN_SWIG_SWIGUTIL_EXPORT
+PyObject *
+svn_swig_py_convert_txdelta_op_c_array(int num_ops,
+ svn_txdelta_op_t *ops,
+ swig_type_info * op_type_info,
+ PyObject *parent_pool);
+
/* a notify function that executes a Python function that is passed in
via the baton argument */
SVN_SWIG_SWIGUTIL_EXPORT
@@ -520,16 +529,18 @@ svn_error_t *svn_swig_py_ra_lock_callbac
SVN_SWIG_SWIGUTIL_EXPORT
extern const svn_ra_reporter2_t swig_py_ra_reporter2;
-/* Get a list of ops from a window. Used to replace the naive
- svn_txdelta_window_t.ops accessor. op_type_info is supposed to be
- the SWIG descriptor of "svn_txdelta_op_t *". window_pool is supposed
- to be the pool associated with the window proxy and used for wrapping
- the op objects. */
SVN_SWIG_SWIGUTIL_EXPORT
-PyObject *
-svn_swig_py_txdelta_window_t_ops_get(svn_txdelta_window_t *window,
- swig_type_info * op_type_info,
- PyObject *window_pool);
+svn_boolean_t
+svn_swig_py_config_enumerator2(const char *name,
+ const char *value,
+ void *baton,
+ apr_pool_t *pool);
+
+SVN_SWIG_SWIGUTIL_EXPORT
+svn_boolean_t
+svn_swig_py_config_section_enumerator2(const char *name,
+ void *baton,
+ apr_pool_t *pool);
#ifdef __cplusplus
}