subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1394336 - in /subversion/trunk/subversion/bindings/swig/perl/native: Client.pm t/3client.t
Date Fri, 05 Oct 2012 00:08:03 GMT
Author: breser
Date: Fri Oct  5 00:08:03 2012
New Revision: 1394336

URL: http://svn.apache.org/viewvc?rev=1394336&view=rev
Log:
swig-pl: Add tests and documentation for add2(), add3(), and add4().

* subversion/bindings/swig/perl/native/t/3client.t
  (add2, add3, add4): Add tests for.

* subversion/bindings/swig/perl/native/Client.pm
  (add): Adjust to reference add2().
  (add2): Add documentation that references add3().
  (add4): Add documentation, mostly by taking over the old add() docs. 

Modified:
    subversion/trunk/subversion/bindings/swig/perl/native/Client.pm
    subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t

Modified: subversion/trunk/subversion/bindings/swig/perl/native/Client.pm
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/perl/native/Client.pm?rev=1394336&r1=1394335&r2=1394336&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/native/Client.pm (original)
+++ subversion/trunk/subversion/bindings/swig/perl/native/Client.pm Fri Oct  5 00:08:03 2012
@@ -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().

Modified: subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t?rev=1394336&r1=1394335&r2=1394336&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t (original)
+++ subversion/trunk/subversion/bindings/swig/perl/native/t/3client.t Fri Oct  5 00:08:03
2012
@@ -20,7 +20,7 @@
 #
 #
 
-use Test::More tests => 199;
+use Test::More tests => 211;
 use strict;
 
 # shut up about variables that are only used once.
@@ -177,6 +177,43 @@ ok(close(NEW),'Close new file');
 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



Mime
View raw message