r43745 - /scripts/KGB/client/KGB_sendcommit
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sat Sep 5 18:14:41 UTC 2009
Author: dmn
Date: Sat Sep 5 18:14:36 2009
New Revision: 43745
URL: http://svn.debian.org/wsvn/?sc=1&rev=43745
Log:
support ignorable branches
no one wants to see 'trunk' all the time
Modified:
scripts/KGB/client/KGB_sendcommit
Modified: scripts/KGB/client/KGB_sendcommit
URL: http://svn.debian.org/wsvn/scripts/KGB/client/KGB_sendcommit?rev=43745&op=diff
==============================================================================
--- scripts/KGB/client/KGB_sendcommit (original)
+++ scripts/KGB/client/KGB_sendcommit Sat Sep 5 18:14:36 2009
@@ -30,7 +30,7 @@
use YAML ();
my( $conf_file, $uri, $proxy, $repo_id, $password, $timeout,
- $repo_type, @br_mod_re, $br_mod_re_swap, @servers,
+ $repo_type, @br_mod_re, $br_mod_re_swap, $ignore_branch, @servers,
);
GetOptions(
'conf=s' => \$conf_file,
@@ -43,6 +43,7 @@
'br-mod-re=s' => \@br_mod_re,
'branch-and-module-re-swap!' => \$br_mod_re_swap,
'br-mod-re!' => \$br_mod_re_swap,
+ 'ignore-branch=s' => \$ignore_branch,
'repository'=> \$repo_type,
) or exit 1;
@@ -63,6 +64,7 @@
@br_mod_re = @{ $conf->{'branch-and-module-re'} }
if !@br_mod_re and $conf->{'branch-and-module-re'};
$br_mod_re_swap //= $conf->{'branch-and-module-re-swap'};
+ $ignore_branch //= $conf->{'ignore-branch'};
@servers = @{ $conf->{servers} } if $conf->{servers};
}
@@ -186,6 +188,9 @@
$c->{path} = $_;
}
}
+
+ $branch = ''
+ if $branch and $ignore_branch and $branch eq $ignore_branch;
}
#utf8::encode($author);
#utf8::encode($log);
@@ -198,7 +203,7 @@
# v1 protocol
my $checksum = sha1_hex($repo_id, $rev, map( change2text($_), @changed ),
- $log, $author, $branch || (), $module || (), $password);
+ $log, $author, $branch // (), $module // (), $password);
#warn( change2text($_), "\n" ) for @changed;
@@ -215,8 +220,8 @@
@changed ) ],
SOAP::Data->type(string => $log),
SOAP::Data->type(string => $author),
- $branch ? SOAP::Data->type( string => $branch) : (),
- $module ? SOAP::Data->type( string => $module) : (),
+ defined($branch) ? SOAP::Data->type( string => $branch) : (),
+ defined($module) ? SOAP::Data->type( string => $module) : (),
]);
if( $res->fault ) {
More information about the Pkg-perl-cvs-commits
mailing list