r43742 - /scripts/KGB/client/KGB_sendcommit
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sat Sep 5 18:14:08 UTC 2009
Author: dmn
Date: Sat Sep 5 18:14:02 2009
New Revision: 43742
URL: http://svn.debian.org/wsvn/?sc=1&rev=43742
Log:
keep the list of changes structured internally
This way we have the files ready so extraction of branch and
module is easier. Also, this makes it possible to transmit the
change list structured once the server is prepared to handle
this
Modified:
scripts/KGB/client/KGB_sendcommit
Modified: scripts/KGB/client/KGB_sendcommit
URL: http://svn.debian.org/wsvn/scripts/KGB/client/KGB_sendcommit?rev=43742&op=diff
==============================================================================
--- scripts/KGB/client/KGB_sendcommit (original)
+++ scripts/KGB/client/KGB_sendcommit Sat Sep 5 18:14:02 2009
@@ -108,7 +108,11 @@
$k = "D";
}
my $pm = $changed->{$_}->prop_mod() ? "+" : "";
- push @changed, "($k$pm)$_";
+ push @changed, {
+ action => $k,
+ prop_change => $pm,
+ path => $_,
+ };
}
} else {
die "Repository type '$repo_type' not supported\n";
@@ -118,6 +122,15 @@
#utf8::encode($log);
#utf8::encode($_) foreach(@changed);
+sub change2text {
+ my $c = shift;
+ return "(" . $c->{action} . $c->{prop_change} . ")" . $c->{path};
+}
+
+# v1 protocol
+my $checksum = sha1_hex($repo_id, $rev, map( change2text($_), @changed ),
+ $log, $author, $password);
+
# try all servers in turn until someone succeeds
for my $srv (@servers) {
@@ -125,13 +138,10 @@
my $s = SOAP::Lite->new(uri => $srv->{uri}, proxy => $srv->{proxy});
$s->transport->proxy->timeout($srv->{timeout}) if $srv->{timeout};
- # v1 protocol
- my $checksum = sha1_hex($repo_id, $rev, @changed, $log, $author,
- $password);
-
my $res = $s->commit([1,
$repo_id, $checksum, SOAP::Data->type(int => $rev),
- [ map({SOAP::Data->type(string => $_)} @changed) ],
+ [ map( SOAP::Data->type( string => change2text($_) ),
+ @changed ) ],
SOAP::Data->type(string => $log),
SOAP::Data->type(string => $author)]);
More information about the Pkg-perl-cvs-commits
mailing list