X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-svnimport.perl;h=6e3a44a2bc9fbf170db45a7e390d6ac8ffbb6f02;hb=c1fe2fe4fe685e0587c3949f953aab726de88994;hp=65868a91e5f88c41942da89b84f169ed4264615d;hpb=034908047d8c46fb4e1323285b3b066567c7fadc;p=git.git diff --git a/git-svnimport.perl b/git-svnimport.perl index 65868a91..6e3a44a2 100755 --- a/git-svnimport.perl +++ b/git-svnimport.perl @@ -96,8 +96,10 @@ sub new { sub conn { my $self = shift; my $repo = $self->{'fullrep'}; - my $s = SVN::Ra->new($repo); - + my $auth = SVN::Core::auth_open ([SVN::Client::get_simple_provider, + SVN::Client::get_ssl_server_trust_file_provider, + SVN::Client::get_username_provider]); + my $s = SVN::Ra->new(url => $repo, auth => $auth); die "SVN connection to $repo: $!\n" unless defined $s; $self->{'svn'} = $s; $self->{'repo'} = $repo; @@ -736,6 +738,13 @@ sub commit_all { } $opt_l = $svn->{'maxrev'} if not defined $opt_l or $opt_l > $svn->{'maxrev'}; + +if ($svn->{'maxrev'} < $current_rev) { + print "Up to date: no new revisions to fetch!\n" if $opt_v; + unlink("$git_dir/SVN2GIT_HEAD"); + exit; +} + print "Fetching from $current_rev to $opt_l ...\n" if $opt_v; my $pool=SVN::Pool->new;