Change to allow subdir updates from Eclipse
(Now you can rightclick any directory and select team-update/team-commit) and it should work
Martyn Smith committed
Mar 28, 2006 at 13:24 UTC
82000d74642f1c9f55ad4b0516c59d829014839a
1 file changed
+27
-11
git-cvsserver.perl
+27
-11
@@ -291,8 +291,7 @@ sub req_Directory
291
$log->debug("Prepending '$state->{prependdir}' to state|directory");
292
$state->{directory} = $state->{prependdir} . $state->{directory}
293
}
294
-
295
- $log->debug("req_Directory : localdir=$data repository=$repository directory=$state->{directory} module=$state->{module}");
294
+ $log->debug("req_Directory : localdir=$data repository=$repository path=$state->{path} directory=$state->{directory} module=$state->{module}");
295
}
296
297
# Entry entry-line \n
@@ -1705,17 +1704,34 @@ sub argsfromdir
1704
1705
$state->{args} = [] if ( scalar(@{$state->{args}}) == 1 and $state->{args}[0] eq "." );
1706
1708
- return if ( scalar ( @{$state->{args}} ) > 0 );
1707
+ return if ( scalar ( @{$state->{args}} ) > 1 );
1708
1710
- $log->info("No args specified, populating file list automatically");
1709
+ if ( scalar(@{$state->{args}}) == 1 )
1710
+ {
1711
+ my $arg = $state->{args}[0];
1712
+ $arg .= $state->{prependdir} if ( defined ( $state->{prependdir} ) );
1713
1712
- $state->{args} = [];
1714
+ $log->info("Only one arg specified, checking for directory expansion on '$arg'");
1715
1714
- foreach my $file ( @{$updater->gethead} )
1715
- {
1716
- next if ( $file->{filehash} eq "deleted" and not defined ( $state->{entries}{$file->{name}} ) );
1717
- next unless ( $file->{name} =~ s/^$state->{directory}// );
1718
- push @{$state->{args}}, $file->{name};
1716
+ foreach my $file ( @{$updater->gethead} )
1717
+ {
1718
+ next if ( $file->{filehash} eq "deleted" and not defined ( $state->{entries}{$file->{name}} ) );
1719
+ next unless ( $file->{name} =~ /^$arg\// or $file->{name} eq $arg );
1720
+ push @{$state->{args}}, $file->{name};
1721
+ }
1722
+
1723
+ shift @{$state->{args}} if ( scalar(@{$state->{args}}) > 1 );
1724
+ } else {
1725
+ $log->info("Only one arg specified, populating file list automatically");
1726
+
1727
+ $state->{args} = [];
1728
+
1729
+ foreach my $file ( @{$updater->gethead} )
1730
+ {
1731
+ next if ( $file->{filehash} eq "deleted" and not defined ( $state->{entries}{$file->{name}} ) );
1732
+ next unless ( $file->{name} =~ s/^$state->{prependdir}// );
1733
+ push @{$state->{args}}, $file->{name};
1734
+ }
1735
}
1736
}
1737
@@ -1816,7 +1832,7 @@ sub filecleanup
1832
}
1833
1834
$filename =~ s/^\.\///g;
1819
- $filename = $state->{directory} . $filename;
1835
+ $filename = $state->{prependdir} . $filename;
1836
return $filename;
1837
}
1838