summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b74cff)
raw | patch | inline | side by side (parent: 2b74cff)
author | Martin Langhoff <martin@catalyst.net.nz> | |
Thu, 2 Mar 2006 00:58:57 +0000 (13:58 +1300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 2 Mar 2006 01:44:58 +0000 (17:44 -0800) |
Initial checkouts were failing to create Entries files under Eclipse.
Eclipse was waiting for two non-standard directory-resets to prepare for a new
directory from the server.
This patch is tricky, because the same directory resets tend to confuse other
clients. It's taken a bit of fiddling to get the commandline cvs client and
Eclipse to get a good, clean checkout.
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Eclipse was waiting for two non-standard directory-resets to prepare for a new
directory from the server.
This patch is tricky, because the same directory resets tend to confuse other
clients. It's taken a bit of fiddling to get the commandline cvs client and
Eclipse to get a good, clean checkout.
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsserver.perl | patch | blob | history |
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 3c588c9d6439f35035f10cefd72b71933261d2a4..d641c037aac9dde755ee82ff26b9ab9398439933 100755 (executable)
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
my $updater = GITCVS::updater->new($state->{CVSROOT}, $module, $log);
$updater->update();
+ $checkout_path =~ s|/$||; # get rid of trailing slashes
+
+ # Eclipse seems to need the Clear-sticky command
+ # to prepare the 'Entries' file for the new directory.
+ print "Clear-sticky $checkout_path/\n";
+ print $state->{CVSROOT} . "/$checkout_path/\n";
+ print "Clear-static-directory $checkout_path/\n";
+ print $state->{CVSROOT} . "/$checkout_path/\n";
+
# instruct the client that we're checking out to $checkout_path
- print "E cvs server: updating $checkout_path\n";
+ print "E cvs checkout: Updating $checkout_path\n";
+
+ my %seendirs = ();
foreach my $git ( @{$updater->gethead} )
{
print "Mod-time $git->{modified}\n";
# print some information to the client
- print "MT +updated\n";
- print "MT text U \n";
if ( defined ( $git->{dir} ) and $git->{dir} ne "./" )
{
- print "MT fname $checkout_path/$git->{dir}$git->{name}\n";
+ print "M U $checkout_path/$git->{dir}$git->{name}\n";
} else {
- print "MT fname $checkout_path/$git->{name}\n";
+ print "M U $checkout_path/$git->{name}\n";
}
- print "MT newline\n";
- print "MT -updated\n";
+
+ if (length($git->{dir}) && $git->{dir} ne './' && !exists($seendirs{$git->{dir}})) {
+
+ # Eclipse seems to need the Clear-sticky command
+ # to prepare the 'Entries' file for the new directory.
+ print "Clear-sticky $module/$git->{dir}\n";
+ print $state->{CVSROOT} . "/$module/$git->{dir}\n";
+ print "Clear-static-directory $module/$git->{dir}\n";
+ print $state->{CVSROOT} . "/$module/$git->{dir}\n";
+ print "E cvs checkout: Updating /$module/$git->{dir}\n";
+ $seendirs{$git->{dir}} = 1;
+ }
# instruct client we're sending a file to put in this path
print "Created $checkout_path/" . ( defined ( $git->{dir} ) and $git->{dir} ne "./" ? $git->{dir} . "/" : "" ) . "\n";