Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D46CD342 for ; Fri, 5 Oct 2012 00:08:51 +0000 (UTC) Received: (qmail 51489 invoked by uid 500); 5 Oct 2012 00:08:51 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 51460 invoked by uid 500); 5 Oct 2012 00:08:51 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 51451 invoked by uid 99); 5 Oct 2012 00:08:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 00:08:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 00:08:48 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 155B323888CD; Fri, 5 Oct 2012 00:08:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@subversion.apache.org From: breser@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121005000804.155B323888CD@eris.apache.org> 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-Eadd($path, $recursive, $pool); +Similar to $ctx-Eadd2(), but with $force always set to FALSE. + +=item $ctx-Eadd2($path, $recursive, $force, $ctx, $pool); + +Similar to $ctx-Eadd3(), but with $no_ignore always set to FALSE. + +=item $ctx-Eadd3($path, $recursive, $force, $no_ignore, $pool); + +Similar to $ctx-Eadd4(), 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-Eadd4($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 operation. No changes will happen to the repository until a commit occurs. This scheduling can be removed with $ctx-Erevert(). 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