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

Problem with revprop_set under perl and svn:external

From: IPv7 Develop Group <develop_at_ipv7.org>
Date: Fri, 30 Oct 2009 19:27:40 +0100

Hi all,
i'm working to create some perl scripts to make changes on a svn
respository. One of this script try to change a svn:external but i have
a problem to do this with the revprop_set().

I have a testing repository with this path

http://localhost/svn/testing/develop_area/mail

under this directory there are two svn:externals:

[laforge:302]$svn propget svn:externals
http://localhost/svn/testing/develop_area/mail/

stable
http://localhost/svn/testing/main/mail/branches/maintenance-release-1.64

develop http://localhost/svn/testing/main/mail/trunk

With perl i want to change the stable external to a new branch and this
expert of the script to make this change:

[...]
print "Get svn:external\n";
print "================\n";
my $hash =
$ctx->propget("svn:externals","http://localhost/svn/testing/develop_area/mail",$revision,"0");
my $newexternal="";
my $setprop="";
my ($key, $value) = each(%$hash);
        print "Key:$key\n\nValue:\n$value\n";
        my $count="1";
        foreach (split(/\n/,$value)) {
                        my $external=$_;
                        print "-----------------\n";
                        print "External$count: $external\n";
                        $count++;
                        my @exter=split(/\s+/,$external);
                                print "+++++++++++++++++++++\n";
                                print "\tName: $exter[0]\n";
                                print "\tUrl: $exter[1]\n";
                        if ( $exter[0] eq "stable" ) {
                        
$exter[1]="https://localhost/svn/testing/main/mail/branches/maintenance-release-1.65";
                                $setprop="1";
                        }
                        $newexternal=$newexternal."$exter[0] $exter[1]\n";
        }

print "\n\n\n";
if ( $setprop eq "1" ) {
        print "Set svn:external\n";
        print "================\n";
        print "Key:$key\n\n";
        print "Value:\n";
        print $newexternal;
        $ctx->revprop_set("svn:externals",$newexternal,"http://localhost/svn/testing/develop_area/mail",$revision,"1");
} else {
        print "Value:\n";
        print $value;
}
[...]

Running the script no error during the operation:

[laforge:303]$./update-svn.pl
Connect operation
================
Set log message
================
Get svn:external
================
Key:http://localhost/svn/testing/develop_area/mail

Value:
stable
http://localhost/svn/testing/main/mail/branches/maintenance-release-1.64
develop http://localhost/svn/testing/main/mail/trunk

-----------------
External1: stable
http://localhost/svn/testing/main/mail/branches/maintenance-release-1.64
+++++++++++++++++++++
        Name: stable
        Url:
http://localhost/svn/testing/main/mail/branches/maintenance-release-1.64
-----------------
External2: develop http://localhost/svn/testing/main/mail/trunk
+++++++++++++++++++++
        Name: develop
        Url: http://localhost/svn/testing/main/mail/trunk

Set svn:external
================
Key:http://localhost/svn/testing/develop_area/mail

Value:
stable
https://localhost/svn/testing/main/mail/branches/maintenance-release-1.65
develop http://localhost/svn/testing/main/mail/trunk

But if i verify the repoitory i see that no change was made:

[laforge:304]$svn propget svn:externals
http://localhost/svn/testing/develop_area/mail/

stable
http://localhost/svn/testing/main/mail/branches/maintenance-release-1.64

develop http://localhost/svn/testing/main/mail/trunk

No changes on the repository...

On the apache log for the dav_svn i can see this:
[30/Oct/2009:19:11:00 +0100] - get-dir /develop_area/mail r22794 props
[30/Oct/2009:19:11:01 +0100] deployer change-rev-prop r22794 svn:externals

With the cli command i can change the svn:externals without problem.

I'm on linux, distribution Fedora 10
Subversion command-line client, version 1.6.5.
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:

Rpm package version:
subversion-1.6.5-1.fc10.1.i386
subversion-perl-1.6.5-1.fc10.1.i386
mod_dav_svn-1.6.5-1.fc10.1.i386

Anyone have an idea about this problem ?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2413080

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-10-30 19:26:14 CET

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.