From f2a011f58eb46a0c693a73fc054b77f29594c364 Mon Sep 17 00:00:00 2001 From: Marcelo Leitner Date: Tue, 21 Nov 2006 15:37:55 +0000 Subject: - Improve svn check. Avoid listing entire cooker/ directory: it's a too heavy operation. Instead, list only the wanted package directory, which is faster. --- lib/Youri/Repository/Mandriva_upload.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Youri/Repository/Mandriva_upload.pm b/lib/Youri/Repository/Mandriva_upload.pm index 533a7b5..fd41ea4 100644 --- a/lib/Youri/Repository/Mandriva_upload.pm +++ b/lib/Youri/Repository/Mandriva_upload.pm @@ -356,12 +356,10 @@ sub package_in_svn { SVN::Client::get_username_provider()] ); - my $svn_entry = $ctx->ls("$self->{_svn}/", 'HEAD', 0); - foreach (keys %{$svn_entry}) { - if ($srpm_name eq $_) { - print "Package $_ is in the SVN\n"; - return 1 - } + my $svn_entry = $ctx->ls("$self->{_svn}/$srpm_name", 'HEAD', 0); + if ($svn_entry) { + print "Package $_ is in the SVN\n"; + return 1 } } -- cgit v1.2.1