summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 31ec6ab)
raw | patch | inline | side by side (parent: 31ec6ab)
author | Martin Langhoff <martin@catalyst.net.nz> | |
Thu, 15 Dec 2005 06:26:46 +0000 (19:26 +1300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 15 Dec 2005 06:24:46 +0000 (22:24 -0800) |
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>
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>
git-svnimport.perl | patch | blob | history |
diff --git a/git-svnimport.perl b/git-svnimport.perl
index 65868a91e5f88c41942da89b84f169ed4264615d..cb241d1b5174fad6b6eb081635e614d251688f0d 100755 (executable)
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
}
$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;