From users-return-91-daniel=haxx.se@subversion.apache.org Fri Dec 18 16:23:03 2009 Return-Path: Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by giant.haxx.se (8.14.3/8.14.3/Debian-9) with SMTP id nBIFN2VC024495 for ; Fri, 18 Dec 2009 16:23:03 +0100 Received: (qmail 15802 invoked by uid 500); 18 Dec 2009 15:22:57 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Delivered-To: moderator for users@subversion.apache.org Received: (qmail 91508 invoked by uid 99); 18 Dec 2009 15:08:55 -0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Message-ID: <4B2B9AE3.9030404@cipworx.org> Date: Fri, 18 Dec 2009 16:08:19 +0100 From: Christian Kuelker User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: users@subversion.apache.org CC: Giulio Troccoli Subject: SVN API in Perl X-Enigmail-Version: 0.95.0 Content-Type: multipart/mixed; boundary="------------070203050406030500030702" X-cipworx-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 7724A5C0A2.CD281 X-cipworx-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-cipworx-MailScanner-From: christian.kuelker@cipworx.org X-Old-Spam-Status: No This is a multi-part message in MIME format. --------------070203050406030500030702 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Dear Giulio Troccoli, > I'm simply trying to get the status of a WC. In my Perl script I have [...] > How do I use $status in status_receiver? The document http://www.perlmonks.org/?node_id=738308 might help. Attached script shows simple usage. It assumes a checked out repro at /tmp/svn. Kind regards Christian --------------070203050406030500030702 Content-Type: text/plain; name="status" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="status" #!/usr/bin/perl -w use warnings; use strict; use SVN::Client; my $path = '/tmp/svn'; my $recursive = 1; # for checkout, status my $update = 1; # status will compare with online repository my $get_all = 1; # status will get only interesting my $ctx = SVN::Client->new(); $ctx->status($path,'HEAD',\&status_func,$recursive,$get_all,$update,0); sub status_func { my $p = shift; # path my $s = shift; # status object if ( $s->copied() ) { # use status object directly print 'copied'; } else { print q{ } x 6; } my $e = $s->entry(); # get entry object print " commit author " . $e->cmt_author(); $p =~ s{^$path/}{}gmx; print "$p \n"; } --------------070203050406030500030702--