[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Getting Knowhere in Perl

From: Gerard Gerritsen <sigcafe_at_gmail.com>
Date: 2005-11-17 18:13:48 CET

Hello,

another update :)

looks like the code handles replaces a bit weird

 R /branches/ruby/doc/tools/dtd/docbook41/ent/iso-amsa.ent
         Copied from : /trunk/doc/tools/dtd/docbook41/ent/iso-amsa.ent (13505)
 R /branches/ruby/doc/tools/fo-stylesheet.xsl
         Copied from : /trunk/doc/tools/fo-stylesheet.xsl (13505)

new version says
 M /branches/locking/subversion/clients/cmdline/export-cmd.c
 R /branches/locking/subversion/clients/cmdline/dtd/log.dtd
         Replaced from : /trunk/subversion/clients/cmdline/dtd/log.dtd (12893)
 A /branches/locking/subversion/clients/cmdline/dtd
         Copied from : /trunk/subversion/clients/cmdline/dtd (12893)

#!/usr/bin/perl

use SVN::Client;

use warnings;
use strict;
my $ctx = SVN::Client->new;

die "no url given" unless $ARGV[0];
my $a = $ctx->url_from_path($ARGV[0]);

print "Scanning $a\n";
sub receiver
{
    my ($changed_paths, $revision, $author, $data, $message) = @_;
    print "\n$revision $author $data $message\n";
    if (defined $changed_paths)
    {
        foreach my $path (keys %{$changed_paths})
        {
            my $obj = $changed_paths->{$path};

            print "\t\n ".$obj->action." $path ";
            my $msg = $obj->action eq 'R' ? 'Replaced from ' : 'Copied from';

            if (defined $obj->copyfrom_path)
            {
                print "\n\t $msg : ".$obj->copyfrom_path ." (".
$obj->copyfrom_rev.")";
             }

        }
    }
    print "\n";
}

print $ctx->log($a,'HEAD',1, 1,0 , \&receiver);
exit 0

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 17 18:17:01 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.