1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-15 07:16:37 +02:00

svnimport: exit cleanly when we are up to date

Now we detect that the SVN repo does not have new commits for us and exit
cleanly, removing the lockfile. With this, svnimport supports being run
on a cronjob to maintain a SVN2GIT gateway.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Martin Langhoff 2005-12-15 19:26:46 +13:00 committed by Junio C Hamano
parent 31ec6abf88
commit 988eece42a

View File

@ -736,6 +736,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;