1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-18 06:54:55 +01:00

Merge branch 'cvsserver' of http://locke.catalyst.net.nz/git/git-martinlanghoff; branch 'ml/cvsserver' into next

* 'cvsserver' of http://locke.catalyst.net.nz/git/git-martinlanghoff:
  cvsserver: fix checkouts with -d <somedir>
  cvsserver: checkout faster by sending files in a sensible order

* ml/cvsserver:
  cvsserver: fix checkouts with -d <somedir>
  cvsserver: checkout faster by sending files in a sensible order
This commit is contained in:
Junio C Hamano 2006-03-02 23:00:45 -08:00
commit cd1333db4f

View file

@ -576,14 +576,15 @@ sub req_co
# Eclipse seems to need the Clear-sticky command # Eclipse seems to need the Clear-sticky command
# to prepare the 'Entries' file for the new directory. # to prepare the 'Entries' file for the new directory.
print "Clear-sticky $checkout_path/\n"; print "Clear-sticky $checkout_path/\n";
print $state->{CVSROOT} . "/$checkout_path/\n"; print $state->{CVSROOT} . "/$module/\n";
print "Clear-static-directory $checkout_path/\n"; print "Clear-static-directory $checkout_path/\n";
print $state->{CVSROOT} . "/$checkout_path/\n"; print $state->{CVSROOT} . "/$module/\n";
# instruct the client that we're checking out to $checkout_path # instruct the client that we're checking out to $checkout_path
print "E cvs checkout: Updating $checkout_path\n"; print "E cvs checkout: Updating $checkout_path\n";
my %seendirs = (); my %seendirs = ();
my $lastdir ='';
foreach my $git ( @{$updater->gethead} ) foreach my $git ( @{$updater->gethead} )
{ {
@ -603,15 +604,17 @@ sub req_co
print "M U $checkout_path/$git->{name}\n"; print "M U $checkout_path/$git->{name}\n";
} }
if (length($git->{dir}) && $git->{dir} ne './' && !exists($seendirs{$git->{dir}})) { if (length($git->{dir}) && $git->{dir} ne './'
&& $git->{dir} ne $lastdir && !exists($seendirs{$git->{dir}})) {
# Eclipse seems to need the Clear-sticky command # Eclipse seems to need the Clear-sticky command
# to prepare the 'Entries' file for the new directory. # to prepare the 'Entries' file for the new directory.
print "Clear-sticky $module/$git->{dir}\n"; print "Clear-sticky $checkout_path/$git->{dir}\n";
print $state->{CVSROOT} . "/$module/$git->{dir}\n"; print $state->{CVSROOT} . "/$module/$git->{dir}\n";
print "Clear-static-directory $module/$git->{dir}\n"; print "Clear-static-directory $checkout_path/$git->{dir}\n";
print $state->{CVSROOT} . "/$module/$git->{dir}\n"; print $state->{CVSROOT} . "/$module/$git->{dir}\n";
print "E cvs checkout: Updating /$module/$git->{dir}\n"; print "E cvs checkout: Updating /$checkout_path/$git->{dir}\n";
$lastdir = $git->{dir};
$seendirs{$git->{dir}} = 1; $seendirs{$git->{dir}} = 1;
} }
@ -2349,7 +2352,7 @@ sub gethead
return $self->{gethead_cache} if ( defined ( $self->{gethead_cache} ) ); return $self->{gethead_cache} if ( defined ( $self->{gethead_cache} ) );
my $db_query = $self->{dbh}->prepare_cached("SELECT name, filehash, mode, revision, modified, commithash, author FROM head",{},1); my $db_query = $self->{dbh}->prepare_cached("SELECT name, filehash, mode, revision, modified, commithash, author FROM head ORDER BY name ASC",{},1);
$db_query->execute(); $db_query->execute();
my $tree = []; my $tree = [];